Last active
July 13, 2017 13:17
-
-
Save petrzpav/4315d1f784da30ae982127aaa4e59cd5 to your computer and use it in GitHub Desktop.
Install Nginx + Google PageSpeed + OpenSSL
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 | |
NPS_VERSION="1.11.33.4" | |
NGX_VERSION="1.11.5" | |
SSL_VERSION="1.0.2j" | |
wget http://nginx.org/download/nginx-${NGX_VERSION}.tar.gz \ | |
&& tar -zxvf nginx-${NGX_VERSION}.tar.gz \ | |
&& wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.zip \ | |
&& unzip release-${NPS_VERSION}-beta.zip \ | |
|| return 1 | |
pushd 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 \ | |
&& popd \ | |
|| return 1 | |
wget https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz \ | |
&& tar xf openssl-${SSL_VERSION}.tar.gz -C /usr/local/ \ | |
&& cd /usr/local/openssl-${SSL_VERSION} \ | |
&& ./config \ | |
&& make \ | |
&& make install \ | |
&& rm /usr/bin/openssl \ | |
&& ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl \ | |
|| return 1 | |
pushd nginx-${NGX_VERSION} \ | |
&& ./configure \ | |
--prefix=/etc/nginx \ | |
--sbin-path=/usr/sbin/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--user=nginx \ | |
--group=nginx \ | |
--with-http_ssl_module \ | |
--with-ipv6 \ | |
--with-http_v2_module \ | |
--add-module=../ngx_pagespeed-release-${NPS_VERSION}-beta \ | |
--with-openssl=/usr/local/openssl-${SSL_VERSION}/ \ | |
&& make \ | |
&& make install \ | |
&& popd \ | |
|| return 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment