mod_pagespeed package will automatically add a repository entry to your apt sources unless you tell it not to so it should stay up to date once it’s installed.
Shell into your server (SSH) and get yourself to a directory where you can download the required package. Then download the package with a wget command like this:
This is the download for the stable 64bit package, if you need the 32bit package or want to try out the beta version have a look here.
dpkg to install the package:
me@somewhere:/data/scrap$ sudo dpkg -i mod-pagespeed-*.deb Selecting previously unselected package mod-pagespeed-stable. (Reading database ... 442012 files and directories currently installed.) Unpacking mod-pagespeed-stable (from mod-pagespeed-stable_current_amd64.deb) ... Setting up mod-pagespeed-stable (220.127.116.11-r3101) ... Enabling module pagespeed. To activate the new configuration, you need to run: service apache2 restart me@somewhere:/data/scrap$
Then use apt-get to finish the install (although on my system this did nothing):
sudo apt-get -f install
Finally, clean up the deb file:
The installation will have created two files in
/etc/apache2/mods-available they are
pagespeed.conf. The load file will load the appropriate version of the module for the version of Apache you are running and optionally it will try to load
mod_deflate if it isn’t already loaded. The conf file configures the module although to be honest the default settings will be right for almost all sites.
Once you are done having a look at the configuration files you need to restart your Apache server with:
sudo service apache2 restart
When you initially ran a speed test on your website you should have picked a page to test. Reload it a few times to ensure that everything is cached and then run another page speed test.