Installing mod_pagespeed centos 6 apache 2.4.2 DirectAdmin

dmacleo

Verified User
Joined
Jun 21, 2012
Messages
653
I made up a little howto guide to install google mod_pagespeed on a directadmin server running centos 6.2 64bit, apache 2.4.2 with php 5.4.4.
this doesn't deal with any filters or tweaking, its just installing it.
support topic there too but I am not great at this stuff so not sure how helpful this is, thought I would post it in case it does help.

http://www.theconservativevoices.co...pagespeed-on-directadmin-centos-62-apache-24/
 
Thanks for sharing. I would just suggest to put the instruction directly on this forum for be always avaible isntead link outside, but is just a suggestion.

Regards
 
Lets see how copy/paste works from it :)

This is just installing, not any of the filters or tuning. I have looked over bunch of cpanel articles on this and decided to try the following on directadmin server.
so far it has worked with no known adverse effects, I take no responsibility for any issues you may find.
Since the httpd installed is not compiled from source you can't just straight install the google provided rpm due to dependencies, it will fail saying httpd version is wrong.
Download a copy of the CentOS RPM or wget it from your shell:
32 bit:

Code:
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.rpm


64 bit:

Code:
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm


This will grab the latest version.
then install the rpm.
32 bit
rpm -i –nodeps mod-pagespeed-beta_current_i386.rpm

64 bit
rpm -i –nodeps mod-pagespeed-beta_current_x86_64.rpm


You need to edit /etc/httpd/conf/extra/httpd-includes.conf and add the following to the top of it:


#Google PageSpeed Module
Include /etc/httpd/conf.d/pagespeed.conf

Then you need to edit main httpd.conf file /etc/httpd/conf/httpd.conf and remove this line:

Include conf/extra/httpd-deflate.conf
NOTE: I am testing both with and without that line.

To change the options for PageSpeed, configuration file is /etc/httpd/conf.d/pagespeed.conf

The do apache restart

/etc/init.d/httpd restart


Then test it. Run

apachectl -t -D DUMP_MODULES | grep pagespeed

and if your output is

pagespeed_module (shared)
you should be ok.
some say to look at all htaccess files and remove instances of ‘setoutputfilter’ as this might messup what mod_pagespeed is doing. I have not been able to verify for sure.
Again, this is not instructions for tuning or usage. Its just to install with no errors.
 
Last edited:
There are .deb packages here for Debian/Ubuntu users:

https://developers.google.com/speed/docs/mod_pagespeed/download

Code to install would be only a little different.

32 bit:
Code:
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.deb
dpkg -i mod-pagespeed-beta_current_i386.deb

64 bit:
Code:
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_amd64.deb
dpkg -i mod-pagespeed-beta_current_amd64.deb
 
Last edited:
Btw, should i ask what the reason for use this? There arent alreadyother modules for apache spee-up? This work better? Did you tryed it?

Regards
 
There are .deb packages here for Debian/Ubuntu users:

https://developers.google.com/speed/docs/mod_pagespeed/download

Code to install would be only a little different.

32 bit:
Code:
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.deb
dpkg -i mod-pagespeed-beta_current_i386.deb

64 bit:
Code:
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_amd64.deb
dpkg -i mod-pagespeed-beta_current_amd64.deb
thanks, I had no way to test any of that
Btw, should i ask what the reason for use this? There arent alreadyother modules for apache spee-up? This work better? Did you tryed it?

Regards
lot, of course, depends on what you're running. I use invision suite and I do see a gain in page load speeds. its not a huge gain, but its enough to make the 10 min of work worth it for me.
now I have not gotten deep into it to play with tuning and stuff here
https://developers.google.com/speed/docs/mod_pagespeed/using_mod
its not for everyone of course, but its a resource that may help some.
 
Do you have any graphs to see the difference on speed/load with and without the module?
 
no I don't now, most testing was just user input and running http://www.webpagetest.org/ but I wasn't logged in so no history was saved. seemed the most gain was in the initial first time byte.
wasn't a huge gain but I also have done NO tuning. but it was easy enough to install that it was worth it to me.
but as I said this is not for everyone, just a tool that may help.
I need to get off my butt and do some tuning though.
 
So you did not change any filters and rules? While googling about the mod, I've found an opinion that it does not want to work from the box and a customization is required. Can you comment this?
 
I have not changed anything yet, I've also seen those type of posts and have no explanation. only thing I can think of is since this is installed slightly differently it may make a difference???
I suppose existing apache config could also be a factor.
no idea really.
 
Hi,
I get error with the below message:
rpm -i –nodeps mod-pagespeed-beta_current_x86_64.rpm
error: open of –nodeps failed: No such file or directory
warning: mod-pagespeed-beta_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
 
Hello,

Your rpm version seems no to support nodeps. So try without specifying it.

Are you running centos 6 or centos 5?
 
Don't mind. I will do not install for DirectAdmin. Google guys say that need do some custom stuff for specific control panel (Cpanel, DirectAdmin,...)

And the author of tutorial confirmed that mod_pagespeed caused server run more slowly.
 
Back
Top