Install mod_pagespeed (Website Optimizer) for Apache in RHEL, CentOS and Fedora

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

Ravi Saive

Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Your name can also be listed here. Work as a Paid freelancer/writer at TecMint.

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

32 Responses

  1. i have done all the things you said but when i go to localhost.com/phpinfo.php it is showing a 404 error not found.Instead i used full php configuration in zpanel but i didn’t found X-Mod-Pagespeed what to do?

  2. Thanks for the help.But yesterday i have spent an hour to install mod_pagespeed using article at https://developers.google.com/speed/pagespeed/module/build_mod_pagespeed_from_source.
    But what is the difference between your’s article and googles article

    • Ravi Saive says:

      The difference is the article at tecmint is little older and haven’t we updated yet…and the link you followed at Google has latest instructions..

  3. Sarovar says:

    I have installed it – and it installed without errors using yum.

    Running this:
    httpd -t -D DUMP_MODULES | grep pagespeed

    Outputs:
    pagespeed_module (shared)

    But pagespeed doesn’t show up in phpinfo();

    I am running Apache 2.4 and PHP 5.5. What could be the problem?

  4. snh says:

    We cannot install – because dependency error (I have read somewhere because httpd is in a custom location) – but how can we fix this?

    (I also see this exact question was one of the first in 2012 – but without an answer)

    yum –enablerepo=mod-pagespeed install mod-pagespeed
    Loaded plugins: downloadonly, fastestmirror
    Loading mirror speeds from cached hostfile
    * base: http://ftp.nluug.nl
    * epel: http://ftp.nluug.nl
    * extras: http://ftp.nluug.nl
    * updates: http://ftp.nluug.nl
    Setting up Install Process
    Resolving Dependencies
    –> Running transaction check
    —> Package mod-pagespeed-beta.x86_64 0:1.8.31.4-4009 will be installed
    –> Processing Dependency: httpd >= 2.2 for package: mod-pagespeed-beta-1.8.31.4-4009.x86_64
    –> Finished Dependency Resolution
    Error: Package: mod-pagespeed-beta-1.8.31.4-4009.x86_64 (mod-pagespeed)
    Requires: httpd >= 2.2
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest

    • Ravi Saive says:

      Sorry for troble, but the fact is, article is little outdated and we haven’t updated yet. After seeing the error, I suggest you to upgrade your httpd version to latest and then give a try. I hope it will work for you this way.. or else wait for the updated article, we are in the process to publish updated one soon..

  5. Shyamal says:

    Hello Sir, your steps are 100% working and improved our website’s page loading time impressively. Thank you so much…

  6. sanjay n says:

    I have installed mod page speed Customized module from the bellow reference link on whm centos 5 ,32 bit with Apache 2.2.67.

    http://forums.cpanel.net/f402/install-mod_pagespeed-cpanel-using-easyapache-302431.html

    But now page speed module giving a warning ” ModPagespeed Generated File Prefix is deprecated please remove configuration”

    so i want to remove that configuration of custom module.

    if any body have any idea how to remove it let me know.

    i was try bellow command but it is not working for me

    sudo yum remove mod-pagespeed-stable

    when i open file using command nano /etc/httpd/conf.d/pagespeed.conf to add the mad page speed filters its show this error

    [ Error writing /etc/httpd/conf.d/pagespeed.conf: No such file or directory ]

    so that i want remove this custom page speed module.

    last out put through command on putty

    httpd -t -D DUMP_MODULES | grep pagespeed
    [Thu Aug 21 04:04:51 2014] [warn] ModPagespeedGeneratedFilePrefix is deprecated. Please remove it from your configuration.
    Syntax OK
    pagespeed_module (shared)

  7. subrata says:

    Hello Sir,

    This installed mod-pagespeed-beta-1.8.31.2-3973.x86_64 ,but in your repo its written stable ,no way to install Stable?

  8. devendra says:

    Hi,

    Please share How to compile mod_pagespeed + Apache with source.

    Devendra

  9. Tierno Bah says:

    Yum installed mod_pagespeed correctly in the first two locations:

    – /etc/cron.daily/mod-pagespeed
    – /etc/httpd/conf.d/pagespeed.conf

    But if failed to do so in the other three locations:

    – /usr/lib/httpd/modules/mod_pagespeed.so
    – /var/www/mod_pagespeed/cache
    – /var/www/mod_pagespeed/files

    Also my info.php doesn’t display mod_pagespeed under HTTP Response Headers.
    It just shows: X-Powered-By PHP/5.5.4

    I did restart Apache after installing the module.

    TIA

  10. Shahil says:

    @ Ravi Sir,

    Sorry I got it .

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Join Over 62000+ Linux Users
  1. 46679
  2. 2055
  3. 10101

Enter your email to get latest Linux Howto's