How to: Install NginX on Ubuntu 10.04 64bit via apt-get

0
Want create site? Find Free WordPress Themes and plugins.

I recently bought a new VPS which came installed with uBuntu 10.04 64bit LTS by default, I was expecting a 32bit version but then I decided to work on the 64bit version instead.

You might encounter a few problems with installing NginX on uBuntu 10.04 64-bit via apt-get.

  1. The NginX package on the repositories is old, around version 0.7.5.
  2. There is no add-apt-repository application installed which allows you to add the NginX repo to the sources.list.
  3. All the necessary repos might not be available in the sources.list file.


To fix all that, you have to add the necessary repos to sources.list file:

 deb http://us.archive.ubuntu.com/ubuntu lucid main
 
 deb http://us.archive.ubuntu.com/ubuntu/ lucid universe
 deb-src http://us.archive.ubuntu.com/ubuntu/ lucid universe
 deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe
 deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe
 
 deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
 deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
 deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
 deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse

If your VPS is in some other country than US, you have to just remove us. from all the URIs.

Now, update apt-get with the latest package lists.

apt-get update

Finally, install python-software-properties package which installs add-apt-repository as a part of it.

apt-get install python-software-properties

After this, follow the instructions to add the NginX repo to your sources.list file.

sudo su -
 nginx=stable # use nginx=development for latest development version
 add-apt-repository ppa:nginx/$  nginx
 apt-get update 
 apt-get install nginx

After all this, if you try and install some packages and they give errors, such as unmet dependencies you can use aptitude to fix that:

aptitude purge package-name

and then:

aptitude install package-name

And, if you’re in the process of installing PHP with FPM then you can follow my tutorial to install Nginx + PHP-FPM.

Did you find apk for android? You can find new Free Android Games and apps.

You might also like More from author