SystemMen - This article will guide you to install the latest Nginx in CentOS 6.10.
Although CentOS 7 came out for a while, but still quite a lot of people using CentOS 6.
Install the latest Nginx in CentOS 6
You only need to follow the steps in this article, I am sure that you will install Nginx latest successfully.
First, we update the OS and install the required package.
# yum update && yum install yum-utils -y
Next, use the following command to create a new file named
# yum install nano -y && nano /etc/yum.repos.d/nginx.repo
Then, copy the content below into the file and save it.
[nginx-stable] name=nginx stable repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=1 enabled=1 gpgkey=https://nginx.org/keys/nginx_signing.key
And finally, run the following command to install the latest Nginx.
Recommended Reading: How to install latest Nginx in CentOS 7
# yum install nginx -y
Check and start Nginx
After the installation is complete, type the following command to check its version.
# nginx -v
Then, you use the following command to enable and start the Nginx service.
# chkconfig nginx on && service nginx start
And now you can use Nginx in your server.
The article has guided you step by step to install the latest Nginx in your server. Your job now is to start learning how to configure virtualhost and put your website source on the server.If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.
If you appreciate what we share in this blog, you can support us by:
- Stay connected to: Facebook | Twitter | Google Plus | YouTube
- Subscribe email to recieve new posts from us: Sign up now.
- Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
- Become a Supporter - Make a contribution via PayPal.
- Support us by purchasing Ribbon Lite Child theme being using on this website.
We are thankful for your support.