jueves, 3 de septiembre de 2015

INSTALL NGINX PAGESPEED Build ngx_pagespeed From Source https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source

ORIGINAL ARTICLE https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source

To install our dependencies, run:
RedHat, CentOS, or Fedora
sudo yum install gcc-c++ pcre-devel zlib-devel make unzip
Ubuntu or Debian
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip
Then download ngx_pagespeed:
cd NPS_VERSION=1.9.32.6 wget https://github.com/pagespeed/ngx_pagespeed/archive/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/
Download and build nginx with support for pagespeed:
cd# check http://nginx.org/en/download.html for the latest version NGINX_VERSION=1.8.0 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 make sudo make install
VERY IMPORTANT: To compile Nginx with the same “modules” that the Nginx plesk, execute “nginx -V” to see what parameters put.