yum -y install subversion (IF it’s not already installed)
svn co https://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk mod_python
cd mod_python
./configure –with-apxs=/usr/local/apache/bin/apxs
make && make install
Then add to httpd.conf in the top section where the other modules are loaded:
LoadModule python_module modules/mod_python.so
And run the distiller to save the change in the configuration:
/usr/local/cpanel/bin/apache_conf_distiller –update
Using cPanel’s custom mod:
At the time this article was written, this method only worked with Apache 2.0 (not Apache 2.2). It will add a mod_python option to EasyApache so you can enable during the build. Follow the below instructions and then run EasyApache to select mod_python.
cd /var/cpanel/easy/apache/custom_opt_mods
wget http://www.cpanel.net/apps/easyapache/optmods/custom_opt_mod-mod_python.tar.gz
tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_python.tar.gz
rm custom_opt_mod-mod_python.tar.gz