Skip to content

Instantly share code, notes, and snippets.

@zdk
Created September 21, 2011 14:42
Show Gist options
  • Save zdk/1232227 to your computer and use it in GitHub Desktop.
Save zdk/1232227 to your computer and use it in GitHub Desktop.
build_nginx.sh
#!/bin/bash
echo "Downloading... pcre"
sudo curl -OL h ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.tar.gz > /usr/local/src/pcre-8.13.tar.gz
echo "Downloading... nginx"
sudo curl -OL h http://nginx.org/download/nginx-1.1.4.tar.gz > /usr/local/src/nginx-1.1.4.tar.gz
echo "Install PCRE"
sudo mkdir -p /usr/local/src
cd /usr/local/src
tar xvzf pcre-8.13.tar.gz
cd pcre-8.13
./configure --prefix=/usr/local
make
sudo make install
cd ..
echo "done"
echo "Install Nginx"
tar xvzf nginx-1.1.4.tar.gz
cd nginx-1.1.4
./configure --prefix=/usr/local --with-http_ssl_module
make
sudo make install
echo "done"
echo "Start Nginx"
sudo nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment