007day--linux Common Command Nginx and NFS Services

Source: Internet
Author: User
Tags nginx reverse proxy

Homework:

Cluster construction

1, the deployment of Nginx reverse proxy three Web services, scheduling algorithm using weighted polling;

2, all Web services use shared storage NFS, to ensure that all the web has read and write permissions to ensure data consistency;

First, Nginx service

1. Install the Yum install Epel-release-y first

2. After installation found no Epel source, re-install it again

3. Start installing Nginx

4. View the configuration file

5. Installing Rpcbind and NFS

second, cluster construction   1, the deployment of Nginx reverse proxy three Web services, scheduling algorithm using weighted polling;
Scheduling algorithm weighted round polling
Reverse Proxy

2.location file Address

3.vim/var/www/html/index.html

Change the contents of the write to Web1 web2 web3

Web Query 192.168.19.129

Web Query 192.168.19.130

Web Query 192.168.19.131

Scheduling algorithm weighted round polling three times are web1, followed by Web1 web2 WEB3 Polling

2, all Web services use shared storage NFS, to ensure that all the web has read and write permissions to ensure data consistency;

1. Install the required NFS service software

Yum Install Rpcbind nfs-utils-y

Create a new Share directory

Mkdir/share
Touch/share/share.txt
Echo Share_file >/share/share.txt
Vim/etc/exports

2. configuration file Contents

3. Start the service

Systemctl Start Rpcbind.service
Systemctl Start Nfs-server.service

4. set boot up

Systemctl Enable Nfs-server.service

Systemctl Enable Rpcbind.service

5. View

6. Mount and view content

7. Add write permissions to other users to ensure that all the web has read and write access to it

8. Build a file under Web1

9. In the WEB2 can see Web1.txt, now in web2 bar share.txt Delete, and then to WEB3 to see whether the successful deletion share.txt

10., if you delete the Share.txt

11. All Web services now use shared storage for NFS, all the web has read and write access to it, and data is consistent








007day--linux Common Command Nginx and NFS Services

Related Article

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.