기본 지식 - Nginx 설치 마 운 트 해제 및 상용 명령

1162 단어 Nginx
1. Ubuntu 온라인 설치
#  
apt-get update
apt-get install nginx

#  
sudo /etc/init.d/nginx start

  :
Usage: nginx {start|stop|restart|reload|force-reload|status|configtest|rotate|upgrade}

#  
sudo apt-get remove nginx nginx-common # Removes all but config files.

sudo apt-get purge nginx nginx-common # Removes everything.

sudo apt-get autoremove # After using any of the above commands, use this in order to remove dependencies used by nginx which are no longer required.

2. Centos 온라인 설치
#   yum  
sudo rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

#  
sudo yum install nginx

#    
sudo systemctl start nginx

#     
sudo systemctl restart nginx

#    ,          ,       ,          。
sudo systemctl reload nginx

#  
sudo systemctl stop nginx.service
sudo systemctl disable nginx.service
sudo userdel -r nginx
chkconfig nginx off
sudo rm -rf /etc/nginx
sudo rm -rf /var/log/nginx
sudo rm -rf /var/cache/nginx/
sudo rm -rf /usr/lib/systemd/system/nginx.service
yum remove nginx

3. 상용 명령
nginx -s reload #     ,     nginx  

좋은 웹페이지 즐겨찾기