Last active
February 9, 2018 15:26
-
-
Save evaisse/6eae4908cf2b10278bf9 to your computer and use it in GitHub Desktop.
ngx_pagespeed
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
NPS_VERSION=1.10.33.6 | |
NGINX_VERSION=1.9.12 | |
# update | |
sudo apt-get update | |
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip git | |
# Next, we have to satisfy all the dependencies needed to run Nginx. For this purpose run the command: | |
sudo apt-get build-dep nginx | |
# After that, create a folder in your home directory to download the source package for Nginx: | |
mkdir ~/custom-nginx | |
cd ~/custom-nginx | |
sudo apt-get source nginx | |
# To confirm we are on the same page, list the content of the folder ~/custom-nginx: | |
ls ~/custom-nginx | |
# download html template | |
wget https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/archive/v1.0.8.zip | |
cd ~ | |
wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.zip -O release-${NPS_VERSION}-beta.zip | |
unzip release-${NPS_VERSION}-beta.zip | |
cd ngx_pagespeed-release-${NPS_VERSION}-beta/ | |
wget https://dl.google.com/dl/page-speed/psol/${NPS_VERSION}.tar.gz | |
tar -xzvf ${NPS_VERSION}.tar.gz # extracts to psol/ | |
cd ~ | |
# check http://nginx.org/en/download.html for the latest version | |
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz | |
tar -xvzf nginx-${NGINX_VERSION}.tar.gz | |
cd nginx-${NGINX_VERSION}/ | |
./configure --add-module=$HOME/ngx_pagespeed-release-${NPS_VERSION}-beta ${PS_NGX_EXTRA_FLAGS} | |
make | |
sudo make install | |
# get let's encrypt | |
sudo apt-get install git | |
git clone https://github.com/letsencrypt/letsencrypt /usr/local/lib/letsencrypt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment