CentOS tutorials for installing the latest version of Nginx through yum
This article focuses on "CentOS through yum installation of the latest version of Nginx tutorials", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the tutorial of CentOS installing the latest version of Nginx through yum.
You can view the official document http://nginx.org/en/linux_packages.html#RHEL-CentOS
Here is an excerpt from it. I won't translate it for the time being. I'll see what happens later.
Install the prerequisites:
Sudo yum install yum-utils
To set up the yum repository, create the file named / etc/yum.repos.d/nginx.repo with the following contents:
[nginx-stable] name=nginx stable repobaseurl= http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=1enabled=1gpgkey=https://nginx.org/keys/nginx_signing.keymodule_hotfixes=true[nginx-mainline]name=nginx mainline repobaseurl= http://nginx.org/packages/mainline/centos/$releasever/$basearch/gpgcheck=1enabled=0gpgkey=https://nginx.org/keys/nginx_signing.keymodule_hotfixes=true
By default, the repository for stable nginx packages is used. If you would like to use mainline nginx packages, run the following command:
Sudo yum-config-manager-enable nginx-mainline
To install nginx, run the following command:
Sudo yum install nginx
When prompted to accept the GPG key, verify that the fingerprint matches 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62, and if so, accept it.
At this point, I believe you have a deeper understanding of the "CentOS through yum installation of the latest version of Nginx tutorials", might as well to practical operation it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!