How to install latest Nginx in CentOS 6

Share this post to your friends !
  • 1
    Share

How to install latest Nginx in CentOS 6
5 (100%) 1 vote[s]

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 /etc/yum.repos.d/nginx.repo.

# 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.

# yum install nginx -y

Check and start Nginx

how-to-install-latest-nginx-in-centos-6 How to install latest Nginx in CentOS 6
Install latest Nginx in CentOS 6.10.

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.

Conclusion

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.


Share this post to your friends !
  • 1
    Share
If you appreciate what we share in this blog, you can support us by:
  1. Stay connected to: Facebook | Twitter | Google Plus | YouTube
  2. Subscribe email to recieve new posts from us: Sign up now.
  3. Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
  4. Become a Supporter - Make a contribution via PayPal.
  5. Support us by purchasing Ribbon Lite Child theme being using on this website.

We are thankful for your support.

«« »»

Got something to say? Join the discussion

Please keep in mind that all comments are subject to our Comment Policy. Your email address will not be published.
This site uses Akismet to reduce spam. Learn how your comment data is processed.