安裝nginx
在[官方指導(dǎo)安裝頁面][1]可以看到安裝方法如下:
Official Red Hat/CentOS packages
To add NGINX yum repository, create a file named /etc/yum.repos.d/nginx.repo and paste one of the configurations below:
CentOS:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
按照官方的方法诡曙,新建一個文件/etc/yum.repos.d/nginx.repo,內(nèi)容是以[nginx]開頭的配置弹惦。
然后
yum install nginx
即可安裝成功。
[1]: https://www.nginx.com/resources/wiki/start/topics/tutorials/install/