On the test, I install the PageSpeed module in Ubuntu Server 14.04.5 LTS and CentOS
Download page with different versions of the module:
https://modpagespeed.com/doc/download
https://developers.google.com/speed/pagespeed/module/
And so, download the stable version for Debian / Ubuntu:
sudo wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
Or for CentOS / Fedora:
https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
Install in Ubuntu, the module is automatically activated:
sudo dpkg -i mod-pagespeed-*.deb
sudo apt-get -f install
In CentOS like this:
sudo yum install at
sudo rpm -U mod-pagespeed-*.rpm
Restart apache2 to apply the changes:
sudo service apache2 restart
sudo /etc/init.d/apache2 restart
Done, the module is installed.
In the future, it will be updated with the system commands:
sudo apt-get update
sudo apt-get upgrade
If necessary, you can deactivate / activate the module with the commands:
sudo a2dismod pagespeed
sudo a2enmod pagespeed
Or completely delete:
sudo apt-get remove mod-pagespeed-stable
sudo yum remove mod-pagespeed-stable
The configuration files for the module are located at:
/etc/apache2/mods-available/pagespeed.conf
/etc/httpd/conf.d/