Created
August 26, 2012 03:43
-
-
Save koostudios/3473679 to your computer and use it in GitHub Desktop.
JumpStart Script: Nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
# JumpStart Nginx on Ubuntu - installs Nginx | |
# wget https://raw.github.com/gist/3473679/jumpstart-nginx.sh && chmod +x jumpstart-nginx.sh && sudo ./jumpstart-nginx.sh | |
apt-get update | |
apt-get install build-essential libpcre3-dev libssl-dev zlib1g | |
# Installing PCRE | |
cd /usr/local/src | |
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz | |
tar -xzvf pcre-8.31.tar.gz | |
cd pcre-8.31 | |
PCRE_DIR=`pwd` | |
# Installing Nginx | |
cd /usr/local/src | |
wget http://nginx.org/download/nginx-1.2.3.tar.gz | |
tar -xzvf nginx-1.2.3.tar.gz | |
NGINX_SRC_DIR=/usr/local/src/nginx-1.2.3/ | |
cd $NGINX_SRC_DIR | |
./configure \ | |
--prefix=/usr/local \ | |
--sbin-path=/usr/local/sbin \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--with-http_ssl_module \ | |
--with-http_gzip_static_module \ | |
--with-pcre=$PCRE_DIR \ | |
--with-http_sub_module | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment