The mod_pagespeed is code library developed by Google for Apache to make website faster in loading and also to get indexed by Google bots easily.
Downloading and installation of mod_pagespeed is very simple easy. Very first we will download the latest version of mod_pagespeed from Google servers into server directly and then install it. Minimum requirement of Apache 2.2+ should be installed on server.

Install Google PageSpeed on Linux server
For download, depending on server operating system you need to select PageSpeed module.
For Linux 64-bit version:
1 |
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb |
For Linux 32-bit version:
1 |
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb |
Once the file is downloaded on server, next step is to install. To install pagespeed module, run following command in SSH terminal:
1 2 |
sudo dpkg -i mod-pagespeed-*.deb apt-get -f install |
As you have successfully installed the mod_pagespeed on system, remove the .deb file to empty the space. Remove by using following command:
1 |
rm mod-pagespeed-*.deb |
To make the changes effective, restart Apache server using following command:
1 |
service apache2 restart |
Hence now mod_pagespeed has been installed on web server.
Note and Conclusion:
Restart the Apache server every time when you have done any changes.