Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to install this module.

The problem is it requires that nginx is installed from source. I have it installed via apt-get install, and it is already serving web pages.

So which steps would you follow to change from one to the other? If possible I would like them to use the same paths. In the example it uses /opt, but apt-get installed it in a different place (I see entries in /etc, /lib, /usr/bin, /usr/share).

share|improve this question
up vote 1 down vote accepted

The basic procedure is to remove the installed version, and then install the new one:

    sudo apt-get purge nginx

Now, download the source tar ball of what you want to install and extract it:

    wget http://nginx.org/download/nginx-1.3.11.tar.gz
    tar xvvzf nginx-1.3.11.tar.gz 

The files you see in /etc and /lib are settings and service scripts and the like. They will be there no matter where you install nginx, apt installs nginx to /usr.

So, tell the included configure script to install in /usr:

cd nginx-1.3.11/
./configure --prefix=/usr

Then compile and install:

make
sudo make install
share|improve this answer
    
Thank you so much! – ChocoDeveloper Feb 2 '13 at 3:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .