mod_pagespeed Installation on Centos

mod_pagespeed is an open source module by google for Apache to speed up the page loading speed. The module source is now available in both source and RPM which you can download directly from code.google.com.

Before starting installation make sure that at command is installed on your server.

at executes commands at a specified time

If it is not there then you can use yum for installing it.

[root@HostDire ~]# yum install at

You can download Mode page speed RPM packages from below URL.

https://developers.google.com/speed/docs/mod_pagespeed/download
[root@HostDire ~]# wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm

Next step, use RPM -ivh command for installing the downloaded RPM package. After installation you need to restart the Apache service.

[root@HostDire ~]# rpm -ivh mod-pagespeed-stable_current_x86_64.rpm
Preparing… ########################################### [100%] 1:mod-pagespeed-stable ########################################### [100%] job 4 at 2013-01-27 21:43

[root@HostDire ~]# /etc/init.d/httpd restart

We have completed the installation and now its the time to enable ModPagespeed. For that we need to edit pagespeed configuration file. The following steps will guide you to accomplish the same.

[root@HostDire ~]# vim /usr/local/apache/conf.d/pagespeed.conf

ModPagespeed off

to

ModPagespeed on

If you would like to disable the cron entry that runs daily for pagespeed updates then move the cron entry to somewhere else.

[root@HostDire ~]# mv /etc/cron.daily/mod-pagespeed /usr/src

There are many more mod_pagespeed configuration you can do, please go through below URL.

https://developers.google.com/speed/docs/mod_pagespeed/install
Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts