How to install and integrate mod_wsgi in cpanel server

Post Reply
a24uall
Site Admin
Posts: 166
Joined: Sun Jul 01, 2012 9:07 am

How to install and integrate mod_wsgi in cpanel server

Post by a24uall »

First i would suggest you to install python 2.7
Follow the steps below to install python 2.7.X
cd /usr/local/src
Download Python latest from the website below. For Python2.7 use the link :

Code: Select all

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xzvf Python-2.7.3.tgz
Now to install python 2.7
cd Python-2.7.3
It’s important that you build Python with shared libraries enabled, since mod_wsgi will need them.
./configure --enable-shared
make install
You’ll get a new build of python in /usr/local/bin, without disrupting the native version in /usr/bin. Any user wanting python2.7 to be their default can add this to their .bash_profile:
PATH=/usr/local/bin:$PATH:$HOME/bin
cd /etc/ld.so.conf.d
echo "/usr/local/lib/" > python27.conf
ldconfig
Now you can use the link below to download "custom_opt_mod-mod_wsgi.tar.gz"
cd /usr/local/src
OR
tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_wsgi.tar.gz
Now you can run
/scripts/easyapache
You should see that in the first apache conf screen "MOD WSGI"
Arun
WebhostingDevelopment.com
Post Reply

Return to “Install Commands”