阅读508 返回首页    go 阿里云 go 技术社区[云栖]


阿里云centos7 安装nginx

1.添加yum源(参考官方文档)
To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with the following contents:

[nginx]
name=nginx repo
baseurl=https://nginx.org/packages/OS/OSRELEASE/$basearch/
gpgcheck=0
enabled=1

Replace “OS” with “rhel” or “centos”, depending on the distribution used, and “OSRELEASE” with “6” or “7”, for 6.x or 7.x versions, respectively.

centos7的yum正确姿势是这样:

[nginx]
name=nginx repo
baseurl=https://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1

2.使用yum安装nginx

yum install nginx

3.查看nginx配置文件

cd /etc/nginx 

最后更新:2017-10-07 23:04:04

  上一篇:go 云栖大会上那么多黑科技,独得恩宠的它怎么还不争气?
  下一篇:go  阿里云服务器中使用ftp功能 (centos7)