Pinax with mod_wsgi installation (Slackware 12.1)
01/11/2008 // No comment // Category: My Everything // Thẻ: django, mod_wsgi, pinax, programming, python, slackware.I’m quite new to Django, Pinax and mod_wsgi, so today i decided to try on Pinax with a Slackware 12.1 development box. Everytime I forget after doing something, so better to note it down here, easier for me to remind it later, official Pinax 0.5 has been out for few days, and it’s a good time to try it to see how it can replace my current home-made PHP CMS. I’m not very used to Django, so another chance to play with it, my experience with Python framework only stop at Skunkweb & Quixote.
Okay, now is how i managed everything to work with some helps from James Tauber on #pinax irc
+ Before downloading Pinax 0.5, you need to setup Apache2, Django & mod_wsgi on Slackware 12.1, configure and load mod_wsgi in apache. Googling will be your friend
+ Download Pinax from http://pinaxproject.com/download
+ Unzipped to /srv/pinax
+ Firstly initialize the database (sqlite3):
#/srv/pinax/projects/complete_project/manage.py syncdb
This will create dev.db in complete_project, it will create an user during installation for you to login
Okay, now it’s time to adjust something
+ To run in mod_wsgi, the database file should be in absolute path, so edit /srv/pinax/projects/complete_project/settings.py:
DATABASE_NAME = ‘/srv/pinax/projects/complete_project/dev.db’
+ Add a symlinks to your django admin media folder (mine is at: /usr/lib/python2.5/site-packages/django/contrib/admin/media/)
#ln -s /usr/lib/python2.5/site-packages/django/contrib/admin/media /srv/pinax/projects/complete_project/admin_media
+ Made everything owned by apache user/group
#chown -R apache:apache /srv/pinax
+ The wsgi for deployment stays in /srv/pinax/projects/complete_project/deploy/complete_project.wsgi, we need to specify this in the apache virtual host, here is mine /etc/httpd/extra/httpd-vhosts:
<VirtualHost *:80>
ServerAdmin admin@pinax.dev.com
ServerName pinax.dev.com
DocumentRoot “/srv/pinax”
WSGIScriptAlias / /srv/pinax/projects/complete_project/deploy/complete_project.wsgi
Alias /site_media /srv/pinax/projects/complete_project/site_media
Alias /media/ /srv/pinax/projects/complete_project/admin_media/
WSGIProcessGroup pinax
WSGIDaemonProcess pinax user=apache group=apache threads=25<Directory “/srv/pinax”>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog “/var/log/httpd/pinax.dev.com-error-log”
</VirtualHost>(Note: You need to put an entry in /etc/hosts for pinax.dev.com point to 127.0.0.1)
+ Restart the apache server #/etc/rc.d/rc.httpd restart
+ Browse http://pinax.dev.com to see if it works. If you encounter the PYTHON_EGG_CACHE problem then create folder .python-eggs inside /var/www and made it owned by apache user/group
Hope that will work for u too. Still not working, head on #pinax irc, you might get the answer
Leave a Reply
Recent Posts
Recent Comments
- car on Google App Engine & cron jobs
- Rodrigo Marangon on Mod_python + Apache 2 + Slackware Error
- gabriel on Install packages for PEAR in XAMPP (Ubuntu Linux)
- mod_python on Apache 2 | Miscellaneous musings in beta on Mod_python + Apache 2 + Slackware Error
- Gilberto Ramos on Get back your Alt+Ctrl+Backspace in Karmic
Blogroll
car: nice engine, i'll try to pimp my ride
Rodrigo Marangon: Thanks for sharing! It was very helpful. Another way to make mod_python work is replacing the ...
gabriel: just the info that I was looking for... tnx ...
Gilberto Ramos: very useful! i was looking for this..!
Venkat Mantirraju: This is an excellent guide. Thanks a lot for your effort and time in making ...
How to clear DNS cache in Mac (Tiger, Leopard, Snow Leopard)
31/07/2010
Validation with Jquery
26/07/2010
Add your Google Apps email to Palm Pre
19/07/2010
Install packages for PEAR in XAMPP (Ubuntu Linux)
17/03/2010
Skype on Ubuntu Lucid Lynx 10.04
17/03/2010
Eclipse 3.5 Galileo on Ubuntu Jaunty 9.04
| 12 comments
Google App Engine & cron jobs
| 4 comments
vmware-tools on Slackware 12.1
| 3 comments
Django, Mod-Python & CouchDB
| 2 comments
Mapnik installation on Slackware 12.1
| 2 comments
- © 2009 Tech Mix. All rights reserved.
- WPLine 1.0 designed by Hutek - A member of Vietnam Wordpress Commnunity.
- Powered by Wordpress. Work fine on almost popular browsers.


