CENTOS7 nginx Install/boot/process status/kill process __centos7

Source: Internet
Author: User
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

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.