Javatpoint Logo
Javatpoint Logo

How to Install Nginx on CentOS

Introduction

Nginx is a web server which can also be used as a HTTP cache, load balancer and reverse proxy. This was first created by Igor Sysoev and released in 2004 under the terms of BSD like license. In this tutorial, we will learn the steps involved in the installation of Nginx on CentOS.

Prerequisites

  • CentOS 7
  • Login as an administrator on terminal.
  • Yum must be configured on the system.

Installation

1. Install Nginx

Execute the following command to install Nginx on CentOS.

CentOS How to Install Nginx on CentOS

2. Enable Nginx on startup

Execute the following command to enable nginx on boot.

CentOS How to Install Nginx on CentOS 1

3. Start Nginx

Execute the following command to start nginx.

CentOS How to Install Nginx on CentOS 2

4. Check the status of the server

We can check the status of nginx service by just executing the following command.

It shows the status active which indicates that Nginx is configured successfully on the system.

CentOS How to Install Nginx on CentOS 3

5. Access on browser

We can also access nginx on browser by just typing the ip address of the system which is 127.0.0.1 in my case.

CentOS How to Install Nginx on CentOS 4

Hence, we have successfully installed and get started with Nginx.


Next TopicInstall WordPress





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA