Last active
May 5, 2020 09:12
-
-
Save mklooss/1057e94da288419c25370cfd5a42c911 to your computer and use it in GitHub Desktop.
Build NGINX with Pagespeed Modul
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
https://github.com/apache/incubator-pagespeed-ngx/wiki/Building-PSOL-From-Source |
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
I am using Debian Buster amd64! | |
Requirements: | |
- binutils >= 2.25 | |
- chromium/tools/depot_tools | |
~# mkdir -p $HOME/bin | |
~# git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/bin/depot_tools | |
~# export PATH=$PATH:~/bin/depot_tools | |
apt-get install \ | |
libpng-dev build-essential zlib1g-dev libpcre3 libpcre3-dev unzip uuid-dev \ | |
apache2-dev g++ python subversion gperf make devscripts fakeroot git curl \ | |
virtualenv libwebp-dev libjpeg-dev yasm | |
We need python 2.7 - so we create an venv with this version | |
Otherwise you may getting an error about python3.x | |
~# virtualenv $HOME/.venv -p python2.7 | |
~# . $HOME/.venv/bin/activate |
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
Getting Data (BUILDTYPE=Release): | |
~# cd $HOME | |
~# rm -rf $HOME/incubator-pagespeed-mod | |
~# git clone https://github.com/apache/incubator-pagespeed-mod.git | |
~# cd $HOME/incubator-pagespeed-mod | |
may change branch | |
~# git submodule update --init --recursive | |
~# python build/gyp_chromium --depth=. | |
~# make BUILDTYPE=Release mod_pagespeed_test pagespeed_automatic_test -j`nproc` | |
Building Elements for NGINX (BUILDTYPE=Release): | |
~# cd $HOME/incubator-pagespeed-mod/pagespeed/automatic | |
~# make psol BUILDTYPE=Release CFLAGS+="-I/usr/include/apr-1" CXXFLAGS+="-I/usr/include/apr-1 -DUCHAR_TYPE=uint16_t" -j`nproc` | |
~# mkdir -p $HOME/ngx/psol/lib/Release/linux/x64 | |
~# cp $HOME/incubator-pagespeed-mod/pagespeed/automatic/pagespeed_automatic.a $HOME/ngx/psol/lib/Release/linux/x64 |
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
Getting Data (BUILDTYPE=Debug): | |
~# cd $HOME | |
~# rm -rf $HOME/incubator-pagespeed-mod | |
~# git clone https://github.com/apache/incubator-pagespeed-mod.git | |
~# cd $HOME/incubator-pagespeed-mod | |
may change branch | |
~# git submodule update --init --recursive | |
~# python build/gyp_chromium --depth=. | |
~# make BUILDTYPE=Debug mod_pagespeed_test pagespeed_automatic_test -j`nproc` | |
Building Elements for NGINX (BUILDTYPE=Debug): | |
~# cd $HOME/incubator-pagespeed-mod/pagespeed/automatic | |
~# make psol BUILDTYPE=Debug CFLAGS+="-I/usr/include/apr-1" CXXFLAGS+="-I/usr/include/apr-1 -DUCHAR_TYPE=uint16_t" -j`nproc` | |
~# mkdir -p $HOME/psol/lib/Debug/linux/x64 | |
~# cp $HOME/incubator-pagespeed-mod/pagespeed/automatic/pagespeed_automatic.a $HOME/ngx/psol/lib/Debug/linux/x64/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment