Install mod pagespeed for cPanel EA4

From Acenet Knowledgebase
Revision as of 21:09, 11 January 2018 by Docs admin (talk | contribs) (Docs admin moved page Install PageSpeed for cPanel EA4 to Install mod pagespeed for cPanel EA4 without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to install mod_pagespeed on a cPanel server running EasyApache 4

Enter the following command to edit a new macro file:

<syntaxhighlight lang="bash"> nano /etc/rpm/macros.apache2 </syntaxhighlight>

Within this file, copy and paste the following 8 lines to the file, and save.

<syntaxhighlight lang="bash"> %_httpd_mmn 20120211x8664 %_httpd_apxs /usr/bin/apxs %_httpd_dir /etc/apache2 %_httpd_bindir %{_httpd_dir}/bin %_httpd_modconfdir %{_httpd_dir}/conf.modules.d %_httpd_confdir %{_httpd_dir}/conf.d %_httpd_contentdir /usr/share/apache2 %_httpd_moddir /usr/lib64/apache2/modules </syntaxhighlight>

Next, run the following commands to build the apache module and add to EasyApache 4.

<syntaxhighlight lang="bash"> yum install rpm-build cpio ea-apache24-mod_version wget https://github.com/pagespeed/cpanel/raw/master/EA4/ea-apache24-mod_pagespeed-latest-stable.src.rpm rpmbuild --rebuild ea-apache24-mod_pagespeed-latest-stable.src.rpm rpm -ivh /root/rpmbuild/RPMS/x86_64/ea-apache24-mod_pagespeed*.rpm /etc/init.d/httpd restart </syntaxhighlight>

Mod_pagespeed should now be installed, and you can verify this by running EasyApache 4 and checking the apache module section for it.