php working mode: phpin lamp There are three working modes in the environment:CGI mode,apachemodule,FastCGImode. CGI Run in modePHP, the performance is not very good. Asapache runs in module mode, compiled and installed in previous courseslamphas been introduced. FastCGI The way andapacheThe difference between the modules is:FastCGI< /span>MethodPHPis an independent process, allPHPAll child processes are controlled by PHP strong>The one calledphp-fpmThe component is responsible for management; andapache Modular operation< strong>PHP, it isapacheResponsible for calling strong>PHPComplete the work. PHP 的< span style="font-family:Calibri;">FastCGIMethod Performance is better thanapache< /strong>The modular approach is much stronger. Today we use FastCGICompile and install method lamp.
FastCGIWorking mechanism: First, the client initiates a request, and the request is divided into 2 two kinds, one is static It can be requested directly byApacherespond directly to the return; the other is a dynamic request, such as it contains< /strong>php orPerlThis script interpretation Sex language, byApacheServer passfastcgiProtocol callphp< /span>The server executes and returns toApachebyApacheBack to explanation The result after execution, if the operation of data is involved in this process, at this timephpThe server will still pass span>mysqlprotocol callmysqlserver.
Compilation environment and software versions:< /span>
Linux |
Web< /span>Server |
Php |
MysqlDatabase |
xcache |
Centos7.2< /p> |
Httpd-2.4.23 strong> |
php-5.4.26 |
Mysql5.7 span> |
xcache-3.1.0 |
The allocation is as follows:
1Taiwanhttpd< /strong>Server (192.168.31.83)
1台< /span>php< strong>Server (< span style="font-family:Calibri;">192.168.31.141)
1TaiwanmysqlServer (192.168.31.225 )
< p>Compile and install
Compile and installapache(Please refer to the previous< /span>apache< strong>Installation< span style="font-family:Calibri;">)
Compile and installmysql(Please refer tomysqlInstall)
FastCGIInstallation method< /strong>php
< p>1, resolve dependencies
[root@phplichao ~]# yum -yinstall libxml2-devel libcurl-devel openssl-devel bzip2-devel
Installlibmcrypt
[root@phplichao ~]# tar zxflibmcrypt-2.5.7.tar.gz
[root@phplichao ~]# cdlibmcrypt-2.5.7/
[[email protected]]# ./configure –prefix= /usr/local/libmcrypt && make&& make install
2, compile and install span>php p>
[root@phplichao ~]# tar zxfphp-5.6.27.tar. gz
[root@phplichao ~]# cdphp-5.6.27/< /p>
[root@phplichao php-5.6.27]#./configure- -prefix=/usr/local/php5.6 –with-mysql=mysqlnd–with-pdo-mysql=mysqlnd –with-mysqli=mysqlnd –with-openssl –enable-fpm–enable-sockets- -enable-sysvshm –enable-mbstring –with-freetype-dir–with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir=/usr –enable-xml –with-mhash –with-mcrypt=/usr/local/libmcrypt –with-config-file-path=/etc–with-config-file-scan-dir=/etc/php.d –with -bz2–enable-maintainer-zts
[root@phplichao php-5.6.27]#make&& make install
Explanation of related options:
–pref ix=/usr/local/php5.6//Installation location
–with-mysql= mysqlnd //supportmysql
–with-pdo-mysql=mysqlnd//< strong>supportpdoModule< /span>
–with-mysqli=mysqlnd //support
Note: The role of the above three options: database andphpnot on a server, specify this method, Install the database connection driver
— with-openssl//support opensslModule
–enable-fpm//Supportfpm Mode
–enable-sockets//Enablesocketsupport
–enable-sysvshm//Enable system shared memory support
< strong>–enable-mbstring// Multi-byte strings, like our Chinese are multi-byte strings
< p>–with-freetype-dir//supportfreetype, to install span>freetype-devel , font-related, font analysis tools
–with-jpeg-dir
–with-png-dir
Note: The role of the above two options: processing jpeg,pngpicture, php< span style="font-family:'宋体';font-size:19px;">Can be dynamically generatedjpegpicture span>
–with-zlib//< /span>is a compression library, used to compress transmission during Internet transmission span>
–with-libxml-dir= /usr//this< strong>libxmlis used to parsexml, specified /usr下
< span style="font-family:Calibri;">–enable-xml //Supportxml span>的
–with-mhash//
–with-mcrypt=/usr/local/libmcrypt//libmcrypt-develSpecified by this package
–with-config-file-path=/etc//Specify the storage path of the configuration file
–with-config-file-scan-dir=/etc/php.d //Configuration file scanning path
–with-bz2 //supportBZip2< /span>
For supportapache的workeroreventThese twoMPM, used when compiling –enable-main tainer-ztsOptions p>
if usedPHP5.3The above version, for linkingMySQL Database, you can specifymysqlnd, so you don’t need to install it on this machineMySQLor< /span>MySQLThe development kit is now available. mysqlnd From< span style="font-family:Calibri;">php5.3Starting to be available, you can bind to it at compile time (instead of specificMySQLThe client library is bound to form a dependency), But fromPHP 5.4< /strong>It is the default setting at the beginning.
3< /span>, providedphpConfiguration file
[root@phplichao php-5.6.27]#cp php.ini-production /etc/php.ini
4、为 php-fpmProvide script< /p>
[root@phplichao php-5.6.27]# cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
[root@phplichao php-5.6.27]#chmod +x /etc/init.d/php-fpm span>
[root@phplichao php-5.6. 27]#chkconfig –add php-fpm
[root@phplichao php-5.6.27]#chkconfig php-fpm on
5, providephp- fpmConfiguration file and edit:
# cp/usr/local/php5.6 /etc/php-fpm.conf.default /usr/local/php5.6/etc/php-fpm.conf
[root@phplichao ~]# vi/usr/local/php5.6/etc/php-fpm.conf span>
The revised content is as follows:< /strong>
pid = run/php-fpm.pid span>
listen = 192.168. 31.141:9000
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
启动php-fpm服务:
[root@phplichao ~]#service php-fpm start
Starting php-fpm done
[root@phplichao ~]# netstat-anpt | grep php-fpm
tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN 25456/php-fpm: mast
[root@phplichao ~]#firewall-cmd –permanent –add-port=9000/tcp
success
[root@phplichao ~]#firewall-cmd –reload
Success
在该主机上新建虚拟主机目录用于存放网页文件
[root@phplichao ~]# mkdir -p/var/www/benet
至此php安装配置完毕,下面配置 span>apache通过fastcgi协议调用php
6、配置apache(切换到apache主机上操作 )
在Apache2.4以后已经专门有一个模块针对FastCGI的实现,此模块为mod_proxy_fcgi.so,它其实是作为mod_proxy.so模块的扩充,因此,这两个模块都要加载
LoadModule proxy_modulemodules/mod_proxy.so
LoadModule proxy_fcgi_modulemodules/mod_proxy_fcgi.so
[root@www ~]# apachectl -M |grep proxy
proxy_module(shared)
proxy_fcgi_module (shared)
建立一个目录作为虚拟主机的家目录
[root@www ~]# mkdir -p /var/www/benet
编辑主配置文件httpd.conf,开启虚拟主机
启用Include conf/extra/httpd-vhosts.conf
同时定位 AddType;添加下面两行:让apache能识别php格式的页面
AddTypeapplication/x-httpd-php .php
AddTypeapplication/x-httpd-php-source .phps
并且定位至DirectoryIndex:支持php格式的主页
DirectoryIndex index.phpindex.html #添加index.php(最好添加在最前面)
配置虚拟主机支持使用fcgi
[root@www ~]# vi/usr/local/http-2.4.23/conf/extra/httpd-vhosts.conf
ServerAdmin [email protected]
DocumentRoot “/var/www/benet”
ServerName www.benet.com
ServerAlias benet.com
ErrorLog “logs/benet.com-error_log”
CustomLog”logs/benet.com-access_log” common
ProxyRequests Off
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://192.168.31.141:9000/var/www/benet/$1
#
# ProxyPassfcgi://192.168.31.141:9000/var/www/benet
#
Options FollowSymLinks
AllowOverride None
Require all granted
其中:
ProxyRequests off #关闭正向代理
ProxyPassMatch:把以.php结尾的文件请求发送到php-fpm进程,php-fpm至少需要知道运行的目录和URI,所以这里直接在fcgi://192.168.31.141:9000后指明了这两个参数,其它的参数的传递已经被mod_proxy_fcgi.so进行了封装,不需要手动指定。
特别注意的是,红色字体部分需要与
ProxyPassMatch
只有满足特定正则模式的内容才会匹配并执行此规则,这里的模式是,^/(.*\.php(/.*)?)$
从网站(虚拟主机
^ (caret) 和 $ (dollar)标志要匹配的路径的开始和结束
( )括号里的内容可以用 $1 来表示,以方便后面引用它。
fcgi:// 192.168.31.141:9000通过mod_proxy_fcgi 来转发的代理,使用 fastCGI 协议,转到PHP-FPM 监听的端口。
/path/to/your/documentroot/
非常重要!必须与虚拟主机的路径匹配,且必须是对应 php 文件在操作系统中的绝对路径。否则会找不到文件。
$1可以从原始请求扩展成整个请求路径的变量,这里指代前面( ) 里面匹配的那个路径(uri)
充:Apache httpd 2.4以前的版本中,要么把PHP作为Apache的模块运行,要么添加一个第三方模块支持PHP-FPM实现。
测试LAMP环境:
在mysql主机上创建用于php服务器连接的mysql账户
mysql> grant all on *.*to testuser@’%’ identified by ‘123456;
注意防火墙要允许mysql连接。
在php服务器上的/var/www/benet目录下创建.php的测试页:
[root@phplichao ~]# cat/var/www/benet/index.php
phpinfo();< /strong>
?>
[root@phplichao ~]# cat/var/www/benet/test1.php
$link=mysql_connect(‘192.168.31.225′,’testuser’,’123456′);
if ($link)echo”connection success……”;
mysql_close();
?>
测试访问
7、压力测试
网站性能压力测试是服务器网站性能调优过程中必不可缺少的一环。只有让服务器处在高压情况下,才能真正体现出软件、硬件等各种设置不当所暴露出的问题。
性能测试工具目前最常见的有以下几种:ab、http_load、webbench、siege。今天我们专门来介绍ab。
ab是apache自带的压力测试工具。 ab非常实用,它不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试。比如nginx、tomcat、IIS等。
下面我们开始介绍有关ab命令的使用:
1. ab的原理
2. ab的安装
3. ab参数说明
4. ab性能指标
5. ab实际使用
6.测试nginx性能
1)ab的原理
ab是apachebench命令的缩写。
ab的原理:ab命令会创建多个并发访问线程,模拟多个访问者同时对某一URL地址进行访问。它的测试目标是基于URL的,因此,它既可以用来测试apache的负载压力,也可以测试nginx、lighthttp、tomcat、IIS< /span>等其它Web服务器的压力。
ab命令对发出负载的计算机要求很低,它既不会占用很高CPU,也不会占用很多内存。但却会给目标服务器造成巨大的负载,其原理类似CC攻击。自己测试使用也需要注意,否则一次上太多的负载。可能造成目标服务器资源耗完,严重时甚至导致死机。
2)ab的安装
ab的安装非常简单,如果是源码安装apache的话,那就更简单了。 apache安装完毕后ab命令存放在apache安装目录的bin目录下。如下:
/usr/local/http2.4.23/bin/ab
如果apache 是通过yum的RPM包方式安装的话,ab命令默认存放在/usr/bin目录下。如下:
which ab
注意:如果不想安装apache但是又想使用ab命令的话,我们可以直接安装apache的工具包httpd-tools。如下:
yum -y install httpd-tools
查看ab是否安装成功,可以切换到上述目录下,使用ab �CV命令进行检测。如下:
[root@www ~]#/usr/local/http-2.4.23/bin/ab -V
This is ApacheBench, Version2.3 <$Revision: 1748469 $>
Copyright 1996 Adam Twiss,Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The ApacheSoftware Foundation, http://www.apache.org/
3)ab参数说明
有关ab命令的使用,我们可以通过帮助命令进行查看。如下:
[root@cent05 ~]# ab–help
下面我们对这些参数,进行相关说明。如下:
-n:在测试会话中所执行的请求个数(即总请求数)。
-c:一次产生的请求个数(即并发用户数)。
[root@www ~]# ab-c 500 -n 10000 http://192.168.31.83/index.html
This isApacheBench, Version 2.3 <$Revision: 1748469 $>
Copyright 1996Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to TheApache Software Foundation, http://www.apache.org/
Benchmarking192.168.31.83 (be patient)
Completed 1000requests
Completed 2000requests
Completed 3000requests
Completed 4000requests
Completed 5000requests
Completed 6000requests
Completed 7000requests
Completed 8000requests
Completed 9000requests
Completed 10000requests
Finished 10000requests
ServerSoftware: Apache
ServerHostname: 192.168.31.83
Server Port: 80
Document Path: /index.html #请求的资源
DocumentLength: 312 bytes#HTTP响应数据的正文长度
ConcurrencyLevel: 500#并发个数(并发用户数)
Time taken fortests: 1.452 seconds# span>所有这些请求处理完成所花费的时间
Completerequests: 10000#完成请求数
Failedrequests: 0#失败的请求数
Non-2xxresponses: 10000
Totaltransferred: 4760000 bytes#
HTMLtransferred: 3120000 bytes# 表示所有请求的响应数据中正文数据的总和,也就是减去了Total transferred中HTTP响应数据中的头信息的长度。
Requests persecond: 7530.93 [#/sec] (mean) #吞吐量–每秒请求数。 计算公式:Complete requests/Time taken for tests
Time perrequest: 66.393 [ms] (mean) #用户平均请求等待时间,计算公式:Time token for tests/(Completerequests/Concurrency Level)。
Time perrequest: 0.133 [ms] (mean, acrossall concurrent requests)#服务器平均请求等待时间,计算公式:Time taken for tests/Complete requests。
Transferrate: 3500.71 [Kbytes/sec]received#表示这些请求在单位时间内从服务器获取的数据长度,计算公式:Total trnasferred/ Time taken for tests,这个统计很好的说明服务器的处理能力达到极限时,其出口宽带的需求量。 (即平均每秒网络上的流量)
Connection Times(ms)
min mean[+/-sd] median max
Connect: 10 27 7.3 27 48
Processing: 4 37 36.5 32 439
Waiting: 2 27 37.0 21 435
Total: 30 64 37.6 60 470
Percentage of therequests served within a certai n time (ms)
50% 60
66% 63
75% 64
80% 66
90% 71
95% 76
98% 89
99% 261
100% 470 (longest request)
这部分数据用于描述每个请求处理时间的分布情况,比如以上测试,80%的请求处理时间都不超过66ms,这个处理时间是指前面的Time per request,即对于单个用户而言,平均每个请求的处理时间。
继续压力测试
我们再来进行一次压力测试,此时并发用户数为1000,其他条件不变,查看两次测试结果的吞吐量差别
4)ab性能指标< /p>
在进行性能测试过程中有几个指标比较重要:
1、吞吐率(Requests per second)
服务器并发处理能力的量化描述,单位是reqs/s,指的是在某个并发用户数下单位时间内处理的请求数。某个并发用户数下单位时间内能处理的最大请求数,称之为最大吞吐率。
记住:吞吐率是基于并发用户数的。这句话代表了两个含义:
a、吞吐率和并发用户数相关
b、不同的并发用户数下,吞吐率一般是不同的
计算公式:总请求数/处理完成这些请求数所花费的时间,即
Request persecond=Complete requests/Time taken for tests
必须要说明的是,这个数值表示当前机器的整体性能,值越大越好。
2、并发连接数(The number of concurrent connections)
并发连接数指的是某个时刻服务器所接受的请求数目,简单的讲,就是一个会话。
3、并发用户数(Concurrency Level)
要注意区分这个概念和并发连接数之间的区别,一个用户可能同时会产生多个会话,也即连接数。
4、用户平均请求等待时间(Time per request)
计算公式:处理完成所有请求数所花费的时间/(总请求数/并发用户数),即:
Time perrequest=Time taken for tests/(Completerequests/Concurrency Level)
5、服务器平均请求等待时间(Time per request:across all concurrentrequests)
计算公式:处理完成所有请求数所花费的时间/总请求数,即:
Time takenfor/testsComplete requests
可以看到,它是吞吐率的倒数。
同时,它也等于用户平均请求等待时间/并发用户数,即
Time perrequest/Concurrency Level
8、CentOS7.2下安装php加速软件
说明:
php安装目录:/usr/local/php5.6
php.ini配置文件路径:/etc/php.ini
1)安装xcache
wgethttp://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz #下载
[root@phpserver ~]# tar zxfxcache-3.2.0.tar.gz #解压
[root@phpserver ~]# cdxcache-3.2.0/ #进入安装目录
[[email protected]]# /usr/local/php5.6/bin/phpize#用phpize生成configure配置文件
[[email protected]]# ./configure –enable-xcache –enable-xcache-coverager–enable-xcache-optimizer –with-php-config=/usr/local/php5.6/bin/php-config #配置
[[email protected]]# make && make install #编译、安装
Installing sharedextensions: /usr/local/php5.6/lib/php/extensions/no-debug-zts-20131226/
安装完成之后,出现下面的界面,记住以下路径,后面会用到
/usr/local/php5.6/lib/php/extensions/no-debug-zts-20131226/
2)创建xcache缓存文件
# touch /tmp/xcache
# chmod 777 /tmp/xcache
3)拷贝xcache后台管理程序到网站根目录
[[email protected]]# cp -r htdocs/ /var/www/benet/xcache
4)配置 php支持xcache
vi / etc/php.ini #编辑配置文件,在最后一行添加以下内容
[xcache-common]
extension =/usr/local/php5.6/lib/php/extensions/no-debug-zts-20131226/xcache.so
[xcache.admin]
xcache.admin.enable_auth =Off
[xcache]
xcache.shm_scheme=”mmap”
xcache.size=60M
xcache.count =1
xcache.slots =8K
xcache.ttl=0
xcache.gc_interval =0
xcache.var_size=64M
xcache.var_count =1
xcache.var_slots =8K
xcache.var_ttl=0
xcache.var_maxttl=0
xcache.var_gc_interval =300
xcache.test =Off
xcache.readonly_protection =Off
xcache.mmap_path=”/tmp/xcache”
xcache.coredump_directory=””
xcache.cacher =On
xcache.stat=On
xcache.optimizer =Off
[xcache.coverager]
xcache.coverager =On
xcache.coveragedump_directory=””
将xcache目录拷贝到 apache主机的网页文档目录下
[root@phpserver ~]# scp -r/var/www/benet/xcache/ [email protected]:/var/www/benet/
6)测试
service php-fpm restart #重启php-fpm
浏览器打开网站根目录下面的xcache
http://http://192.168.31.83/xcache可以看到如下页面:
至此,Linux下安装php加速软件Xcache教程完成
执行ab压力测试:
执行第一次压力测试:
[root@www ~]# ab -c 100 -n1000 http://192.168.31.83/index.php
This is ApacheBench, Version2.3 <$Revision: 1748469 $>
Copyright 1996 Adam Twiss,Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The ApacheSoftware Foundation, http://www.apache.org/
Benchmarking 192.168.31.83(be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests< /span>
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Hostname: 192.168.31.83
Server Port: 80
Document Path: /index.php
Document Length: 85006 bytes
Concurrency Level: 100
Time taken fortests: 1.773 seconds
Complete requests: 1000
Failed requests: 368
(Connect: 0, Receive: 0, Length: 368,Exceptions: 0)
Total transferred: 85259504 bytes
HTML transferred: 85013504 bytes
Requests persecond: 563.88 [#/s ec] (mean)
Time per request: 177.344 [ms] (mean)
Time per request: 1.773 [ms] (mean, across all concurrentrequests)
Transfer rate: 46948.95 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 2.7 0 16< /span>
Processing: 31 167 73.7 140 406
Waiting: 23 162 73.1 136 401
Total: 40 168 73.0 141 406
Percentage of the requestsserved within a certain time (ms)
50% 141
66% 152
75% 176
80% 188
90% 294
95% 389
98% 396
99% 400
100% 406 (longest request)
执行第二次压力测试
[root@www ~]# ab -c 100 -n1000 http://192.168.31.83/i ndex.php
This is ApacheBench, Version2.3 <$Revision: 1748469 $>
Copyright 1996 Adam Twiss,Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The ApacheSoftware Foundation, http://www.apache.org/
Benchmarking 192.168.31.83(be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Compl eted 1000 requests
Finished 1000 requests
Server Software: Apache
Server Hostname: 192.168.31.83
Server Port: 80
Document Path: /index.p hp
Document Length: 85006 bytes
Concurrency Level: 100
Time taken fortests: 1.264 seconds
Complete requests: 1000
Failed requests: 316
(Connect: 0, Receive: 0, Length: 316,Exceptions: 0)
Total transferred: 85257983 bytes
HTML transferred: 85011983 bytes
Requests persecond: 790.93 [#/sec] (mean)
Time per request: 126.434 [ms] (mean)
Time per request: 1.264 [ms] (mean, across all concurrentrequests)
Transfer rate: 65852.24 [Kbytes/sec] received
strong>
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 2.7 0 11
Processing: 33 120 20.6 120 180
Waiting: 28 115 20.0 115 179
Total: 44 121 19.2 121 180
50% 121
66% 124
75% 127
80% 128
90% 147
95% 159
98% 166
99% 169
100% 180 (longest request)
查看xcache的命中率:
9、部署bbs论坛
Discuz的程序文件解压,并且将upload中所有文件放置到网站目录(php服务器的操作)
#unzipDiscuz_7.0.0_FULL_SC_UTF8.zip -d discus
# mv discuz/upload/ /var/www/benet/bbs
设置php-fpm的服务用户为下面文件的属主或者对其设置写权限,否则安装时会报错
#cd /var/www/benet/bbs
#chown -R nobodyconfig.inc.php attachments/ forumdata/ uc_client/data/cache/ templates/
#chmod -R 777uc_server/data/
修改php.ini文件
short_open_tag = On
# service php-fpm restart
web服务器也需要有静态文件(apache服务器上操作)
#unzipDiscuz_7.0.0_FULL_SC_UTF8.zip -d discus
# mv Discuz/upload/ /var/www/benet/bbs
设置httpd strong>的服务用户对指定文件也需要有写权限
#cd /var/www/benet/bbs
#chown -R daemonconfig.inc.php attachments/ forumdata/ uc_client/data/cache/ templates/
在数据库服务器上创建bbs数据库及授权帐户
mysql> create databasebbsdb;
Query OK, 1 row affected(0.01 sec)
mysql> grant all onbbsdb.* to runbbs@’%’ identified by ‘pwd@123’;
Query OK, 0 rows affected, 1warning (0.03 sec)
置完成之后,输入httd://192. 168.31.83/bbs/install即可安装
填写数据库的相关信息,添加数据库服务器的地址和MariaDB创建的数据库和用户密码,而后在设置bbs的管理员帐号密码就可以继续安装了。
剩下的根据提示安装即可。
出现上面这种情况是由于php服务器安装了discuz之后导致程序发生变化从而导致动态服务器和静态服务器的程序不一致,只需要手动把bbs服务器的文件和web服务器进行一次同步即可,如果想实现自动同步,需要使用其他服务,如initory+rsync、sersync等工具。
#scp -r /var/www/benet/bbs/*[email protected]:/var/www/benet/bbs/
动态服务器和静态服务器同步文件之后,再次访问bbs的网址就正常了。
至此本环境论坛全部打好,只需要在简单的维护即可!买一个云主机IP输入自己的公网IP,就可以让广大网民访问了。