Installation:
Apt-Get install-y mysql-server apache2 libapache2-mod-python Python-mysqldb Python-Django
These are not currently installed
Xfsprogs Python-imaging subversion PhP5 phpMyAdmin
You can also install it using the source code:
Setuptools-0.6c11.tar.gz
./Setup. py install after setuptools is installed
Install mysql-Python, Django-1.3.1
Python setup. py install
MySQL-python-1.2.3.tar.gz
Django-1.3.1.tar.gz
Configuration:
cd /etc/apache2vi httpd.conf
Add
<Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE myproject.settings PythonOption django.root /myproject PythonDebug On PythonPath "['/var/www'] + sys.path"</Location>
Alias /adm_media/ /usr/lib/pymodules/python2.7/django/contrib/admin/media/<Location "/adm_media/"> SetHandler None</Location>
Alias /files/ /var/www/myproject/files/<Location "/files/"> SetHandler None</Location>
Restart apache2:
/etc/init.d/apache2 restart
Refer:
http://codespatter.com/2008/10/15/setting-up-apache2-mod_python-mysql-and-django-on-debian-lenny-or-ubuntu-hardy-heron/
http://fosswire.com/post/2008/05/installing-mod_python-and-django-on-apache/