Django in CentOS

This post has been written using CentOS 5.2, but these instructions may also work for other versions. Just let us know if they don’t.

Install EPEL

Extra Packages for Enterprise Linux (EPEL) is “a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux […] and its compatible spinoffs such as CentOS or Scientific Linux.” You need this repository to install Django from a package. Another option is to download source and compile yourself. This guide, however, will be using packages. So just follow the instructions to add EPEL repository, which state:

su -c 'rpm -Uvh'

Install Django

To install django from EPEL, just run the following command:

sudo yum install Django

Notice the uppercase ‘D’ in the name of the package. Django is installed in /usr/lib/python2.4/site-packages/django/ and it should already be included in the path.

Test Django

To make sure everything was installed properly, try to create a simple new project. startproject /home/me/mynewproject

If a directory with the same name and some standard django sub-directories are created, then your installation was successful.


Comments are closed.

%d bloggers like this: