Linux 版本是 RHEL8
# cat /etc/redhat-release Red Hat Enterprise Linux release 8.0 (Ootpa)
Apache的版本
# rpm -q httpd httpd-2.4.37-10.module+el8+2764+7127e69e.x86_64
PHP的版本
# rpm -q php php-7.2.11-1.module+el8+2561+1aca3413.x86_64
MySQL的版本
# rpm -q mysql-server mysql-server-8.0.13-1.module+el8+2558+036183ec.x86_64
還有一個 php for MySQL
# rpm -qa | grep php-mysql php-mysqlnd-7.2.11-1.module+el8+2561+1aca3413.x86_64
啟動 MySQL 服務
# systemctl start mysqld # systemctl enable mysqld Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service → /usr/lib/systemd/system/mysql d.service. # systemctl status mysqld ● mysqld.service - MySQL 8.0 database server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2020-05-24 12:58:56 CST; 11s ago Main PID: 3881 (mysqld) Status: "SERVER_OPERATING" Tasks: 38 (limit: 26213) Memory: 525.6M CGroup: /system.slice/mysqld.service └─3881 /usr/libexec/mysqld --basedir=/usr May 24 12:58:50 foundation0.ilt.example.com systemd[1]: Starting MySQL 8.0 database server... May 24 12:58:50 foundation0.ilt.example.com mysql-prepare-db-dir[3796]: Initializing MySQL database May 24 12:58:56 foundation0.ilt.example.com systemd[1]: Started MySQL 8.0 database server.
Apache的服務也要啟動
# systemctl status httpd ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/httpd.service.d └─php-fpm.conf Active: active (running) since Sun 2020-05-24 03:03:11 CST; 9h ago Docs: man:httpd.service(8) Main PID: 25702 (httpd) Status: "Total requests: 1823; Idle/Busy workers 100/0;Requests/sec: 0.0508; Bytes served/sec: 305KB/sec" Tasks: 279 (limit: 26213) Memory: 59.4M CGroup: /system.slice/httpd.service ├─ 4441 /usr/sbin/httpd -DFOREGROUND ├─25702 /usr/sbin/httpd -DFOREGROUND ├─27449 /usr/sbin/httpd -DFOREGROUND ├─27451 /usr/sbin/httpd -DFOREGROUND ├─27452 /usr/sbin/httpd -DFOREGROUND ├─27453 /usr/sbin/httpd -DFOREGROUND └─27454 /usr/sbin/httpd -DFOREGROUND May 24 03:03:11 foundation0.ilt.example.com systemd[1]: Starting The Apache HTTP Server... May 24 03:03:11 foundation0.ilt.example.com httpd[25702]: Server configured, listening on: port 443, port 80 May 24 03:03:11 foundation0.ilt.example.com systemd[1]: Started The Apache HTTP Server. May 24 03:27:01 foundation0.ilt.example.com systemd[1]: Reloading The Apache HTTP Server. May 24 03:27:01 foundation0.ilt.example.com systemd[1]: Reloaded The Apache HTTP Server. May 24 03:27:01 foundation0.ilt.example.com httpd[25702]: Server configured, listening on: port 443, port 80
寫個 phpinfo 確認一下
# cat /var/www/html/phpinfo.php