
上QQ阅读APP看书,第一时间看更新
Packages – RHEL/CentOS
To install the latest NGINX release, add the NGINX mainline repository by adding the following to /etc/yum.repos.d/nginx.repo:
[nginx] name=nginx repo baseurl=http://nginx.org/packages/mainline/OS/OSRELEASE/$basearch/ gpgcheck=0 enabled=1
You'll also need to replace OS with either rhel or centos, and replace OSRELEASE with 5, 6, or 7, for your correct release.
You can check your version by running cat /etc/redhat-release.
Once you have the repository installed, refresh the packages and then install NGINX.
yum update
yum install nginx
If you have any issues, double check your repository for the correct syntax.
For further information, refer to the official documentation at http://nginx.org/en/linux_packages.html#mainline.