python

Tutorial: Installing Django 1.1. on CentOS 5.4

This step-by-step tutorial walks you through the installation of Django 1.1 with Apache and MySQL. on CentOS 5. The example VPS used during the walk-through is the popular SliceHost from RackSpace ™ The steps involved should be quite similar for any properly installed CentOS 5.x (or RedHat EL 5.x).

We use the latest stable version of Python: 2.6 and mod_wsgi (far superior alternative to mod_python), in this tutorial. Django is not, yet, compatible with Python 3.x branch (few things are).

Python, Django and LAMPP

Disclaimer: the problem and the solution are not unique to LAMPP. If you have a MYSQL installation with uncommon paths, you will get a similar problem and you can solve it in a similar way. Just make sure you insert correct paths in the newly created .conf file for the LD (see below).

If, for whatever reason, you are running MySQL from your LAMPP installation and try to use Python's MySQLdb API to connect to MySQL server you will get the following nasty error into your face:

ImportError: libmysqlclient_r.so.15: cannot open shared object file

The problem is that lampp, in its attemt to not disturb the rest of the OS space, does not expose some crucial shared libraries (like: mysql client, ssl etc.) to Linux at large and Python is unable to find them even though they are installed under LAMPP.

The solution is quite easy

Syndicate content