no

How to Install Nginx in Ubuntu

I. Introduction These series of bash commands will install NGINX in your Ubuntu machine.  Tested on Ubuntu version 2.0.04. II. Bash S...

I. Introduction

These series of bash commands will install NGINX in your Ubuntu machine. 

Tested on Ubuntu version 2.0.04.

II. Bash Script

sudo cp -r /etc/nginx /etc/nginx.backup
sudo apt-get remove --purge 'nginx*'
sudo apt install curl gnupg2 ca-certificates lsb-release
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
# echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
sudo apt-key fingerprint ABF5BD827BD9BF62
sudo apt update
sudo apt-get install nginx-module-njs nginx

Reference:

  • http://nginx.org/en/linux_packages.html#Ubuntu

Related

ubuntu 7444827641997995635

Post a Comment Default Comments

Outsourcing

Are you looking for freelancers in the Philippines? Get in touch.

Donations

If you like what I do, you can support this channel by buying me a coffee. I would be grateful for your contribution! Your donations will help me create more FREE online courses and learning materials for programmers and remote workers.

item