This tutorial assumes that you have webmin installed and running. It also assumes that you know how to use su and the webmin . Check previous posts for how to install and configure webmin.
STEPS
- Install Apache,Django, mod-python and postgreSQL
- Start Apache, PostgreSQL via the Webmin module
- Make the Directory where your project will be hosted
- Set it as a Django path
- Edit the python.conf file
- Make sure that your site is in the apache aliases . You can add this by going to webmin->servers->Apache Webserver->Default Server->Aliases and Redirects
Add mysite (or whatever you want to call it) and set the path to /home/projects/mysite - Restart apache
- Go to your browser, type in localhost/mysite (or whatever you called it in the redirects)
yum install apache, mod-python, django, postgresql, postgresql-server
You can install the above via yumex too.
You can install the above via yumex too.
mkdir /home/projects
cd /home/projects
/usr/bin/django-admin startproject mysite
/usr/bin/django-admin startproject mysite
su
*backup
cp /etc/httpd/conf.d/python.conf /etc/httpd/conf.d/python.conf.bak
*edit
gedit /etc/httpd/conf.d/python.conf
*Add the following lines
*Make sure that you have this line in your configuration and its is not commented out (#)
LoadModule python_module modules/mod_python.so
*backup
cp /etc/httpd/conf.d/python.conf /etc/httpd/conf.d/python.conf.bak
*edit
gedit /etc/httpd/conf.d/python.conf
*Add the following lines
<location "/mysite/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonDebug On
PythonPath "['/home/projects'] + sys.path"
</location>
*Make sure that you have this line in your configuration and its is not commented out (#)
LoadModule python_module modules/mod_python.so
su
apachectl restart
apachectl restart
Blogged with the Flock Browser
No comments:
Post a Comment