If you are looking for ways to upgrade or install NGINX in Ubuntu or Debian systems, you are in right place. You can install them easily using the aptitude or apt-get command.
The process only takes couple of minutes and requires minimal Linux knowledge.
NGINX Installation procedure:
Open Terminal. Open the Sources file for aptitude using vi. If you are not familiar with vi, open the file in nano or gedit.
sudo gedit /etc/apt/sources.list
If you are using Debian Squeeze (version 6.x),
deb http://nginx.org/packages/debian/ squeeze nginx deb-src http://nginx.org/packages/debian/ squeeze nginx
If you are using Ubuntu, select the respective lines from below, For Ubuntu Lucid (Version 10.04),
deb http://nginx.org/packages/ubuntu/ lucid nginx deb-src http://nginx.org/packages/ubuntu/ lucid nginx
For Ubuntu Oneiric (Version 11.10),
deb http://nginx.org/packages/ubuntu/ oneiric nginx deb-src http://nginx.org/packages/ubuntu/ oneiric nginx
For Ubuntu Precise (Version 12.04),
deb http://nginx.org/packages/ubuntu/ precise nginx deb-src http://nginx.org/packages/ubuntu/ precise nginx
Add the lines applicable to you in the sources.list file. Now save and close the file.
In order to authenticate the repository and to avoid warnings about missing gpg key during installation of the nginx package, it is advised to add the key used to sign the nginx packages and repository to the apt program keyring.
Run the following commands in the terminal,
wget http://nginx.org/keys/nginx_signing.key cat nginx_signing.key | sudo apt-key add -
Once added, update the aptitude with new repository,
sudo apt-get update
Now to install NGINX in Ubuntu or Debian systems, run the following command in terminal,
sudo apt-get install nginx
Comment below if you find it useful or came across any issues when installing NGINX server. If you are looking to install or upgrade PHP, Visit this HOWTO page.