Nginx on Solaris 10 11/06 5
Introduction
Nginx is a small webserver that has been built for speed and scalability. It is used for many large sites in Russia and is quite stable. I have been using this webserver for quite some time in a testing environment, I am very satisfied with its performance and memory footprint.
Prerequisites
First off you will need to make sure that you install Perl Compatible Regular Expression or PCRE for short. This will enable the correct processing of the configuration file. This installation process is different then most because it is a two step procedure for nginx. I will go over that when I go over the installation of Nginx. To install PCRE, follow the next section.
Note: Make sure that /opt/local is in your path, to check this type the following command.
echo $PATH
Installing PCRE
mkdir -p /opt/local/src
cd /opt/local/src
wget ftp://ftp.csx.cam.ac.uk:21//pub/software/programming/pcre/pcre-7.3.tar.gz
gunzip pcre-7.3.tar.gz
tar -xf pcre-7.3.tar
cd pcre-7.3
./configure --prefix=/opt/local
Configure Compile and Install
The configure options I used was the following:
./configure --with-pcre=/opt/local/src/pcre-7.3 \
--prefix=/opt/local --user=webservd --guest=webservd
Note: PCRE directory included in the configure statement is NOT the prefix to the pcre installation directory but it is indeed the source code directory of which version PCRE that we just installed.
make
make install
Once the Nginx configuration has been modified to suite your needs then you are all set to run your new and improved extreme fast, stable, and secure web server.
Trackbacks
Use the following link to trackback from your own site:
http://www.sysadminschronicles.com/trackbacks?article_id=compiling_nginx_on_solaris_10&day=28&month=08&year=2007
Yay, that recipe worked for me. Thanks so much.
Well, with one exception, while having installed openssl with pkgadd -d, it seems that nginx doesn’t find its libraries to link against. Weird.
coder,
You will need to specifically point to your openssl libraries during the ./configure step. If you installed from sunfreeware.com then they will be in /usr/local/lib. If that is the case just append the following to the configure step of nginx and you should have openssl.
--with-openssl=/usr/local/libYay, I did that but forgot to come here to comment it. Thanks anyway, now I’m looking for a SUN Fast-Ethernet PCI for my DMZ…
Another question is: do you install it compiled against GCC/Binutils?