nginx service I Introduction and installation
Keywords:
Nginx
iptables
firewall
yum
1, nginx introduction
1.nginx service function:
- a)web Services
- b) Responsible for balancing
- c)web cache
2. Advantages of nginx service:
- a) Simple and flexible configuration
- b) High concurrency (static small file)
- c) Less resources
- d) Various functions
- e) Support epoll model
- f) There are differences between matching dynamic services and Apache
- g) Can limit the IP speed and the number of connections
2, nginx service web deployment
1. Installation Preparation
[root@nginx ~]
[root@nginx ~]
[root@nginx ~]
[root@nginx ~]
2. Compile and install nginx
[root@nginx ~]
[root@nginx nginx-1.6.2]
[root@nginx nginx-1.6.2]
--prefix=/usr/local/nginx-1.6.2 --with-http_stub_status_module --with-http_ssl_module
[root@nginx nginx-1.6.2]
[root@nginx nginx-1.6.2]
[root@nginx nginx-1.6.2]
3. Start nginx preparation
3.1 configure environment variables
[root@nginx nginx-1.6.2]
[root@nginx ~]
PATH=/application/nginx/sbin/:$PATH
[root@nginx ~]
3.2 check syntax
[root@nginx nginx]
nginx: the configuration file /usr/local/nginx-1.6.2/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx-1.6.2/conf/nginx.conf test is successful
3.2 boot
[root@nginx nginx]
[root@nginx nginx]
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4920/nginx
4. Turn off firewall, SE
[root@nginx nginx]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@nginx nginx]
5. Web access
6. Deploy a site
6.1 modify the content of the first page
[root@nginx nginx]
Welcome to https://blog.csdn.net/liang_operations
6.2 refresh web page
Posted by Edward on Wed, 08 Jan 2020 08:32:35 -0800