650) This. width = 650; "Title =" Clipboard "style =" border-top: 0px; border-Right: 0px; border-bottom: 0px; border-left: 0px; display: inline "border =" 0 "alt =" Clipboard "src =" http://img1.51cto.com/attachment/201409/7/1080241_1410090136I1Ur.png "" 963 "Height =" 617 "/>
1. the NFS server provides a unified PHP program for the Web server. The shared file directory is/webdata. The configuration file (/etc/exports) is set as follows.
/Webdata 172.16.2.10 (RW, no_root_squash) 172.16.2.15 (RW, no_root_squash)
Start the NFS service after modifying the configuration file
# Service NFS start
Upload the discuz file to/webdata,
2. MySQL authorizes two Web servers to execute the following command.
# MySQL
Mariadb [BBS]> grant all on BBS. * To 'bbsadmin' @ '2017. 16.2.10 'identified by 'bbsadmin ';
Mariadb [BBS]> grant all on BBS. * To 'bbsadmin' @ '2017. 16.2.15 'identified by 'bbsadmin ';
Mariadb [BBS]> flush privileges;
3. The two web server gateways direct to dip. Other configurations are as follows:
# Mount-t nfs 172.16.2.14:/webdata
# Yum-y install PHP
# Yum-y install PHP-MySQL
# Vim/etc/httpd/CONF/httpd. conf modify the following two lines:
DocumentRoot "/webdata"
Directoryindex index. php index.html
# Service httpd start
# Chown-r Apache/webdata this command only needs to be executed on a Web server.
4. Configure The LVS debugger. Before configuration, make sure that the iptables rule does not affect ipvs rules.
# Ipvsadm-a-t 192.168.1.105: 80-s rr
# Ipvsadm-a-t 192.168.1.105: 80-r 172.16.2.10-m
# Ipvsadm-a-t 192.168.1.105: 80-r 172.16.2.15-m
5. Access http: // 192.168.1.105 to install the discuz program.
650) This. width = 650; "Title =" Clipboard [1] "style =" border-top: 0px; border-Right: 0px; border-bottom: 0px; border-left: 0px; display: inline "border =" 0 "alt =" Clipboard [1] "src =" http://img1.51cto.com/attachment/201409/7/1080241_1410090140XKDA.png "" 703 "Height =" 527 "/>
LVS + lamp configuration procedure