閱讀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)