Skip to content

Instantly share code, notes, and snippets.

@jorgecarleitao
Created January 14, 2015 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jorgecarleitao/d4c9cd3f87727255cc16 to your computer and use it in GitHub Desktop.
Save jorgecarleitao/d4c9cd3f87727255cc16 to your computer and use it in GitHub Desktop.
Installs nginx in a local directory (e.g. for webfaction)
# prepare
VERSION=$1
DIRECTORY=$2
# download
curl -O http://nginx.org/download/nginx-$VERSION.tar.gz
# extract
tar -xzf nginx-$VERSION.tar.gz
# configure, compile, and install
cd nginx-$VERSION
./configure --prefix=$DIRECTORY && make && make install
# clean
cd ..
rm -rf nginx-$VERSION*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment