离线配置nginx
一、下载rpm包
Index of /packages/centos/7/x86_64/RPMS/ (nginx.org)
http://nginx.org/packages/centos/7/x86_64/RPMS/
选择需要的包
上传到linux中
二、执行安装
yum install -y nginx-1.22.0-1.el7.ngx.x86_64.rpm
三、启动Nginx并设置开机启动
sudo service nginx start
#或者
sudo systemctl start nginx.service
sudo systemctl enable nginx.service
四、查看nginx启动状态
sudo service nginx status
sudo systemctl status nginx.service
五、查看nginx位置
whereis nginx
sudo whereis nginx
六、找到nginx下的html位置
cd /usr/share/nginx/html
nx下的html位置
cd /usr/share/nginx/html