Quick Trac : A Quick Installation

The Trac is a software project management and issue tracking system oriented for development projects. It comes with an integrated Wiki, an interface to version control systems and a number of convenient ways to keep in track of changes within a project. Trac was in fact inspired by the CVSTrac, another project management and issue tracking system.

Trac is written employing the Python programming language and requires a database (SQLite, PostgreSQL or MySQL) for its implementation. For HTML rendering, this software uses the Genshi templating system.

The following URL gives a listing of its supported platforms and also its various distributions :
http://trac.edgewall.org/wiki/TracInstallPlatforms

This article focuses on a simple and quick method to install Trac in CentOS distribution.

Installation

First, you need to download the MySQL python bindings from :
http://downloads.sourceforge.net/mysql-python/MySQL-python-1.2.2.tar.gz

1. Install Python and its related binding using yum.

yum install python

2. In order to run python scripts as a module using apache, you will need to install mod_python using :

yum install mod_python

3. Install MySQL-python in order that python can interact with MySQL

wget http://downloads.sourceforge.net/mysql-python/MySQL-python-1.2.2.tar.gz
tar xzf MySQL-python-1.2.2.tar.gz
cd MySQL-python-1.2.2
python setup.py build && python setup.py install

OR you can also try installing it using yum as follows :

yum install MySQL-python.i386

4. Install the devel packages that are required for compilation of trac and svn integration as follows :

yum install neon neon-devel python-devel swig

5. Trac requires Clearsilver, a templating package in order to serve HTML rendering. To install it, use the following steps :

wget http://www.clearsilver.net/downloads/clearsilver-0.10.5.tar.gz
tar xzf clearsilver-0.10.5.tar.gz
cd clearsilver-0.10.5
./configure && make && make install

6. Finally to install Trac, do the following :

wget http://ftp.edgewall.com/pub/trac/Trac-0.11.2.1.tar.gz
tar xzf Trac-0.11.2.1.tar.gz
cd Trac-0.11.2.1
python setup.py install

There are chances that this may produce the following error :

“ImportError: No module named setuptools”

In this case, you will need to install the “setuptools” to resolve the issue:

wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c8.tar.gz
tar xfvz setuptools-0.6c8.tar.gz
cd setuptools-0.6c8
python setup.py build
python setup.py install

7. Initialize your first Trac project using the command :

trac-admin /srv/trac/ initenv

8. Add proper “SetHandler”, “PythonHandler” and “PythonOption” tags in the Location section (“Location /”) of the Apache configuration file.

An example is as mentioned below:

SetHandler mod_python
PythonHandler trac.web.mod python_frontend
PythonOption TracEnv $pathtoyourtracproject
PythonOption TracUriRoot /trac/

In my case, I added the following, since my ‘pathtoyourtracproject’ is /srv/trac :

SetHandler mod_python
PythonHandler trac.web.mod python_frontend
PythonOption TracEnv /srv/trac/
PythonOption TracUriRoot /trac/

Now, restart Apache for the changes to take effect.

The output of “trac-admin /srv/trac/ initenv” will be as follows:

Warning: couldn't index the repository.

This can happen for a variety of reasons: wrong repository type,
no appropriate third party library for this repository type,
no actual repository at the specified repository path...

You can nevertheless start using your Trac environment, but
you'll need to check again your trac.ini file and the [trac]
repository_type and repository_path settings in order to enable
the Trac repository browser.

Project environment for 'First project Joseph Symon' created.

You may now configure the environment by editing the file:

/srv/trac/conf/trac.ini
/srv/trac/conf/trac.ini =>
default_charset = UTF-8

If you'd like to take this new project environment for a test drive,
try running the Trac standalone web server `tracd`:

  tracd --port 8000 /srv/trac

root@josephsym//usr/src/trac/Trac-0.11.2.1#  tracd --port 8000 /srv/trac
Server starting in PID 23684.
Serving on 0.0.0.0:8000 view at http://127.0.0.1:8000/

IP - - [03/Feb/2009 14:51:49] "GET /trac HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:50] "GET /trac/chrome/common/css/trac.css HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:50] "GET /trac/chrome/common/css/wiki.css HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:50] "GET /trac/chrome/common/css/code.css HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:50] "GET /trac/chrome/common/js/jquery.js HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:50] "GET /trac/chrome/common/trac.ico HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:50] "GET /trac/chrome/common/js/trac.js HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:50] "GET /trac/chrome/common/js/search.js HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:50] "GET /trac/chrome/common/trac_logo_mini.png HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:51] "GET /trac/chrome/common/topbar_gradient.png HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:51] "GET /trac/chrome/common/dots.gif HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:51] "GET /trac/chrome/common/extlink.gif HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:51] "GET /trac/chrome/site/your_project_logo.png HTTP/1.1" 404 -
IP - - [03/Feb/2009 14:51:53] "GET / HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:53] "GET /favicon.ico HTTP/1.1" 404 -
IP - - [03/Feb/2009 14:51:56] "GET /trac HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:51:57] "GET /trac/chrome/site/your_project_logo.png HTTP/1.1" 404 -
IP - - [03/Feb/2009 14:52:00] "GET /trac/wiki HTTP/1.1" 200 -
IP - - [03/Feb/2009 14:52:00] "GET /trac/chrome/site/your_project_logo.png HTTP/1.1" 404 -
Now, point your browser to http://IP:8000/trac to access the installed software.

 

 

Conclusion

Currently, only the Subversion versioning system is supported in Trac. In future, Trac will probably support other systems like CVS. You can keep track of this at http://trac.edgewall.org/wiki/VersioningSystemBackend. Meanwhile, Trac is an excellent tool for tracking software development projects and SVN integration. It’s ease of use helps your clients also use the system to find out how far along you are. This in fact, saves times that would otherwise be spent in meetings, phone calls and emails, and thereby increases productivity and efficiency easily and with minimum fuss.

Reference

http://trac.edgewall.org/
http://www.madboa.com/geek/trac-centos/


About the Author :

Joseph Symon has been with Bobcares for more than two years. He has marked his presence in the company through his contributions towards enriching the knowledge level in the company. He is a Linux expert, and specializes in installing and configuring systems and customizing them for specific needs. Joseph is highly passionate about learning new technologies.



Bobcares
Bobcares is a server management company that helps businesses deliver uninterrupted and secure online services. Our engineers manage close to 51,500 servers that include virtualized servers, cloud infrastructure, physical server clusters, and more.
MORE ABOUT BOBCARES

Related Posts

Privacy Preference Center

    Necessary

    Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

    PHPSESSID - Preserves user session state across page requests.

    gdpr[consent_types] - Used to store user consents.

    gdpr[allowed_cookies] - Used to store user allowed cookies.

    PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
    PHPSESSID
    WHMCSpKDlPzh2chML

    Statistics

    Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

    _ga - Preserves user session state across page requests.

    _gat - Used by Google Analytics to throttle request rate

    _gid - Registers a unique ID that is used to generate statistical data on how you use the website.

    smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

    _ga, _gat, _gid
    _ga, _gat, _gid
    smartlookCookie

    Marketing

    Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

    IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

    test_cookie - Used to check if the user's browser supports cookies.

    1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

    NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

    DV - Google ad personalisation

    IDE, test_cookie, 1P_JAR, NID, DV, NID
    IDE, test_cookie
    1P_JAR, NID, DV
    NID