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
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
Post a Comment