Nginx in the linux environment (centos7) is mounted, load balancing is provided

Study of the front windows environment nginx deployment and load balancing, high availability next investigated, i.e. two nginx a main one server, the primary server linked to the case, the top of the backup server. The basic scheme are in line with keepalived to use. Who knows keepalived no windows version, it can only be deployed in the linux environment. Oh, great, wasted half the previous study, research had to install and deploy linux environment. In this paper, some of the points during the recording.

1, I never had linux, how to operate basic two of a smear. We can only rely on the Almighty Baidu. More online program is centos7 + nginx + keepalived program, so first of all a company's network ready virtual machine 2 centos7 of.

 

2, a quick remote centos machines? Online information that there are a variety of tools, network management said adults with ssh. What is ssh? I do not know, Baidu chant, my windows environment, you must first install ssh. Baidu own right, this is simple.

 

3, into the windows powershell, type ssh [email protected] Enter, even on, enter the password (input information is not displayed, you do not have to know the right input) login system. is the root login account, 172.16.170.41 is the ip of the server.

  

 

 

4, the latter in full accordance with the online posts did you like, I will not nonsense. This can refer to follow the advice on the line: https://blog.csdn.net/wudinaniya/article/details/81281016  I installed version 1.16.1, the last start it with this post is slightly different, exactly the same as the other. The whole process get a long, time-consuming mainly because of linux commands are not familiar with, used to the windows environment for people who, linux command line is simply against humanity ah.

 

5, I put the main command procedure used out about:

  - Go to the directory: cd aaa; return to the parent directory: cd ..; directly back to the root directory: cd \; view current information in the directory: ls;

  - edit the nginx configuration file: vi nginx.conf; after entering the browsing mode, according to "i" key to enter insert mode editing; After modifying the file, press the "esc" key to return to Browse mode, then press ":" key, enter wq save and exit, if you enter q! He said they did not save and exit. This is what a mess command! It's people doing things right?

  

6, start nginx: into sbin directory, type ./nginx start the service. ./nginx -s reload to reload the configuration file; ./ nginx -s stop close the service.

 

7, see the results of it, 53 were randomly assigned to go with the 54, OK. Specific load configuration to see that post nginx load the configuration of the windows environment, the same.

 

 

 

Guess you like

Origin www.cnblogs.com/coldlight/p/11899690.html