Linux CentOS 通过 YUM 安装 NGINX 【教程】
CentOS 通过 YUM 安装 NGINX
添加源
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
安装NGINX
sudo yum install -y nginx
直至出现 Complete!
启动NGINX服务
sudo systemctl start nginx.service
启动后在浏览器上访问,网页出现一下说明安装成功
Nginx常用命令
查看版本:nginx -v
检查配置文件:nginx -t
启动:systemctl start nginx.service
停止:systemctl stop nginx.service
重启:systemctl restart nginx.service
设置开机自启动:systemctl enable nginx.service
停止开机自启动:systemctl disable nginx.service
查看当前状态:systemctl status nginx.service
Linux CentOS 通过 YUM 安装 NGINX 【教程】
http://localhost:8090//archives/linuxcentostong-guo-yuman-zhuang-nginx-jiao-cheng-