Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X
Post

Installing Trac on Centos

Installing Trac on Centos? 5.5 – tutorial that i wrote for myself…

1) Pre-install things
For some SVN / Trac packages we will need 3rd party repo like RPM FORGE
i386:

1
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

x86_64:

1
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

2) Installation of Trac / SVN and some dependencies

1
2
3
4
5
6
yum -y groupinstall "development tools"
yum -y install neon neon-devel python-devel swig python-setuptools mod_python MySQL-python trac
wget http://www.clearsilver.net/downloads/clearsilver-0.10.5.tar.gz
tar -xvf clearsilver-0.10.5.tar.gz
cd clearsilver-0.10.5
./configure && make && make install

3) Configuration (most important)
SVN Configuration
Create Directories for SVN

1
2
mkdir /var/www/svn/svnrepos
mkdir /var/www/svn/auth

User authentification for SVN :

1
htpasswd -cb /var/www/svn/auth/svn.htpasswd vaska94 somemysecretpassword

Create SVN Repo :

1
2
svnadmin create /var/www/svn/svnrepos/vaska94project
chown -R apache:apache /var/www/svn/svnrepos/vaska94project

Configure Apache to Serve SVN:

1
nano /etc/httpd/conf.d/svn.conf

then paste this :

1
2
3
4
5
6
7
8
<Location /svn>
DAV svn
SVNListParentPath on
SVNParentPath /var/www/svn/svnrepos/
AuthType Basic
AuthName “Private Repository”
AuthUserFile /var/www/svn/auth/svn.htpasswd
Require valid-user

Create a Trac Project:

1
trac-admin /var/www/trac/vaska94project initenv
1
2
chmod -R 777 /var/www/trac/vaska94project
chown -R apache:apache /var/www/trac/vaska94project/

Configure apache to Serve Trac:

1
nano /etc/httpd/conf.d/trac.conf

Then Change PythonOption TracEnvParentDir
Value to /var/www/trac
Result should look like this:

1
PythonOption TracEnvParentDir /var/www/trac

User authentification for Trac :

1
2
htpasswd -cb /var/www/trac/.htpasswd vaska94 somemysecretpassword
trac-admin /var/www/trac/vaska94project add vaska94 TRAC_ADMIN

Now at last configure Trac Project to Serve SVN Repo:

1
nano /var/www/trac/vaska94project/conf/trac.ini

change Repository_dir Value to /var/www/svn/svnrepos/vaska94project
now at last set apache to run in startup and restart it:

1
2
chkconfig --level 234 httpd on
service httpd restart

BTW you Could Reach your TRAC / SVN @
http://127.0.0.1/svn
http://127.0.0.1/trac

Stop SOPA