In preparing to upgrade this server to Centos 5.x, I did a test install of the Centos "Server" configuration using . The "Server" configuration comes with Apache 2.x, Python 2.4, and mod_python pre-loaded.
Installing Django
Here are the commands needed to install the latest version of Django:
$ yum install subversion
$ cd /var/www
$ mkdir django-src
$ cd django-src
$ svn co
$ cd trunk
$ python setup.py install
Installing and Starting MySQL Server
Here are commands needed to install and start MySQL:
$ yum install mysql-server
$ /etc/rc.d/init.d/mysqld start
Installing Python MySQL Support
This is the trickiest part. Python talks to MySQL using software called
MySQLdb. The version available in Centos via Yum is 1.2.1-1 and isn't
compatible with the most recent Django codebase. Because of this you
must download and compile MySQLdb.
Before compiling MySQLdb, enter the command below to make sure you have the necessary tools:
$ yum install python-devel mysql-devel gcc
Next, download the source tarball from then follow these steps:
$ mv ~
$ cd ~
$ tar zxvf
$ cd
$ python setup.py build
$ python setup.py install
When these steps are completed you should be good to go.
转自:
阅读(2808) | 评论(0) | 转发(0) |