Loading... # 安装源 先添加中科大的镜像repo ```bash vim /etc/yum.repos.d/nginx.repo ``` 使用mainline最新版本的repo ```yml [nginx-mainline] name=nginx mainline repo baseurl=http://mirrors.ustc.edu.cn/nginx/mainline/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 module_hotfixes=true ``` # 直接yum 安装 ```shell yum install -y nginx ``` # 启动 nginx ```nginx systemctl start nginx.service ``` # 设置nginx为开机启动 ```nginx systemctl enable nginx.service ``` End ~ 最后修改:2020 年 09 月 29 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏