Install Nginx on CentOS6 system
1 Download an rpm package from nginx official website, the download address is :http://nginx.org/en/download.html wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm 2 Install this rpm package rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm An error message will appear during the installation process: warning: nginx-release-centos-6-0.el6.ngx.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY I don’t know what to do, just ignore it 3 Start to install nginx formally yum install nginx A lot of information will be displayed, asking if you are ok or not: Is this ok [y/N]: Enter y, and the installation will be completed after the screen scrolls for a while, and finally the prompt “Complete!” means the installation is complete. 4 Several default directories of nginx whereis nginx nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx 1 Configuration directory: /etc/nginx/ 2 PID directory: /var/run/nginx.pid 3 Error log: /var/log/nginx/error.log 4 Access log: /var/log/nginx/access.log 5 Default site directory: /usr/share/nginx/html 5 common commands 1 Start nginx: nginx 2 Restart nginx: killall -HUP nginx 3 Test nginx configuration: nginx -t 6 Nginx cannot be accessed from outside the site? A common problem when nginx is just installed is that it cannot be accessed outside the site, and the local wget and telnet are normal. Except for the server, neither other hosts on the LAN…