一、安装包
下载地址:http://nginx.org/packages/
本文下载:http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.16.1-1.el7.ngx.x86_64.rpm
二、安装
# 上传nginx-1.16.1-1.el7.ngx.x86_64.rpm至服务器后,安装
rpm -ivh --nodeps nginx-1.16.1-1.el7.ngx.x86_64.rpm
安装后目录说明:
- /etc/nginx/ :Nginx 配置文件
- /usr/share/nginx/ :包含各种静态文件,如图像和 HTML 文件
- /usr/lib64/nginx/ :Nginx 二进制文件
- /var/log/nginx/ :Nginx 日志文件
三、启停
# 启动
sudo systemctl start nginx
sudo systemctl restart nginx
# 停止
sudo systemctl stop nginx
# 自动启动
sudo systemctl enable nginx
标签:x86,nginx,sudo,Nginx,启停,64,rpm
From: https://www.cnblogs.com/DeepInThought/p/17292185.html