DEV Community

Cover image for Install nginx on Centos
D\sTro
D\sTro

Posted on

Install nginx on Centos

Post #12

Nginx is a high performing web server which can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. Nginx Original author is Igor Sysoev Developer initially released on 4 October 2004 around 13 years ago

well you must be wondering why Nginx if i am already happy with Apache or other web servers. fantastic! let me introduce you with some greatest feature of Nginx.

1.) Designed for High Concurrency

2.) Lightweight

3.) Nginx is Remarkable for Serving Static Content

4.) Nginx is an Efficient Load Balancer

5.) Highly scalable. if you have ever heard about AWS then you you must be familiar with scaling. no need to worry i'll explain right here.Scaling is a perfect terminology that we use in Dev-Ops means monitoring applications and automatically adjusts capacity to maintain steady, predictable performance at the lowest possible cost.

6.) Nginx is Easy to Configure. exactly trust me its really easier than apache. Still asking why should i go with Nginx ?

well i hope you are totally understood now. lets dive into the Linux world

let's Install nginx on centos now

Alt Text

First, login as root credential via any ssh tools eg. putty(windows) or shell(linux).

Next, just put IP address of your server and click open. you will be asked to provide root username and step forward with password. now you are up. always create a privileged user for safety(Sudo user).

Now lets create a sudo user first and attach with sudo group.

/> adduser prx_ubuntu (your choice)

/> usermod -aG sudo prx_ubuntu
(fill info to add user to sudo group)

Now Nginx installation please….

/> apt-get update (update repo)
/> apt-get install nginx (install nginx)

Well, nginx is successfully installed now. whats next ?
alright let's Install your files from github

/> git clone https://github.com/your_repo.git
/> sudo bash install.sh

Alt Text

Bingo! you have now a nginx installed on your centos server with a sudo user and a program installed from github.
next you can configure webserver for http request<=>response

Note: i wrote this article 2 years ago on Medium. i thought it would help newbies on this platform.

Thanks for Reading!

Top comments (0)