How to install latest Nginx in CentOS 6

by Daniel Pham
Published: Updated:

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.

Recommended Reading: How to install latest Nginx in CentOS 7

yum install nginx -y

Check and start Nginx

install latest nginx in centos 6.10
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.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating

You may also like

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.

SUPPORT US

FOLLOW US

Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 DevOpsLite.com – All rights reserved.

Please write sources “DevOpsLite.com” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

0
Would love your thoughts, please comment.x
()
x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.