Cybernet Web Design - Web Design & Linux Server Administration
Easily Enable Mod_PageSpeed in Centos Web Panel (Without Compiling) - Printable Version

+- Cybernet Web Design - Web Design & Linux Server Administration (https://www.cybernetwebdesign.com)
+-- Forum: Web Server (https://www.cybernetwebdesign.com/Forum-Web-Server)
+--- Forum: Centos Server Red Hat (https://www.cybernetwebdesign.com/Forum-Centos-Server-Red-Hat)
+--- Thread: Easily Enable Mod_PageSpeed in Centos Web Panel (Without Compiling) (/Thread-Easily-Enable-Mod-PageSpeed-in-Centos-Web-Panel-Without-Compiling)



Easily Enable Mod_PageSpeed in Centos Web Panel (Without Compiling) - cybernetwebdesign - 01-19-2017

Enable Mod_deflate
 
Code:
/usr/local/apache/bin/apxs -c -i /tmp/apache-build/httpd-2.2.27/modules/filters/mod_deflate.c

Enable Mod_version
 
Code:
/usr/local/apache/bin/apxs -c -i /tmp/apache-build/httpd-2.2.27/modules/metadata/mod_version.c

Download and Install Mod_PageSpeed
 
Code:
mkdir -p /usr/local/src/mod_pagespeed
cd /usr/local/src/mod_pagespeed
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
rpm2cpio mod-pagespeed-stable_current_x86_64.rpm | cpio -idmv
cp /usr/local/src/mod_pagespeed/usr/lib64/httpd/modules/mod_pagespeed.so /usr/local/apache/modules/
cp /usr/local/src/mod_pagespeed/usr/lib64/httpd/modules/mod_pagespeed_ap24.so /usr/local/apache/modules/
cp /usr/local/src/mod_pagespeed/etc/httpd/conf.d/pagespeed.conf /usr/local/apache/conf/
cp /usr/local/src/mod_pagespeed/etc/httpd/conf.d/pagespeed_libraries.conf /usr/local/apache/conf/
chmod 755 /usr/local/apache/modules/mod_pagespeed.so
chmod 755 /usr/local/apache/modules/mod_pagespeed_ap24.so
mkdir -p /var/cache/mod_pagespeed/
chown -R nobody:nobody /var/cache/mod_pagespeed/
wget --output-document="/usr/local/apache/conf/pagespeed.conf" http://dl-package.bullten.in/cwp/files/mod_pagespeed/pagespeed.txt

Enable Mod_PageSpeed in Apache
 
Code:
echo 'Include "/usr/local/apache/conf/pagespeed.conf"' >> /usr/local/apache/conf/httpd.conf

Restart Apache
 
Code:
service httpd restart