Instalando Nginx en Debian Lenny 5.0

23 12 2010

Instalar librerías necesarias:

# apt-get install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev

Bajar Nginx:

# wget 'http://nginx.org/download/nginx-0.8.52.tar.gz'

Descomprimir:

# tar -xzvf nginx-0.8.52.tar.gz

Configurar e instalar:

# ./configure \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/local/sbin \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/var/lib/nginx/body \
--with-http_ssl_module \
--http-proxy-temp-path=/var/lib/nginx/proxy \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--with-debug

Compilar

# make & make install

Poner el script de arranque en “/etc/init.d/nginx”, bajarlo de “http://code.google.com/p/nginx-init-ubuntu/” y cambiar las siguientes líneas:


------------------------------------------------------------------------------
# Consts
#------------------------------------------------------------------------------
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/nginx
PS="nginx"
PIDNAME="nginx" #lets you do $PS-slave
PIDFILE=$PIDNAME.pid #pid file
PIDSPATH=/var/run
DESCRIPTION="Nginx Server..."
RUNAS=root #user to run as
SCRIPT_OK=0 #ala error codes
SCRIPT_ERROR=1 #ala error codes
TRUE=1 #boolean
FALSE=0 #boolean
lockfile=/var/lock/subsys/nginx
NGINX_CONF_FILE="/etc/nginx/nginx.conf"

Y, por último, instalar el arranque que acabamos de configuarar:

# update-rc.d -f nginx defaults

Ya está instalado el servidor, ahora sólo queda configura los sitios web…

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: