Edgewall Software

Trac Installation on Fedora Core 4

Fedora Installation

  1. Install as a workstation (the other installation options may work as well; I didn't try them)

(It is also works on custom installation with the most standard packages)

  • Firewall enabled (I disabled it later in order to get Trac to work; I have another firewall).
  • SELinux disabled (see TracWithSeLinux).
  • Default packages installed.
  1. Update installed packages.
  • From a bash prompt: "yum update". This took quite a while and downloaded over 200MB of updates.

Install Trac

  • I originally installed Trac from  http://dries.studentenweb.org/rpm/packages/trac/info.html, but eventually got an error message that was due to a problem with python-clearsilver, so I uninstalled it and started over using atrpms.
  • Set up yum to obtain updates from atrmps:
    • Install the GPG key: "rpm --import  http://ATrpms.net/RPM-GPG-KEY.atrpms"
    • Set up yum. This can be done by adding to /etc/yum.conf or by adding files to /etc/yum.repos.d. I did the latter, creating the file atrpms.repo with the contents (from  http://atrpms.net/install.html ):
      [atrpms]
      name=Fedora Core $releasever - $basearch - ATrpms
      baseurl=http://dl.atrpms.net/fc$releasever-$basearch/atrpms/stable
      
  • Install. I did this in two steps, but I think you could skip the first one:
    • Install clearsilver: "yum install clearsilver". I got version 0.10.1-3.
    • Install trac: "yum install trac". I got version 0.8.4-1.rhfc4.at.

Set up Subversion

  • I haven't yet moved my Subversion repository to my new server, so I just created an empty project to keep Trac happy.
      mkdir /svn  <-- trac suggests using /var/svn here
      cd /svn
      svnadmin create tcb  <-- replace "tcb" with the name of your project
    
  • If moving an existing Subversion repository:
    • Exported from one server with: "svnadmin dump /existing/svn/repo > dumpfile"
    • Import onto the new server with: "svnadmin load /new/svn/repo < dumpfile". In my case this command would be: "svnadmin load /svn/tcb < dumpfile"

Set up Trac

  • Create a directory and initialize it:
      mkdir /trac <-- there may be a better directory to use for this
      cd /trac
      trac-admin tcb initenv <-- change "tcb" to the name of your project
    

Configure the Firewall

  • If you installed the firewall, you may need to reconfigure it. Since I already have a firewall, I just disabled it:
    • To disable it temporarily (until the next reboot or manual restart): "service iptables stop" (other options are "start" and "restart").
    • To disable it starting with the next reboot: "chkconfig iptables off" (the other option is "on").

Start Trac

  • Most people seem to use Apache. TracOnFedoraCoreThree is one example of that.
  • I just used tracd: "tracd -p 8080 /trac/tcb", then connected with my web browser, at the url  http://192.168.0.48:8080 (change the IP address to the IP of the machine you ran tracd on). I followed the links to  http://192.168.0.48:8080/tcb/wiki and made a shortcut to that. Pressing Ctrl-C stops tracd (you can also set it up to run automatically at startup).

Migrate Your Old Trac Environment

I had previously run Trac 0.7.something and wanted to migrate my old environment. If you don't have exising Trac data or if it is already in a compatible format, you won't need to do this.

  • Make a copy of the "clean" installation in "/trac/tcb" (or wherever you installed it).
  • Copy over your existing environment.
  • Convert the sqlite database:
    • Install version 2.x of of sqlite: "yum install sqlite2"
    • Convert the trac.db file:
       cd /trac/tcb/db
       mv trac.db trac.db.old
       sqlite trac.db.old .dump | sqlite3 trac.db
      
  • Fix the paths in /trac/tcb/conf/trac.ini. Compare with the version of that file from the clean install if necessary (I just copied the file from the clean install, as my old version didn't have anything customized in it).
  • Run tracd again and test: "tracd -p 8080 /trac/tcb".

Personalize Trac

  • Click on the "Settings" button in the toolbar and enter your information. That will save you some typing later on.
  • To get the "Logon" feature to work, you will need to use Apache or tracd with the "--auth" option.

Troubleshooting

  • neo_cgi module error As  this url says, you can solve suggest this issue by moving or copying the neo_cgi module from python 2.3 site-packages folder to python 2.4 site-packages folder.
mv /usr/lib/python2.3/site-packages/neo_cgi.so /usr/lib/python2.4/site-packages/

This happens because Fedora 3 used python 2.3 and Fedora 4 uses python 2.4 . So the neo_cgi file gets put in the wrong place. And don't forget to change the read/write permission of the sqllite db and folder (you can recognize this folder as db folder inside your trac project when you did trac-admin /path/to/your/trac/project initenv) for your http/apache process