Search code examples
linuxapache2mod-pagespeedwebfaction

How to install apache2 modules on Linux without sudo


I am trying to install mod_pagespeed for my Apache2 server that I have serving up my Django application. I am using Webfaction as a hosting service, and am in the apache2 directory. I am trying to figure out how to install Apache2 modules as I haven't done a lot of server configuration in the past, but all the tutorials I'm seeing use sudo and I don't have root access to use sudo, and all the tutorials I'm reading have installations for Ubuntu and Fedora with extensions of .rpm, and .deb but all the modules in my apache2 modules directory have an extension of .so . Does this mean I have to use a different installation method ? What is the command to install mod_pagespeed in linux ?


Solution

  • wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
    rpm -U mod-pagespeed-*.rpm
    

    Configure and restart Apache per your usual process. I'm assuming this system already has at installed. If you encounter permission errors during the rpm step, you'll need to extract the contents and install them manually. Edit: your copy of tar seems too old to understand rpm format. Use this command instead.

    rpm2cpio mod-pagespeed-*.rpm | cpio -idmv
    

    Then copy the .so file to the proper location and do a LoadModule declaration in your Apache config to load it upon restart.

    Source: https://www.digitalocean.com/community/tutorials/how-to-get-started-with-mod_pagespeed-with-apache-on-a-centos-and-fedora-cloud-server