Thursday, March 17, 2011

Installing Trac and Subversion with Python 2.5 on Centos 5.5

1. Install RPMForge repo
rpm -ihv http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

1a. Good to have
yum install bash-completion

2. Black list subversion in [base] and [updates] repos
vim /etc/yum.repos.d/CentOS-Base.repo
[base]
exclude=subversion
exclude=subversion-devel
...
[updates]
exclude=subversion
exclude=subversion-devel
...


3. Get 1.6.6 Subversion install script from www.wandisco.com and follow instructions to install it.

4. Install MySQL.
yum install mysql mysql-devel

5. Install Python 2.5, Trac and rebuild mod_python accordig to Installing-python-25-on-centos-5 and Installing-trac-on-centos-5.

6. Build Subversion bindings:
* qet Sqlite
wget http://www.sqlite.org/sqlite-autoconf-3070500.tar.gz
tar xzvf sqlite-autoconf-3070500.tar.gz && cd sqlite-autoconf-3070500 && make && make install


* get and build SWIG
wget http://downloads.sourceforge.net/project/swig/swig/swig-2.0.2/swig-2.0.2.tar.gz
tar xzvf swig-2.0.2.tar.gz && ./configure --with-python=/usr/bin/python25 --prefix=/usr && make && make install


* build Python 2.5 subversion bindings
wget http://subversion.tigris.org/downloads/subversion-1.6.16.tar.bz2
tar xjvf subversion-1.6.16.tar.bz2 && cd subversion-1.6.16
./configure PYTHON=/usr/bin/python25 --with-sqlite=/usr/local && make && make swig-py && make install-swig-py
echo /usr/local/lib/svn-python > /usr/lib/python2.5/site-packages/svn.pth


At this point you should have Subversion 1.6.6, Trac 0.12, MySQLDb 1.2.2 and mod_python configured to run with Python 2.5.

No comments: