1, installation download Rpm:wget http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.10.0-1.el7.ngx.x86_64.rpm
Installation: Rpm-ivh nginx-1.10.0-1.el7.ngx.x86_64.rpm
If you can't find wget, please install, command: yum-y install wget 2, after the successful installation nginx several default directory input commands: Whereis nginx Execution Directory:/usr/sbin/nginx module Directory:/usr/lib64/nginx/modules configuration directory:/etc/nginx/default Site Directory:/usr/share/nginx/html main profile:/etc/nginx/nginx.conf Point:/etc/nginx/conf.d/default.conf pid directory:/var/run/nginx.pid error log:/var/log/nginx/error.log access log:/var/log/ Nginx/access.log 3, view nginx status (before boot) command 1:SYSTEMCTL status Nginx.service
4, start, stop, Overload command Systemctl start Nginx.service systemctl stop nginx.service systemctl Reload sys Temctl status Nginx.service 5, view nginx status and process and port (after startup) command 1:systemctl status Nginx.service
The above Nginx has been installed successfully ...
Command 2:NETSTAT-ANTP | grep:80 (see which service is occupied by port 80) or netstat-antpuel | grep ":" | gr Ep -v grep (Worry-grep itself) Command 3:NETSTAT-ANTP | grep: (View all port occupancy) command 4:ps aux | grep nginx (view Nginx process run state) or PS aux | grep:80 | Grep-v grep (Worry-grep itself) 6, kill process command a) related nginx all killed: killall-9 nginx B) Kill the PID two process: kill-9 pid1 and kill-9 pid1 7, view version &nbs P Command: Nginx-v