At this point I got an error about missing PCRE - this Ubuntu installation is basically fresh so there’s a lot of stuff missing.
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
I had libpcre3 installed, but i needed libpcre3-dev as well.
We get a bit further this time, but still no luck.
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the sourcewith nginx by using --with-openssl=<path> option.
This time it’s libssl-dev that’s missing :
> sudo aptitude install libssl-dev
> ./configure \ --prefix=/opt/nginx-20100311 \ --with-http_ssl_module \ --with-http_gzip_static_module \ --with-http_flv_module \ --with-http_realip_module
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1 library is not used
+ using system zlib library
Now that we’ve successfully configured it, we can compile and install :
> sudo make install
Now, make a symlink so you can switch to newer versions easily :
> sudo ln -s /opt/nginx-20100311 /opt/nginx
Finally, we want to set up a startup script. Create the file /etc/init.d/nginx and paste the following in :