LVS + lamp configuration procedure

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.