Download Latest Nginx
To install Nginx’s mainline repository in CentOS 7, run commands below to create a Nginx’s repository on your system
vi /etc/yum.repos.d/nginx.repo
Then copy and paste the lines below into the file and save it.
name=nginx repo
baseurl=http://nginx.