Tag Archives: sandbox

Why i like tuna…

22 May

ok, first off let me say this is a post for one of my best friends. she’s out in iraq right now (gotta love the sandbox). so here ya go tuna, something to say we miss ya, hurry back, and can’t wait ta give ya a discount – lol ;P.

Here’s wishing you the best training those nasty recruits when you get back. oh yeah and hiss (double fangs)

that’s it.. oh yeah and Semper Fi Devil

setup trac on media temple dv or centos with plesk installations

16 May

I covered svn setup on media temple dv and similar centos with plesk setups here : http://elsid.net/2007/05/07/setup-svn-server-on-media-temple-dv-or-centos-with-plesk/

Now i’ll cover the basics of setting up trac on media temple dv and similar centos with plesk setups. Please note this is what worked for me (and should work for other media temple dv setups). Please let me know if i missed something, or any recommendations.

first steps

First you need to request root access and the developer tools package. Once that’s done we’re ready to start.

This setup will use mysql for the trac database and serve trac from a subdomain. I’m only covering the setup of a vanilla trac installation

You can take a look at the trac install guide here : http://trac.edgewall.org/wiki/TracInstall

Preq’s / What you’ll need:

clear silver :

  • download – http://www.clearsilver.net/downloads/
  • setup docs – http://lists.edgewall.com/archive/trac/2005-December/006090.html
  • setup – ./configure, make, make install
  • setup tools :

  • download – http://svn.python.org/projects/sandbox/trunk/setuptools/#egg=setuptools-dev
  • setup docs – http://svn.python.org/projects/sandbox/trunk/setuptools/README.txt
  • setup – sh setuptools-0.6c4-py2.4.egg
  • mysqldb:

  • download – http://sourceforge.net/project/showfiles.php?group_id=22307
  • setup docs – http://blog.spikesource.com/mysqldb.htm
  • setup – python setup.py build, python setup.py install
  • python:

  • already installed
  • mod_python:

  • already installed
  • svn:

  • http://elsid.net/2007/05/07/setup-svn-server-on-media-temple-dv-or-centos-with-plesk/
  • More pre-install steps

    I covered svn setup here : http://elsid.net/2007/05/07/setup-svn-server-on-media-temple-dv-or-centos-with-plesk/

    svn must be rebuilt to work correctly with trac. http://trac.edgewall.org/ticket/3706#comment:10 .

    First we need to edit the svn makefile.
    change : SVN_APR_LIBS = /root/subversion-1.4.3/apr/libapr-0.la -lrt -lm -lcrypt -lnsl -lpthread -ldl
    to : SVN_APR_LIBS = /root/subversion-1.4.3/apr/libapr-0.la -lrt -lm -lcrypt -lnsl -lpthread -ldl -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto
    replace /root/subversion-1.4.3 with what ever is the path in your file.

    now run make clean, then make, and make install

    Almost done. We’ll build swig and then move to our trac setup. in your subversion build folder do the following.

    make swig-py
    make install-swig-py
    make swig-py install

    If you’ve installed all the preq’s, rebuilt svn, and built swig we should be ready to install trac.

    –note : you may need to copy the svn and libsvn folder from /usr/local/lib/svn-python to /usr/lib/python/site-packages. remember copy not move.

    Install trac

    Install Trac
    python ./setup.py install

    Setup Project

    go to plesk and setup a subdomain for trac. Make sure you only select python support.

    now setup a mysql database at the same domain you made your trac subdomain at. Add a user for this database and we’re almost home.

    make the following directorys :
    /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/test
    /var/www/vhosts/yourdomain/subdomains/yoursubdomain/svn/test

    setup a project : trac-admin /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/test initenv

    setup a test svn for this project : svnadmin create /var/www/vhosts/yourdomain/subdomains/yoursubdomain/svn/test

    make a sub directory in our trac directory and chmod 0777 it, we’ll need this later: mkdir /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/plugins
    chmod 0777 /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/plugins

    be sure to check the permissions on your svn and trac directory, we need to be sure apache is able to access and run our files.

    go to the conf directory for your subdomain : cd /var/www/vhosts/yourdomain/subdomains/yoursubdomain/conf

    almost done make a file : vhost.conf

    Open this file and add the following, remember to fix the paths to your domain and subdomain:


    SetEnv PYTHON_EGG_CACHE /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/plugins
    SetHandler mod_python
    PythonHandler trac.web.modpython_frontend
    PythonOption TracEnv /var/www/vhosts/yourdomain/subdomains/yoursubdomain/trac/test
    PythonOption TracUriRoot /
    PythonInterpreter main_interpreter

    Final Steps

    restart apache : /usr/local/psa/admin/sbin/websrvmng -a -v

    point your browser to your trac subdomain. If everything is working fine you’ll see a trac page. If not you’ll see a 500 error page.

    Got Problems?

    If your seeing an error page you should take the following steps:

    go to plesk >> yourdomain >> log manager >> error log

    copy the portion that contains your error and remove the servers timestamps and ip data.

    do a google on the very last line, this will contain the error message. You’ll likely see a result from the trac website. if not add the word trac before your search.

    If you still see no results from the trac website, go to the site and search the tickets. Still no luck? open a new ticket. Trac is very good with support and the community is extremely helpful.

    References / helpful Links

    http://trac.edgewall.org/wiki/TracGuide
    http://trac.edgewall.org/ticket/3706#comment:10
    http://trac.edgewall.org/ticket/4459#comment:21

    If you need help you can contact me, but i’d recommend using the trac community as i’m not fluent with python.

    happy coding – sid