CentOS中nginx的安装

centOS中nginx安装

系统版本:centOS7.4

nginx安装

1、 判断有无Nginx的源

yum search nginx

无源:先安装源

sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

2、 安装nginx

sudo yum install -y nginx

3、 启动、停止、重启 nginx

//  启动
sudo systemctl start nginx.service
//  停止
sudo systemctl stop nginx.service
//  重启
sudo systemctl restart nginx.service 

nginx开机启动 配置

    原文作者:An_0313
    原文地址: https://www.jianshu.com/p/e847b6259719
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞