- 论坛徽章:
- 4
|
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 http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm'
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.
django-admin.py startproject /home/me/mynewproject
If a directory with the same name and some standard django sub-directories are created, then your installation was successful.
转自:http://codeghar.wordpress.com/2008/10/18/django-in-centos/
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/74256/showart_2143447.html |
|