Install nginx 0.6.36 from Source in CentOS 5.3 with PHP5 FastCGI Support
May 29
I am running CentOS 5.3 64-bit VM in XenServer. Please proceed to download the legacy stable version nginx 0.6.36. As of this post, the current legacy stable version is 0.6.37. You may read the 0.6 changelog for feature updates and bugfix.
However, you need to download lighttpd because we are configuring PHP as FastCGI. Let’s start our download as below: -
wget -c http://sysoev.ru/nginx/nginx-0.6.36.tar.gz ; wget -c http://www.lighttpd.net/download/lighttpd-1.4.22.tar.gz
Next, we need to extract the Gzip files to /tmp/sources as below: -
mkdir /tmp/sources
tar xvfz nginx-0.6.36.tar.gz -C /tmp/sources
tar xvfz lighttpd-1.4.22.tar.gz -C /tmp/sources
Then, we need to start configuring and compiling nginx as below: -
cd /tmp/sources/nginx-0.6.36
./configure --with-http_ssl_module --with-md5=auto/lib/md5 --with-sha1=auto/lib/sha1
make
make install
Ok, we need to start configuring and compiling lighttpd as below: -
cd /tmp/sources/lighttpd-1.4.22
./configure
make
cp src/spawn-fcgi /usr/local/bin
Next, we need to start the spawn-fcgi for spawning FastCGI processes as below: -
/usr/local/bin/spawn-fcgi -f /usr/bin/php-cgi -a 127.0.0.1 -p 9000 -P /var/run/fastcgi-php.pid
Now, you can test nginx by start it as below: -
/usr/local/nginx/sbin/nginx
Simply navigate to your server’s IP address and you will see the nginx welcome message also create a phpinfo() php file to test PHP.
If you found these helpful, please contribute to help:
Twitter
Facebook
Flickr
RSS
Jun 12, 2009 @ 16:10:03
I got my own web server going but what I would like to know what is the difference between the nginx legacy version and the stable version?