openresty installation

step1. download the latest release
https://openresty.org/en/download.html

step2. compile with pagespeed
https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source

sudo yum install gcc-c++ pcre-devel zlib-devel make unzip

sudo rpm –import https://linux.web.cern.ch/linux/scientific6/docs/repository/cern/slc6X/i386/RPM-GPG-KEY-cern
sudo wget -O /etc/yum.repos.d/slc6-devtoolset.repo https://linux.web.cern.ch/linux/scientific6/docs/repository/cern/devtoolset/slc6-devtoolset.repo
sudo yum install devtoolset-2-gcc-c++ devtoolset-2-binutils

NPS_VERSION=1.11.33.3
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

pagespeed need a library (psol)

https://www.nginx.com/resources/admin-guide/installing-nginx-open-source/

tar xvf ngx_openresty-VERSION.tar.gz
cd ngx_openresty-VERSION/
./configure –add-module=HOME/ngx_pagespeed-release-{NPS_VERSION}-beta
make
make install