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