007day -- common linux commands for nginx and nfs services, 007day -- linuxnginx

Source: Internet
Author: User

007day -- common linux commands for nginx and nfs services, 007day -- linuxnginx

Job:

Cluster creation

1. Deploy nginx reverse proxy for three web services. The scheduling algorithm uses Weighted Round Robin;

2. All web services use shared storage nfs to ensure that all web services have read and write permissions and ensure data consistency;

I. nginx Service

1. install yum install epel-release-y first

 

2. If no epel source is found after installation, just reinstall it once.

 

3. Start nginx Installation

 

4. view the configuration file

 

5. Install rpcbind and nfs

 

Ii. Cluster construction 1. Deployment of nginx reverse proxy three web services, scheduling algorithm using Weighted Round Robin;
Weighted Round Robin of Scheduling Algorithms
Reverse Proxy

 

 

2. location file address

 

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

Change the write content to web1 web2 web3 in sequence

 

Web page query 192.168.19.129

 

 

Web page query 192.168.19.130

 

 

Web page query 192.168.19.131

 

The first three round robin tasks of the weighted round robin algorithm are web1, followed by web1 web2 web3.

 

2. All web services use shared storage nfs to ensure that all web services have read and write permissions and ensure data consistency;

1. Install the required nfs service software

Yum install rpcbind nfs-utils-y

Create a share directory

Mkdir/share
Touch/share/cmd.txt
Echo cmd_file>/share/cmd.txt
Vim/etc/exports

 

2. Configuration File Content

 

3. Start the service

Systemctl start rpcbind. service
Systemctl start nfs-server.service

 

 

4. Set startup

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 web users have read and write permissions.

 

8. Create a file under web1

 

 

9.in web2, you can see web1.txt. Now, in web2, click Delete. txt, and then click Delete successfully under web3. TXT.

 

10. Delete the TXT file.

 

11. Now all web services use shared storage nfs. All web Services have read and write permissions and data consistency.

 

 

 

 

 

 

 








 

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.