简体   繁体   中英

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 ?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM