1. Install nginx(using source code)
http://www.nginx.org
Install Prerequisites
$sudo apt-get install libpcre3-dev build-essential libssl-dev

Download lastest nginx
$curl -O http://nginx.org/download/nginx-1.0.10.tar.gz
$tar xf nginx-1.0.10.tar.gz
$cd nginx-1.0.10/

Compile and Install

$./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module
$make
$sudo make install

Add User and Hroup
$sudo adduser --system --no-create-home --disabled-login --disabled-password --group nginx

Create an Init Script to Manage nginx
$wget -O init-deb.sh http://library.linode.com/assets/661-init-deb.sh
$sudo mv init-deb.sh /etc/init.d/nginx
$sudo chmod +x /etc/init.d/nginx
$sudo /usr/sbin/update-rc.d -f nginx defaults
$sudo /etc/init.d/nginx start

728x90

+ Recent posts