Created
January 6, 2011 00:01
-
-
Save cpinto/767267 to your computer and use it in GitHub Desktop.
A script that installs nginx on a MacOS X system
This file contains 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 | |
SCRIPT_DIR="`cd $(dirname $0);pwd`" | |
NGINX_VERSION="0.8.54" | |
PCRE_VERSION="8.01" | |
INSTALL_PREFIX="$SCRIPT_DIR/binaries" | |
DOWNLOAD_DIR="/tmp/src" | |
LD_LIBRARY_PATH="$INSTALL_PREFIX/lib:$LD_LIBRARY_PATH" | |
export LD_LIBRARY_PATH | |
mkdir -p $DOWNLOAD_DIR | |
mkdir -p $INSTALL_PREFIX | |
## DOWNLOADS | |
curl -OL h ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VERSION.tar.gz > $DOWNLOAD_DIR/pcre-$PCRE_VERSION.tar.gz | |
curl -OL h http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz > $DOWNLOAD_DIR/nginx-$NGINX_VERSION.tar.gz | |
## Install PCRE | |
cd $DOWNLOAD_DIR | |
tar xvzf pcre-$PCRE_VERSION.tar.gz | |
cd pcre-$PCRE_VERSION | |
./configure --prefix=$INSTALL_PREFIX | |
make | |
make install | |
## Install Nginx | |
cd $DOWNLOAD_DIR | |
tar xvzf nginx-$NGINX_VERSION.tar.gz | |
cd nginx-$NGINX_VERSION | |
./configure --prefix=$INSTALL_PREFIX --with-http_ssl_module | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment