天天看點

實戰案例:編譯安裝基于 FastCGI 模式LAMP架構多虛拟主機WEB應用(WordPress 和Discuz)

編譯安裝基于 FastCGI 模式LAMP架構多虛拟主機WEB應用(WordPress 和Discuz)

1. 目标

實踐目标:FastCGI模式(PHP-FPM基于TCP9000和UDS兩種模式)LAMP架構的實作。

用獨立的MySQL伺服器存放部落格和論壇的資料,并在另一台CentOS 7.9環境下編譯安裝基于FastCGI模式的PHP,并部署Apache多虛拟主機的WordPress和Discuz的網站。

2. 架構圖及環境準備

實戰案例:編譯安裝基于 FastCGI 模式LAMP架構多虛拟主機WEB應用(WordPress 和Discuz)
# 兩台伺服器
1  Apache(httpd)+PHP (FastCGI模式):
Httpd-PHP
CentOS 7.9
IP: 192.168.250.47/24
10.3.28-MariaDB

2  Mariadb 伺服器:
MariaDB
CentOS 8.4
IP: 192.168.250.48/24
10.3.28-MariaDB

# 軟體包及版本:   https://mariadb.com/downloads/
mariadb-10.4.22-linux-x86_64.tar.gz  二進制格式
mariadb-10.4.24-linux-x86_64.tar.gz

# mariadb-10.7.3-linux-systemd-x86_64.tar.gz   沒搞清楚中間systemd 是什麼意思
https://dlm.mariadb.com/browse/mariadb_server/192/1288/bintar-linux-systemd-x86_64/

httpd-2.4.52.tar.bz2
apr-1.7.0.tar.bz2
apr-util-1.6.1.tar.bz2
php-7.4.28.tar.xz

wordpress-5.9.1-zh_CN.zip
Discuz_X3.4_SC_UTF8_20220131.zip

https://mariadb.com/downloads/
https://mariadb.org/
https://www.php.net/downloads
https://httpd.apache.org/download.cgi
https://cn.wordpress.org/download/
https://www.dismall.com/thread-73-1-1.html      

3. Maria資料庫伺服器

基本任務:在獨立的資料庫伺服器(IP192.168.250.48)上用最新穩定版本mariadb-10.7.3-linux-systemd-x86_64.tar.gz,二進制安裝10.7.3資料庫,并建立 discuz和 wordpress兩個資料庫,做好授權給論壇和部落格通過TCP端口連接配接調用。

3.1. 主機環境及安裝包準備

官網下載下傳位址:https://mariadb.org/download/

# 修改主機名  退出再登入 確定字首變成新主機名
[root@CentOS84 ]#hostnamectl set-hostname MarriaDB-IP48

# 時鐘同步
[root@MarriaDB-IP48 ]#systemctl enable --now  chronyd.service
[root@MarriaDB-IP48 ]#

# 檢視主機監聽的端口,確定沒有軟體安裝沖突
[root@MarriaDB-IP48 ]#cd /data/
[root@MarriaDB-IP48 ]#wget https://tw1.mirror.blendbyte.net/mariadb/mariadb-10.7.3/bintar-linux-systemd-x86_64/mariadb-10.7.3-linux-systemd-x86_64.tar.gz      

3.2. MariaDB的安裝和配置

# 查詢是否有mysql賬号,沒有就建立
[root@MarriaDB-IP48 ]#getent passwd mysql

# 建立資料庫賬号 mysql  組 mysql  非主機登入
[root@MarriaDB-IP48 ]#useradd -r -s /sbin/nologin mysql

# 解壓最新的mariadb安裝包
[root@MarriaDB-IP48 ]#tar xvf mariadb-10.7.3-linux-systemd-x86_64.tar.gz -C /usr/local > /dev/nul

[root@MarriaDB-IP48 ]#ll /usr/local
drwxrwxr-x  11 summer summer 245 Feb 12 07:47 mariadb-10.7.3-linux-systemd-x86_64
[root@MarriaDB-IP48 ]#

# 進入目錄并建立軟連結
[root@MarriaDB-IP48 ]#cd /usr/local
[root@MarriaDB-IP48 ]#ln -sv mariadb-10.7.3-linux-systemd-x86_64 mysql
'mysql' -> 'mariadb-10.7.3-linux-systemd-x86_64'

# 檢視mysql目錄下的檔案權屬,并修改
[root@MarriaDB-IP48 ]#cd mysql
[root@MarriaDB-IP48 ]#ll
total 164
drwxr-xr-x  2 summer summer  4096 Jan 19 01:31 bin
-rw-r--r--  1 summer summer 17987 Feb 11 04:33 COPYING
-rw-r--r--  1 summer summer  2093 Feb 11 04:33 CREDITS
drwxrwxr-x  3 summer summer    19 Feb 11 05:11 include
-rw-r--r--  1 summer summer  8782 Feb 11 04:33 INSTALL-BINARY
drwxr-xr-x  5 summer summer   293 Jan 19 01:31 lib
drwxrwxr-x  5 summer summer    42 Feb 11 05:12 man
drwxrwxr-x  9 summer summer  4096 Feb 11 05:12 mysql-test
-rw-r--r--  1 summer summer  2697 Feb 11 04:33 README.md
-rw-r--r--  1 summer summer 19520 Feb 11 04:33 README-wsrep
drwxrwxr-x  2 summer summer    56 Feb 11 05:12 scripts
drwxrwxr-x 31 summer summer  4096 Feb 11 05:12 share
drwxrwxr-x  4 summer summer  4096 Feb 11 05:12 sql-bench
drwxrwxr-x  4 summer summer   180 Feb 11 05:12 support-files
-rw-r--r--  1 summer summer 86263 Feb 11 04:33 THIRDPARTY

[root@MarriaDB-IP48 ]#chown -R root.root ./*
#上面的指令等同于 chown -R root:root /usr/local/mysql/

# 權屬修改的确認
[root@MarriaDB-IP48 ]#ll
total 164
drwxr-xr-x  2 root root  4096 Jan 19 01:31 bin
-rw-r--r--  1 root root 17987 Feb 11 04:33 COPYING
-rw-r--r--  1 root root  2093 Feb 11 04:33 CREDITS
drwxrwxr-x  3 root root    19 Feb 11 05:11 include
-rw-r--r--  1 root root  8782 Feb 11 04:33 INSTALL-BINARY
drwxr-xr-x  5 root root   293 Jan 19 01:31 lib
drwxrwxr-x  5 root root    42 Feb 11 05:12 man
drwxrwxr-x  9 root root  4096 Feb 11 05:12 mysql-test
-rw-r--r--  1 root root  2697 Feb 11 04:33 README.md
-rw-r--r--  1 root root 19520 Feb 11 04:33 README-wsrep
drwxrwxr-x  2 root root    56 Feb 11 05:12 scripts
drwxrwxr-x 31 root root  4096 Feb 11 05:12 share
drwxrwxr-x  4 root root  4096 Feb 11 05:12 sql-bench
drwxrwxr-x  4 root root   180 Feb 11 05:12 support-files
-rw-r--r--  1 root root 86263 Feb 11 04:33 THIRDPARTY

# 建立資料庫存放資料的目錄,并授權mysql.mysql
[root@MarriaDB-IP48 ]#mkdir /data/mysql -p
[root@MarriaDB-IP48 ]#chown -R mysql.mysql /data/mysql

# 建立資料庫配置檔案目錄,并編寫配置檔案  說明:本例的my.cnf屬于極小化配置,需要根據生産需要做細化配置
[root@MarriaDB-IP48 ]#mkdir /etc/mysql

[root@MarriaDB-IP48 ]#vim /etc/mysql/my.cnf
[root@MarriaDB-IP48 ]#cat /etc/mysql/my.cnf
[mysqld]
server-id=1
log-bin
datadir=/data/mysql
socket=/data/mysql/mysql.sock
skip_name_resolve = on

log-error=/data/mysql/mysql.log
pid-file=/data/mysql/mysql.pid

[client]
port=3306
socket=/data/mysql/mysql.sock
[root@MarriaDB-IP48 ]#

## 進入資料庫程式檔案目錄,安裝依賴包,初始化安裝資料庫
[root@MarriaDB-IP48 ]#cd /usr/local/mysql
# 安裝依賴包
[root@MarriaDB-IP48 ]#yum -y install libaio
# 初始化安裝資料庫
[root@MarriaDB-IP48 ]#./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
Installing MariaDB/MySQL system tables in '/data/mysql' ...
OK
...............

# 準備資料庫的服務檔案
[root@MarriaDB-IP48 ]#cp support-files/systemd/mariadb.service /usr/lib/systemd/system
[root@MarriaDB-IP48 ]#ll 
drwxrwxr-x  4 root root   180 Feb 11 05:12 support-files

# 個性化資料庫,定義專用的日志等目錄,并授權
[root@MarriaDB-IP48 ]#mkdir /var/log/mariadb 
[root@MarriaDB-IP48 ]#mkdir /var/run/mariadb

[root@MarriaDB-IP48 ]#chown mysql:mysql /var/log/mariadb
[root@MarriaDB-IP48 ]#chown mysql:mysql /var/run/mariadb

# 設定PATH變量并使之立刻生效
[root@MarriaDB-IP48 ]#echo 'PATH=/usr/local/mysql/bin:$PATH' > /etc/profile.d/mysql.sh
[root@MarriaDB-IP48 ]#. /etc/profile.d/mysql.sh
                     
# 啟動服務,并設定為開機自動啟動
[root@MarriaDB-IP48 ]#systemctl enable --now mariadb     
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.      

3.3. 驗證資料庫

# 檢視監聽
[root@MarriaDB-IP48 ]#ss -tln
State         Recv-Q        Send-Q               Local Address:Port               Peer Address:Port        Process        
                       
LISTEN        0             80                         0.0.0.0:3306                    0.0.0.0:*                          
LISTEN        0             80                            [::]:3306                       [::]:*                          

# 進入資料庫
[root@MarriaDB-IP48 ]#mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 10.7.3-MariaDB-log MariaDB Server  #此行看到資料庫版本資訊

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# 檢視庫
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
+--------------------+
5 rows in set (0.001 sec)

# 建立庫
MariaDB [(none)]> create database wordpress;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> create database discuz;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> grant all on wordpress.* to wordpress@'192.168.250.%' identified by "wppass";
Query OK, 0 rows affected (0.002 sec)

MariaDB [(none)]> grant all on discuz.* to discuz@'192.168.250.%' identified by 'dispass';
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> show databases;           
+--------------------+
| Database           |
+--------------------+
| discuz             |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
| wordpress          |
+--------------------+
7 rows in set (0.001 sec)

MariaDB [(none)]> show status \G;     

MariaDB [(none)]> quit
Bye

[root@MarriaDB-IP48 ]#      

4. 前端伺服器

基本任務:在一台Centos79 上安裝 apache 、 fastcgi、php和部落格論壇源檔案,因為是基于fastcgi模式(TCP9000端口方式連接配接),是以也可以将apache和PHP部署在兩台不同的伺服器上。

4.1 準備安裝包

[root@centos79 <sub>]# yum -y install ntp ntpdate
[root@centos79 </sub>]# ntpdate ntp1.aliyun.com
[root@centos79 <sub>]# timedatectl set-ntp yes
[root@centos79 </sub>]# hostnamectl sethostname Apache-IP47
Unknown operation sethostname
[root@centos79 <sub>]# hostnamectl set-hostname Apache-IP47
[root@centos79 </sub>]# exit
[root@apache-ip47 <sub>]# 
[root@apache-ip47 </sub>]# yum -y install gcc pcre-devel openssl-devel expat-devel

[root@apache-ip47 <sub>]# mkdir /src/
[root@apache-ip47 </sub>]# cd /src
[root@apache-ip47 src]# rz
rz waiting to receive.
Starting zmodem transfer.  Press Ctrl+C to cancel.
Transferring wordpress-5.9.1-zh_CN.tar.gz...
  100%   19005 KB     905 KB/sec    00:00:21       0 Errors  
rz waiting to receive.
Transferring apr-1.7.0.tar.bz2...
  100%     851 KB     851 KB/sec    00:00:01       0 Errors  
Transferring apr-util-1.6.1.tar.bz2...
  100%     418 KB     418 KB/sec    00:00:01       0 Errors  
Transferring Discuz_X3.4_SC_UTF8_20220131.zip...
  100%   11687 KB     730 KB/sec    00:00:16       0 Errors  
Transferring httpd-2.4.52.tar.bz2...
  100%    7264 KB    1452 KB/sec    00:00:05       0 Errors  

[root@apache-ip47 src]# ll
total 39236
-rw-r--r-- 1 root root   872238 Mar  4 00:23 apr-1.7.0.tar.bz2
-rw-r--r-- 1 root root   428595 Mar  4 00:24 apr-util-1.6.1.tar.bz2
-rw-r--r-- 1 root root 11968448 Mar  3 23:01 Discuz_X3.4_SC_UTF8_20220131.zip
-rw-r--r-- 1 root root  7439184 Mar  4 00:25 httpd-2.4.52.tar.bz2
-rw-r--r-- 1 root root 19461582 Mar  3 21:01 wordpress-5.9.1-zh_CN.tar.gz

[root@apache-ip47 src]#tar xvf apr-1.7.0.tar.bz2 
[root@apache-ip47 src]#tar xvf apr-util-1.6.1.tar.bz2
[root@apache-ip47 src]#tar xvf httpd-2.4.52.tar.bz2
[root@apache-ip47 src]#tar xvf wordpress-5.9.1-zh_CN.tar.gz

[root@apache-ip47 src]#mkdir Discuz/
[root@apache-ip47 src]#cp Discuz_X3.4_SC_UTF8_20220131.zip /src/Discuz/Discuz_X3.4_SC_UTF8_20220131.zip
[root@apache-ip47 src]#cd Discuz
[root@apache-ip47 Discuz0]# unzip Discuz_X3.4_SC_UTF8_20220131.zip
[root@apache-ip47 src]#cd /src/
[root@apache-ip47 src]# ll
total 39252
drwxr-xr-x 27 1001  1001     4096 Apr  2  2019 apr-1.7.0
-rw-r--r--  1 root root    872238 Mar  4 00:23 apr-1.7.0.tar.bz2
drwxr-xr-x 20 1001  1001     4096 Oct 18  2017 apr-util-1.6.1
-rw-r--r--  1 root root    428595 Mar  4 00:24 apr-util-1.6.1.tar.bz2
drwxr-xr-x  4 root root       105 Mar  5 16:05 Discuz
-rw-r--r--  1 root root  11968448 Mar  3 23:01 Discuz_X3.4_SC_UTF8_20220131.zip
drwxr-xr-x 12  504 games     4096 Dec 16 21:49 httpd-2.4.52
-rw-r--r--  1 root root   7439184 Mar  4 00:25 httpd-2.4.52.tar.bz2
drwxr-xr-x  5 1006  1006     4096 Mar  3 03:00 wordpress
-rw-r--r--  1 root root  19461582 Mar  3 21:01 wordpress-5.9.1-zh_CN.tar.gz      

4.2 編譯安裝httpd-2.4.52

[root@apache-ip47 src]# mv apr-1.7.0 httpd-2.4.52/srclib/apr 
[root@apache-ip47 src]# mv apr-util-1.6.1 httpd-2.4.52/srclib/apr-util

[root@apache-ip47 src]#

# 查詢并确定用于編譯和編譯安裝的CPU個數,以加快速度
[root@apache-ip47 php-7.4.28]# lscpu | grep CPU
CPU op-mode(s):        32-bit, 64-bit
CPU(s):                8
On-line CPU(s) list:   0-7
CPU family:            6
Model name:            Intel(R) Xeon(R) CPU E7-4809 v4 @ 2.10GHz
CPU MHz:               2094.952
NUMA node0 CPU(s):     0-7
[root@apache-ip47 php-7.4.28]# 

[root@apache-ip47 src]# cd httpd-2.4.52
[root@apache-ip47 httpd-2.4.52]# ./configure \
> --prefix=/apps/httpd \
> --enable-so \
> --enable-ssl \
> --enable-cgi \
> --enable-rewrite \
> --with-zlib \
> --with-pcre \
> --with-included-apr \
> --enable-modules=most \
> --enable-mpms-shared=all \
> --with-mpm=event


[root@apache-ip47 httpd-2.4.52]#make -j 8 && make install


[root@apache-ip47 httpd-2.4.52]# ll /apps/httpd/                
total 44
drwxr-xr-x  2 root root  302 Mar  5 16:37 bin
drwxr-xr-x  2 root root  253 Mar  5 16:37 build
drwxr-xr-x  2 root root   78 Mar  5 16:37 cgi-bin
drwxr-xr-x  4 root root   84 Mar  5 16:37 conf
drwxr-xr-x  3 root root 4096 Mar  5 16:37 error
drwxr-xr-x  2 root root   24 Mar  5 16:37 htdocs
drwxr-xr-x  3 root root 8192 Mar  5 16:37 icons
drwxr-xr-x  2 root root 8192 Mar  5 16:37 include
drwxr-xr-x  3 root root  281 Mar  5 16:36 lib
drwxr-xr-x  2 root root    6 Mar  5 16:37 logs
drwxr-xr-x  4 root root   30 Mar  5 16:37 man
drwxr-xr-x 14 root root 8192 Mar  5 16:37 manual
drwxr-xr-x  2 root root 4096 Mar  5 16:37 modules
[root@apache-ip47 httpd-2.4.52]# 

# 修改/apps/httpd/conf/httpd.conf 配置檔案,再次确認編譯時修改掉了event模式
[root@apache-ip47 httpd-2.4.52]# vim /apps/httpd/conf/httpd.conf

LoadModule mpm_event_module modules/mod_mpm_event.so
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
.................
<IfModule unixd_module>
user apache
group apache
</IfModule>
ServerAdmin [email protected]
ServerName 0.0.0.0:80
..................

# 驗證子產品
[root@apache-ip47 src]# httpd -M |grep mpm
 mpm_event_module (shared)
[root@apache-ip47 src]# 


[root@apache-ip47 httpd-2.4.52]# vim /usr/lib/systemd/system/httpd.service
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=man:httpd(8)
Documentation=man:apachectl(8)
[Service]
Type=forking
#EnvironmentFile=/etc/sysconfig/httpd
ExecStart=/apps/httpd/bin/apachectl start
#ExecStart=/apps/httpd/bin/httpd $OPTIONS -k start
ExecReload=/apps/httpd/bin/apachectl graceful
#ExecReload=/apps/httpd/bin/httpd $OPTIONS -k graceful
ExecStop=/apps/httpd/bin/apachectl stop
KillSignal=SIGCONT
PrivateTmp=true
[Install]
WantedBy=multi-user.target                                                                                                
"/usr/lib/systemd/system/httpd.service" [New] 17L, 523C written    
[root@apache-ip47 httpd-2.4.52]# apachectl restart
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::250:56ff:fea3:2e83%ens192. Set the 'ServerName' directive globally to suppress this message
[root@apache-ip47 httpd-2.4.52]# systemctl start httpd.service
[root@apache-ip47 httpd-2.4.52]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:httpd(8)
           man:apachectl(8)

Mar 05 16:54:59 apache-ip47 systemd[1]: Starting The Apache HTTP Server...
Mar 05 16:54:59 apache-ip47 apachectl[3589]: AH00558: httpd: Could not reliably determine the server's fully quali...ssage
Mar 05 16:54:59 apache-ip47 apachectl[3589]: httpd (pid 3349) already running
Mar 05 16:54:59 apache-ip47 apachectl[3593]: AH00558: httpd: Could not reliably determine the server's fully quali...ssage
Mar 05 16:54:59 apache-ip47 systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@apache-ip47 httpd-2.4.52]# systemctl restart httpd.service
[root@apache-ip47 httpd-2.4.52]# systemctl status httpd.service 
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Sat 2022-03-05 16:55:35 CST; 1s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 3606 ExecStart=/apps/httpd/bin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 3609 (httpd)
   CGroup: /system.slice/httpd.service
           ├─3609 /apps/httpd/bin/httpd -k start
           ├─3610 /apps/httpd/bin/httpd -k start
           ├─3611 /apps/httpd/bin/httpd -k start
           └─3612 /apps/httpd/bin/httpd -k start

Mar 05 16:55:35 apache-ip47 systemd[1]: Starting The Apache HTTP Server...
Mar 05 16:55:35 apache-ip47 apachectl[3606]: AH00558: httpd: Could not reliably determine the server's fully quali...ssage
Mar 05 16:55:35 apache-ip47 systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@apache-ip47 httpd-2.4.52]# ss -tln                        
State      Recv-Q Send-Q                Local Address:Port                              Peer Address:Port              
LISTEN     0      128                               *:111                                           *:*                  
LISTEN     0      128                               *:22                                            *:*                  
LISTEN     0      100                       127.0.0.1:25                                            *:*                  
LISTEN     0      128                            [::]:111                                        [::]:*                  
LISTEN     0      511                            [::]:80                                         [::]:*                  
LISTEN     0      128                            [::]:22                                         [::]:*                  
LISTEN     0      100                           [::1]:25                                         [::]:*                  
[root@apache-ip47 httpd-2.4.52]# 
[root@apache-ip47 httpd-2.4.52]# vim /usr/lib/systemd/system/httpd.service
[root@apache-ip47 httpd-2.4.52]# cat /usr/lib/systemd/system/httpd.service
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=man:httpd(8)
Documentation=man:apachectl(8)
[Service]
Type=forking
#EnvironmentFile=/etc/sysconfig/httpd
ExecStart=/apps/httpd/bin/apachectl start
#ExecStart=/apps/httpd/bin/httpd $OPTIONS -k start
ExecReload=/apps/httpd/bin/apachectl graceful
#ExecReload=/apps/httpd/bin/httpd $OPTIONS -k graceful
ExecStop=/apps/httpd/bin/apachectl stop
KillSignal=SIGCONT
PrivateTmp=true
[Install]
WantedBy=multi-user.target

[root@apache-ip47 src]# systemctl enable --now  httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@apache-ip47 src]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2022-03-05 16:55:35 CST; 1 day 8h ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 3609 (httpd)
   CGroup: /system.slice/httpd.service
           ├─ 3609 /apps/httpd/bin/httpd -k start
           ├─16708 /apps/httpd/bin/httpd -k start
           ├─16709 /apps/httpd/bin/httpd -k start
           ├─16710 /apps/httpd/bin/httpd -k start
           └─16795 /apps/httpd/bin/httpd -k start

Mar 05 16:55:35 apache-ip47 systemd[1]: Starting The Apache HTTP Server...
Mar 05 16:55:35 apache-ip47 apachectl[3606]: AH00558: httpd: Could not reliably determine the server's fully qualified dom...essage
Mar 05 16:55:35 apache-ip47 systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@apache-ip47 src]#      

4.3 編譯安裝 FastCGI 方式的 php-7.4.28

[root@apache-ip47 src]# ll
total 49420
-rw-r--r--  1 root root    872238 Mar  4 00:23 apr-1.7.0.tar.bz2
-rw-r--r--  1 root root    428595 Mar  4 00:24 apr-util-1.6.1.tar.bz2
drwxr-xr-x  4 root root       105 Mar  5 16:05 Discuz
-rw-r--r--  1 root root  11968448 Mar  3 23:01 Discuz_X3.4_SC_UTF8_20220131.zip
drwxr-xr-x 13  504 games     4096 Mar  5 16:33 httpd-2.4.52
-rw-r--r--  1 root root   7439184 Mar  4 00:25 httpd-2.4.52.tar.bz2
-rw-r--r--  1 root root  10418352 Mar  3 23:59 php-7.4.28.tar.xz
drwxr-xr-x  5 1006  1006     4096 Mar  3 03:00 wordpress
-rw-r--r--  1 root root  19461582 Mar  3 21:01 wordpress-5.9.1-zh_CN.tar.gz
[root@apache-ip47 src]# tar xvf php-7.4.28.tar.xz

[root@apache-ip47 src]# cd php-7.4.28
[root@apache-ip47 php-7.4.28]# ./configure \
> --prefix=/apps/php \
> --enable-mysqlnd \
> --with-mysqli=mysqlnd \
> --with-pdo-mysql=mysqlnd \
> --with-openssl \
> --with-zlib \
> --with-config-file-path=/etc \
> --with-config-file-scan-dir=/etc/php.d \
> --enable-mbstring \
> --enable-xml \
> --enable-sockets \
> --enable-fpm \
> --enable-maintainer-zts \
> --disable-fileinfo

# 在編譯安裝httpd時候已經查詢過CPU個數,直接編譯和安裝
[root@apache-ip47 php-7.4.28]#make -j 8 && make install


[root@apache-ip47 php-7.4.28]# echo 'PATH=/apps/php/bin:/apps/httpd/bin:$PATH' > /etc/profile.d/php74.sh
[root@apache-ip47 php-7.4.28]# . /etc/profile.d/php74.sh

[root@apache-ip47 php-7.4.28]# php --version
PHP 7.4.28 (cli) (built: Mar  5 2022 17:17:15) ( ZTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
[root@apache-ip47 php-7.4.28]# 

[root@apache-ip47 php-7.4.28]# cp php.ini-production /etc/php.ini
[root@apache-ip47 php-7.4.28]# cp sapi/fpm/php-fpm.service /usr/lib/systemd/system/
[root@apache-ip47 php-7.4.28]# cd /apps/php/etc
[root@apache-ip47 etc]# cp php-fpm.conf.default php-fpm.conf
[root@apache-ip47 etc]# cd php-fpm.d/
[root@apache-ip47 php-fpm.d]# cp www.conf.default www.conf
[root@apache-ip47 php-fpm.d]# 
[root@apache-ip47 php-fpm.d]# vim /apps/php/etc/php-fpm.d/www.conf

......................
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default users group
;       will be used.
user = apache
group = apache        
.......................                 


[root@apache-ip47 Discuz0]# cat /apps/php/etc/php-fpm.d/www.conf | grep -v "^;" | grep  -v "^\s*$"    
[www]
user = apache
group = apache
listen = 127.0.0.1:9000   #如果apache 和 PHP 不在同一台伺服器上,此行也需要修改 listen = 0.0.0.0:9000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.status_path = /fpm_status
ping.path = /ping
[root@apache-ip47 Discuz0]# 

[root@apache-ip47 php-fpm.d]# mkdir /etc/php.d/
[root@apache-ip47 php-fpm.d]# vim /etc/php.d/opcache.ini
[root@apache-ip47 php-fpm.d]# cat /etc/php.d/opcache.ini            
[opcache]
zend_extension=opcache.so
opcache.enable=1


[root@apache-ip47 php-fpm.d]# systemctl daemon-reload
[root@apache-ip47 php-fpm.d]# systemctl enable --now php-fpm.service
Created symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service.
[root@apache-ip47 php-fpm.d]# systemctl status php-fpm.service      
● php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2022-03-05 17:34:18 CST; 10s ago
 Main PID: 16431 (php-fpm)
   CGroup: /system.slice/php-fpm.service
           ├─16431 php-fpm: master process (/apps/php/etc/php-fpm.conf)
           ├─16432 php-fpm: pool www
           └─16433 php-fpm: pool www

Mar 05 17:34:18 apache-ip47 systemd[1]: Started The PHP FastCGI Process Manager.

[root@apache-ip47 php-fpm.d]#      

4.4 再次修改 httpd 支援 php-fpm

[root@apache-ip47 httpd-2.4.52]#vim /apps/httpd/conf/httpd.conf

# 過濾出httpd.conf的有效配置行,其他的行都被#注釋掉
[root@apache-ip47 httpd-2.4.52]# cat /apps/httpd/conf/httpd.conf | grep -v "#" | grep -v "^\s*$"
ServerRoot "/apps/httpd"
Listen 80
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule filter_module modules/mod_filter.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
# 取消下面兩行的注釋
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so

LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so

<IfModule !mpm_prefork_module>
</IfModule>
<IfModule mpm_prefork_module>
</IfModule>
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
<IfModule unixd_module>
user apache
group apache
</IfModule>
ServerAdmin [email protected]
ServerName 0.0.0.0:80
<Directory />
    AllowOverride none
    Require all denied
</Directory>
DocumentRoot "/apps/httpd/htdocs"
<Directory "/apps/httpd/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

# 修改首頁檔案預設格式
<IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>

# 增加下面的兩行
AddType application/x-httpd-php .php
ProxyRequests Off

# 下面是非常關鍵的配置,虛拟機主機頭的配置資訊
# 第一個wordpress部落格網站的虛拟機配置
<virtualhost *:80>
servername blog.shone.cn
documentroot /data/wordpress
<directory /data/wordpress>
require all granted
</directory>
ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/data/wordpress/$1
# 配置好status和ping測試頁面
ProxyPassMatch ^/(fpm_status|ping)$ fcgi://127.0.0.1:9000/$1
CustomLog "logs/access_wordpress_log" common
</virtualhost>

# 第二個discuz論壇網站的虛拟機配置
<virtualhost *:80>
servername forum.shone.cn
documentroot /data/discuz
<directory /data/discuz/>
require all granted
</directory>
ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/data/discuz/$1
CustomLog "logs/access_discuz_log" common
</virtualhost>

<Files ".ht*">
    Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "logs/access_log" common
</IfModule>
<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/apps/httpd/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "/apps/httpd/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>
<IfModule headers_module>
    RequestHeader unset Proxy early
</IfModule>
<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

[root@apache-ip47 httpd-2.4.52]#apachectl restart      

4.5 準備部落格wordpress和論壇discuz 代碼包

# 準備wordpress PHP代碼檔案
[root@apache-ip47 src]# ll
total 49424
-rw-r--r--  1 root root    872238 Mar  4 00:23 apr-1.7.0.tar.bz2
-rw-r--r--  1 root root    428595 Mar  4 00:24 apr-util-1.6.1.tar.bz2
drwxr-xr-x  4 root root       105 Mar  5 16:05 Discuz
-rw-r--r--  1 root root  11968448 Mar  3 23:01 Discuz_X3.4_SC_UTF8_20220131.zip
drwxr-xr-x 13  504 games     4096 Mar  5 16:33 httpd-2.4.52
-rw-r--r--  1 root root   7439184 Mar  4 00:25 httpd-2.4.52.tar.bz2
drwxrwxr-x 19 root root      4096 Mar  5 17:14 php-7.4.28
-rw-r--r--  1 root root  10418352 Mar  3 23:59 php-7.4.28.tar.xz
drwxr-xr-x  5 1006  1006     4096 Mar  3 03:00 wordpress
  w-r--r--  1 root root  19461582 Mar  3 21:01 wordpress-5.9.1-zh_CN.tar.gz
[root@apache-ip47 src]# mv wordpress/ /data
[root@apache-ip47 src]# setfacl -R -m u:apache:rwx /data/wordpress/
或
[root@apache-ip47 src]# chown -R apache.apache /data/wordpress   


#準備discuz程式代碼檔案
[root@apache-ip47 src]# ll Discuz/ 
total 128
-rw-r--r--  1 root root 17892 Jan 31 09:45 LICENSE
-rw-r--r--  1 root root 26774 Sep 22 11:29 qqqun.png
drwxr-xr-x  2 root root   124 Feb  6 23:03 readme
-rw-r--r--  1 root root 71393 Jan 31 14:53 readme.html
drwxr-xr-x 13 root root  4096 Feb  6 23:03 upload
-rw-r--r--  1 root root   142 Jan 29 17:51 utility.html
[root@apache-ip47 src]# mv Discuz/upload/ /data/discuz
[root@apache-ip47 src]# setfacl -R -m u:apache:rwx /data/discuz/
或
[root@apache-ip47 src]# chown -R apache.apache /data/discuz/
[root@apache-ip47 src]#      

4.6 程序和監聽端口查詢及分析

[root@apache-ip47 src]# pstree
systemd─┬─NetworkManager───2*[{NetworkManager}]
        ├─chronyd                           #時鐘同步程序
        ├─httpd───4*[httpd───26*[{httpd}]]  #apche 程序
        ├─php-fpm───3*[php-fpm]             #php程序

[root@apache-ip47 src]# 
[root@apache-ip47 src]# ss -tlnp
State       Recv-Q Send-Q                    Local Address:Port                                   Peer Address:Port    
LISTEN      0      511                           127.0.0.1:9000                                              *:*                   users:(("php-fpm",pid=16831,fd=9),("php-fpm",pid=16433,fd=9),("php-fpm",pid=16432,fd=9),("php-fpm",pid=16431,fd=7))
LISTEN      0      511                                [::]:80                                             [::]:*                   users:(("httpd",pid=16795,fd=4),("httpd",pid=16710,fd=4),("httpd",pid=16709,fd=4),("httpd",pid=16708,fd=4),("httpd",pid=3609,fd=4))
# 可以看到上面的 php-fpm是監聽在TCP9000端口上的,這個模式是可以将apache 和 PHP 兩個功能再拆到不同的伺服器上去部署的。如果确定apache 和 PHP放同一台機器上,可以修改成UDS模式,效率會更高些,後面的章節内我們将介紹      

5. 站點初始化、測試及通路

基本任務:在WIN10的HOSTS檔案内修改好,域名和主機的對應關系。 檔案路徑 C:\Windows\System32\drivers\etc\hosts ,在此檔案最後加上192.168.250.47 blog.shone.cn forum.shone.cn 行,模拟DNS解析。

5.1 wordpress部落格網站初始化

實戰案例:編譯安裝基于 FastCGI 模式LAMP架構多虛拟主機WEB應用(WordPress 和Discuz)

此步驟的位址,使用者名和密&碼是在安裝資料庫時設定好的,需要對應并設定正确。

實戰案例:編譯安裝基于 FastCGI 模式LAMP架構多虛拟主機WEB應用(WordPress 和Discuz)
實戰案例:編譯安裝基于 FastCGI 模式LAMP架構多虛拟主機WEB應用(WordPress 和Discuz)

5.2 Discuz論壇網站初始化

實戰案例:編譯安裝基于 FastCGI 模式LAMP架構多虛拟主機WEB應用(WordPress 和Discuz)
實戰案例:編譯安裝基于 FastCGI 模式LAMP架構多虛拟主機WEB應用(WordPress 和Discuz)
實戰案例:編譯安裝基于 FastCGI 模式LAMP架構多虛拟主機WEB應用(WordPress 和Discuz)

此步驟的位址,使用者名和密&碼是在安裝資料庫時設定好的,需要對應并設定正确。

實戰案例:編譯安裝基于 FastCGI 模式LAMP架構多虛拟主機WEB應用(WordPress 和Discuz)

6. Apache和php-fpm之間改成UDS模式

## 修改 www.conf
[root@apache-ip47 src]# vim /apps/php/etc/php-fpm.d/www.conf
.............................
# 注釋掉下面行
;listen = 127.0.0.1:9000

; Set listen(2) backlog.
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
;listen.backlog = 511

; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions. The owner
; and group can be specified either by name or by their numeric IDs.
; Default Values: user and group are set as the running user
;                 mode is set to 0660
;listen.owner = nobody
;listen.group = nobody
;listen.mode = 0660

listen = /run/php-fpm.sock
#注意:/run/php-fpm.sock 表達格式要和後面的httpd裡面的完全一緻,耽誤很長時間排錯,是因為httpd内掉了“-”,成了 phpfpm.sock,總是報503錯誤
listen.owner = apache
listen.group = apache
listen.mode = 0660                                                                                                    

[root@apache-ip47 <sub>]# systemctl restart php-fpm
[root@apache-ip47 </sub>]# ll /run/php-fpm.sock          
srw-rw---- 1 apache apache 0 Mar  7 20:47 /run/php-fpm.sock
[root@apache-ip47 ~]# 

## 過濾出全部有效配置行
[root@apache-ip47 src]# cat /apps/php/etc/php-fpm.d/www.conf | grep -v "^;" | grep  -v "^\s*$"
[www]
user = apache
group = apache
listen = /run/php-fpm.sock
listen.owner = apache
listen.group = apache
listen.mode = 0660
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.status_path = /fpm_status
ping.path = /ping
[root@apache-ip47 src]# 



## 修改 httpd.conf
[root@apache-ip47 src]#vim /apps/httpd/conf/httpd.conf
....................
<virtualhost *:80>
servername blog.shone.cn
documentroot /data/wordpress
<directory /data/wordpress>
require all granted
</directory>
#ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/data/wordpress/$1
ProxyPassMatch ^/(.*\.php)$ "unix:/run/php-fpm.sock|fcgi://localhost/data/wordpress/"
#ProxyPassMatch ^/(fpm_status|ping)$ fcgi://127.0.0.1:9000/$1
ProxyPassMatch ^/(fpm_status|ping)$ "unix:/run/php-fpm.sock|fcgi://localhost/"
CustomLog "logs/access_wordpress_log" common
</virtualhost>

<virtualhost *:80>
servername forum.shone.cn
documentroot /data/discuz
<directory /data/discuz/>
require all granted
</directory>
#ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/data/discuz/$1
ProxyPassMatch ^/(.*\.php)$ "unix:/run/php-fpm.sock|fcgi://localhost/data/discuz/"                                           
#ProxyPassMatch ^/(fpm_status|ping)$ fcgi://127.0.0.1:9000/$1
ProxyPassMatch ^/(fpm_status|ping)$ "unix:/run/php-fpm.sock|fcgi://localhost/"
CustomLog "logs/access_discuz_log" common
</virtualhost>
...................

## 過濾出有效配置行

[root@apache-ip47 src]# cat /apps/httpd/conf/httpd.conf | grep -v "#" | grep -v "^\s*$"
ServerRoot "/apps/httpd"
Listen 80
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule filter_module modules/mod_filter.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
<IfModule !mpm_prefork_module>
</IfModule>
<IfModule mpm_prefork_module>
</IfModule>
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
<IfModule unixd_module>
user apache
group apache
</IfModule>
ServerAdmin [email protected]
ServerName 0.0.0.0:80
<Directory />
    AllowOverride none
    Require all denied
</Directory>
DocumentRoot "/apps/httpd/htdocs"
<Directory "/apps/httpd/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>
<IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>
AddType application/x-httpd-php .php
ProxyRequests Off
<virtualhost *:80>
servername blog.shone.cn
documentroot /data/wordpress
<directory /data/wordpress>
require all granted
</directory>
ProxyPassMatch ^/(.*\.php)$ "unix:/run/php-fpm.sock|fcgi://localhost/data/wordpress/"
ProxyPassMatch ^/(fpm_status|ping)$ "unix:/run/php-fpm.sock|fcgi://localhost/"
CustomLog "logs/access_wordpress_log" common
</virtualhost>
<virtualhost *:80>
servername forum.shone.cn
documentroot /data/discuz
<directory /data/discuz/>
require all granted
</directory>
ProxyPassMatch ^/(.*\.php)$ "unix:/run/php-fpm.sock|fcgi://localhost/data/discuz/"
ProxyPassMatch ^/(fpm_status|ping)$ "unix:/run/php-fpm.sock|fcgi://localhost/"
CustomLog "logs/access_discuz_log" common
</virtualhost>
<Files ".ht*">
    Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "logs/access_log" common
</IfModule>
<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/apps/httpd/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "/apps/httpd/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>
<IfModule headers_module>
    RequestHeader unset Proxy early
</IfModule>
<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

[root@apache-ip47 src]# systemctl restart httpd php-fpm.service
[root@apache-ip47 src]# systemctl enable --now  httpd php-fpm.service   
[root@apache-ip47 src]# systemctl status httpd php-fpm.service    
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-03-07 22:18:50 CST; 10s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 21025 ExecStop=/apps/httpd/bin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 21036 ExecStart=/apps/httpd/bin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 21041 (httpd)
   CGroup: /system.slice/httpd.service
           ├─21041 /apps/httpd/bin/httpd -k start
           ├─21042 /apps/httpd/bin/httpd -k start
           ├─21043 /apps/httpd/bin/httpd -k start
           └─21044 /apps/httpd/bin/httpd -k start

Mar 07 22:18:50 apache-ip47 systemd[1]: Starting The Apache HTTP Server...
Mar 07 22:18:50 apache-ip47 systemd[1]: Started The Apache HTTP Server.

● php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-03-07 22:18:50 CST; 10s ago
 Main PID: 21031 (php-fpm)
   CGroup: /system.slice/php-fpm.service
           ├─21031 php-fpm: master process (/apps/php/etc/php-fpm.conf)
           ├─21039 php-fpm: pool www
           └─21040 php-fpm: pool www

Mar 07 22:18:50 apache-ip47 systemd[1]: Started The PHP FastCGI Process Manager.


## <strong>用戶端重新重新整理,部落格和論壇都正常登入。</strong>      

繼續閱讀