How to install Nginx through source?

In our last session, we installed Nginx through yum utility which was very easy method. But generally it is recommended to install Nginx through source as it can becomes easy to tweak as per the project requirement. Installing Nginx through source tends to provide the user to dig deep into the server and customize it as per its hardware compatibility and resource management.

Let's compile the source from scratch and how really it goes.

Create a directory called "server" under /root. Download the nginx tar from http://sysoev.ru/nginx and untar it as shown:

Lets start compiling the source now.

If you encountered this error, then follow these steps:

#yum install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev

Start to compile it once again

$sudo make clean
$sudo ./configure --with-http_ssl_module
$sudo make
$sudo make install

Here it goes your Nginx server is ready.

No comments:

Post a Comment