How To Install Nginx on Ubuntu 18.04

Prerequisites

  • A system running Ubuntu 18.04
  • A user account with sudo privileges
  • SSH Access

Steps to Installing Nginx on Ubuntu

Update Software Repositories

Log into your Server via SSH as the root user

ssh root@hostname

Before installing new software, it is strongly recommended to update your local software database. Updating helps to make sure you’re installing the latest and best-patched software available.

Enter the following:

sudo apt update

Allow the process to finish.

Install Nginx on Ubuntu

Enter the following to install Nginx on Ubuntu:

sudo apt install nginx

This may take some time for the system to download the software packages and install them. Allow it to complete before moving on.
Read More

How to Install Nginx on CentOS 7

Nginx pronounced engine x is a free, open-source, high-performance HTTP and reverse proxy server responsible for handling the load of some of the largest sites on the Internet.

Nginx can be used as a standalone web server, and as a reverse proxy for Apache and other web servers.

Compared to Apache, Nginx can handle a much large number of concurrent connections and has a smaller memory footprint per connection.

This tutorial will teach you how to install and manage Nginx on your CentOS 7 machine.

Prerequisites

Before starting with the tutorial, make sure you are logged in as a user with sudo privileges and you don’t have Apache or any other service running on port 80 or 443.

Installing Nginx on CentOS

Follow the steps below to install Nginx on your CentOS server:

  • Nginx packages are available in the EPEL repositories. If you don’t have EPEL repository already installed you can do it by typing:

 

sudo yum install epel-release