1

I have installed Apache 2.4 on the Red Hat Enterprise Linux Server release 6.7 (Santiago) by following these steps

Step1

cd /etc/yum.repos.d/
wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo

Step2

yum install httpd24.x86_64

and Apache is installed at the following location

/opt/rh/httpd24/root/etc/httpd

I am now trying to install mod_pagespeed on my Apache installation by following these command

cd /etc/yum.repos.d/
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
rpm -U mod-pagespeed-*.rpm

but while running rpm -U mod-pagespeed-*.rpm, I am getting following error

warning: mod-pagespeed-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
error: Failed dependencies:
    httpd >= 2.2 is needed by mod-pagespeed-stable-1.9.32.10-7443.x86_64

I am aware that I have not used the standard way of installing Apache on the machine, but is there a way to install mod_pagespeed without remove current Apache installation?

Other option for me is to install Apache from RHEL standard repo and not using Apache2.4

| improve this question | | | | |
  • You can probably get past RPM with --nodeps but then you'll still likely need to move filed around manually – Jeff Schaller Nov 14 '15 at 22:09
  • The answers below are for centos7/rhel 7 but the question is about rhel 6, and non e of the answers given actually work in the configuration the requester required. – Brian Minton Dec 2 '19 at 21:30
1

This worked for me on CentOS Linux release 7.5.1804 (Core), with Apache/2.4.6 and PHP/5.6.38.

First lets edit/create google-mod-pagespeed.repo

vi /etc/yum.repos.d/google-mod-pagespeed.repo

Then lets add

[google–mod–pagespeed]
name=google–mod–pagespeed
baseurl=http://dl.google.com/linux/mod-pagespeed/rpm/stable/$basearch
enabled=1
gpgcheck=0

Now lets use yum to install it

yum install mod-pagespeed

Last, but not the least, lets restart apache

service httpd restart

To test you can use

curl -D- http://localhost/ | head -10

And lets hope you get something like in the result...

X-Mod-Pagespeed: 1.13.35.2-0

| improve this answer | | | | |
  • This repo didn't work for me, but maybe that was because didn't do yum install at first. The curl command is a good way to test, though, so +1 for that. Note that you can use curl -D- http://www.servername.com/ | head -10 to fetch your live website, if you are testing a particular virtual host. – Evan Donovan Nov 8 '19 at 15:25
1

Here is a proper guide on how to install most recent version of mod_pagespeed module for Apache or Nginx on RHEL/CentOS and Debian/Ubuntu-based systems..

http://www.tecmint.com/install-mod_pagespeed-to-boost-apache-nginx-performance/

Key points:

On RHEL/CentOS and Fedora

----------- On 32-bit Systems -----------------
# wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.rpm
# yum install at   [# if you don't already have 'at' installed]
# rpm -Uvh mod-pagespeed-stable_current_i386.rpm

----------- On 64-bit Systems -----------------
# wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
# yum install at   [# if you don't already have 'at' installed]
# rpm -Uvh mod-pagespeed-stable_current_x86_64.rpm

On Debian and Ubuntu

----------- On 32-bit Systems -----------------
$ wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb
$ sudo dpkg -i mod-pagespeed-stable_current_i386.deb
$ sudo apt-get -f install

----------- On 64-bit Systems -----------------
$ wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
$ sudo dpkg -i mod-pagespeed-stable_current_amd64.deb
$ sudo apt-get -f install
| improve this answer | | | | |
  • Links can rot; it would be helpful to summarise the relevant parts of the resource here so that this actually answers the question itself. – Michael Homer Oct 15 '16 at 6:02
0

A 2.2 Apache module in an Apache 2.4 installation won't work.

I recommend you follow the instructions from here.

http://tecadmin.net/installing-mod_pagespeed-module-apache/

| improve this answer | | | | |
0

I know this is old, but I found this resource which may explain the issue. (https://groups.google.com/forum/#!topic/mod-pagespeed-discuss/zI2reYRfqYA) I ran into this too, I think because my Apache installation is managed by EasyApache in cpanel. Therefore, the httpd files aren't where pagespeed expects them to be. The answer given in the link is that the easiest thing to do is to build pagespeed from source.

Instructions can be found here: https://www.modpagespeed.com/doc/build_mod_pagespeed_from_source

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.