2018-10-19 12:53:51 +00:00
|
|
|
---
|
|
|
|
title: Installation of Nginx in Ubuntu
|
|
|
|
---
|
|
|
|
|
2018-12-03 17:44:01 +00:00
|
|
|
## Introduction
|
2018-10-19 12:53:51 +00:00
|
|
|
|
2018-12-03 17:44:01 +00:00
|
|
|
- Nginx is a web server which can also be used as a reverse proxy, load balancer and HTTP cache.
|
|
|
|
- It is one of the most popular web servers in use and is responsible for hosting some of the largest and highest-traffic sites on the internet.
|
|
|
|
- It is proven to be lighter on resources than httpd/Apache.
|
|
|
|
- Nginx is free and open-source software, first released in 2004.
|
2018-10-16 04:50:11 +00:00
|
|
|
|
2018-12-03 17:44:01 +00:00
|
|
|
## Installation of Nginx on Ubuntu
|
2018-10-16 04:50:11 +00:00
|
|
|
|
2018-12-03 17:44:01 +00:00
|
|
|
Update the local package index and install Nginx from default repositories:
|
2018-10-16 04:50:11 +00:00
|
|
|
|
2018-12-03 17:44:01 +00:00
|
|
|
```sh
|
|
|
|
$ sudo apt update
|
|
|
|
$ sudo apt install nginx
|
|
|
|
$ sudo systemctl status nginx # will check if the server is running as the installation should have started it already
|
|
|
|
```
|
2018-10-16 04:50:11 +00:00
|
|
|
|
2018-12-03 17:44:01 +00:00
|
|
|
## Installation of Nginx on CentOS 7
|
2018-10-16 04:50:11 +00:00
|
|
|
|
2018-12-03 17:44:01 +00:00
|
|
|
Add Nginx repository and install:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ sudo yum install epel-release
|
|
|
|
$ sudo yum install nginx
|
|
|
|
$ sudo systemctl start nginx # will start the server
|
|
|
|
```
|
2018-11-06 11:37:41 +00:00
|
|
|
|
|
|
|
#### More Information
|
|
|
|
|
2018-11-19 02:53:57 +00:00
|
|
|
[An Introduction to NGINX for Developers](https://medium.freecodecamp.org/an-introduction-to-nginx-for-developers-62179b6a458f)
|
|
|
|
[Nginx tutorial](https://www.netguru.co/codestories/nginx-tutorial-basics-concepts)
|
|
|
|
[Links to top tutorials](https://medium.com/quick-code/top-tutorials-to-learn-nginx-for-web-server-dc8638c48fae)
|