Skip to content

Instantly share code, notes, and snippets.

@malfborger
Forked from peter-mcconnell/ps.sh
Last active August 29, 2015 14:24
Show Gist options
  • Save malfborger/73bebd8d4ed545c229c3 to your computer and use it in GitHub Desktop.
Save malfborger/73bebd8d4ed545c229c3 to your computer and use it in GitHub Desktop.
NGINX_VERSION=1.8.0
NPS_VERSION=1.9.32.4
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip
sudo apt-get update
sudo apt-get upgrade
cd $HOME
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
wget http://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.tar.gz
tar xzfv nginx-${NGINX_VERSION}.tar.gz
tar zxfv release-${NPS_VERSION}-beta.tar.gz
cd ngx_pagespeed-release-${NPS_VERSION}-beta/
# psol -> PageSpeed Optimization Libraries
wget https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz
tar xzvf ${NPS_VERSION}.tar.gz
cd $HOME/nginx-${NGINX_VERSION}
# Configure nginx, specify SSL support, and add the ngx_pagespeed module
./configure --add-module=$HOME/ngx_pagespeed-release-${NPS_VERSION}-beta
make
sudo make install
echo
echo "***************************************************************"
echo "* *"
echo "* installed: nginx $NGINX_VER *"
echo "* installed: pagespeed module $NPS_VERSION *"
echo "* ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx *"
echo "* *"
echo "***************************************************************"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment