wiki:faq/setup-trac

Can I run a wiki and/or issue tracker/shared to do list?

May First/People Link supports a project called Trac. Trac provides both a wiki and an issue tracker (which is like a collaborative shared to do list). This support site is running Trac - so if you are using this site you have a good idea of what Trac can do.

If you would like to use Trac, please follow these directions. These directions are for users comfortable with using secure shell and the command line. If you would like help setting up your Trac instance, please open a new ticket and we'd be happy to help you out. You might want to read this intro to MFPL hosting first if this is the first site you're setting up on MFPL servers.

Several of our members have successfully installed trac - to read about their experiences, please see tickets #2107 and #2582.

  • Setup Trac. Be sure to execute this command as the same user that is the "Execute as user" in your web configuration (see the Web Config tab in your hosting order in the members control panel).

  • Choose a directory to install your trac files (your domain.org/include/ directory is a good option). Replace words in capitals with values that make sense for your site:
    mkdir /home/members/GROUPNAME/sites/DOMAIN/include/trac
    mkdir /home/members/GROUPNAME/sites/DOMAIN/include/trac/PROJECTNAME
    
  • Initialize your project (the first question asks for the name of your project, for all other questions, you can safely choose the default values)
    trac-admin /home/members/GROUPNAME/sites/DOMAIN/include/trac/PROJECTNAME initenv
    
  • Create the trac cgi scripts using the trac deploy
    trac-admin /home/members/GROUPNAME/sites/DOMAIN/include/trac/PROJECTNAME deploy /home/members/GROUPNAME/sites/DOMAIN/cgi-bin/trac
    
  • Change the mode of the cgi files so that they are executable:
    chmod 755 /home/members/GROUPNAME/sites/DOMAIN/cgi-bin/trac/cgi-bin/trac.*
    
  • Optionally, add an alias to your apache configuration:
    ScriptAlias /trac /home/members/GROUPNAME/sites/DOMAIN/cgi-bin/trac/cgi-bin/trac.cgi
    

Install Different Trac Version and Trac Plugins

Note: The below instructions were found on this blog.

Once logged into your server issue the following command to create the necessary directories:

mkdir -p ~/.local/lib/python2.6/site-packages

Next install Genshi:

easy_install-2.6 --install-dir $HOME/.local/lib/python2.6/site-packages/ Genshi

Example output:

0 rosstrac@buffy:~$ easy_install-2.6 --install-dir $HOME/.local/lib/python2.6/site-packages/ Genshi
install_dir /home/members/ross/sites/trac.ross.mayfirst.org/users/rosstrac/.local/lib/python2.6/site-packages/
Searching for Genshi
Best match: Genshi 0.6
Adding Genshi 0.6 to easy-install.pth file

Using /usr/lib/pymodules/python2.6
Processing dependencies for Genshi
Finished processing dependencies for Genshi
0 rosstrac@buffy:~$ 

Next install Babel:

easy_install-2.6 --install-dir $HOME/.local/lib/python2.6/site-packages/ Babel

Example output:

0 rosstrac@buffy:~$ easy_install-2.6 --install-dir $HOME/.local/lib/python2.6/site-packages/ Babel
install_dir /home/members/ross/sites/trac.ross.mayfirst.org/users/rosstrac/.local/lib/python2.6/site-packages/
Searching for Babel
Reading http://pypi.python.org/simple/Babel/
Reading http://babel.edgewall.org/
Reading http://babel.edgewall.org/wiki/Download
Best match: Babel 0.9.6
Downloading http://pypi.python.org/packages/2.6/B/Babel/Babel-0.9.6-py2.6.egg#md5=e66698fb97c8dc0a7c6b7b86c91d62be
Processing Babel-0.9.6-py2.6.egg
creating /home/members/ross/sites/trac.ross.mayfirst.org/users/rosstrac/.local/lib/python2.6/site-packages/Babel-0.9.6-py2.6.egg
Extracting Babel-0.9.6-py2.6.egg to /home/members/ross/sites/trac.ross.mayfirst.org/users/rosstrac/.local/lib/python2.6/site-packages
Adding Babel 0.9.6 to easy-install.pth file
Installing pybabel script to /home/members/ross/sites/trac.ross.mayfirst.org/users/rosstrac/.local/lib/python2.6/site-packages/

Installed /home/members/ross/sites/trac.ross.mayfirst.org/users/rosstrac/.local/lib/python2.6/site-packages/Babel-0.9.6-py2.6.egg
Processing dependencies for Babel
Finished processing dependencies for Babel
0 rosstrac@buffy:~$

Finally install Trac==VERSION_NUMBER

easy_install-2.6 --install-dir $HOME/.local/lib/python2.6/site-packages/ Trac==1.0

Example output:

0 rosstrac@buffy:~$ easy_install-2.6 --install-dir $HOME/.local/lib/python2.6/site-packages/ Trac==1.0
install_dir /home/members/ross/sites/trac.ross.mayfirst.org/users/rosstrac/.local/lib/python2.6/site-packages/
Searching for Trac==1.0
Reading http://pypi.python.org/simple/Trac/
Reading http://trac.edgewall.org/
Reading http://trac.edgewall.org/wiki/TracDownload
Reading http://trac.edgewall.com/
Reading http://projects.edgewall.com/trac
Reading http://projects.edgewall.com/trac/wiki/TracDownload
Best match: Trac 1.0
Downloading http://pypi.python.org/packages/source/T/Trac/Trac-1.0.zip#md5=3dd2e883179879c8fa5b98c984f15058
Processing Trac-1.0.zip
Running Trac-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-6Ver0k/Trac-1.0/egg-dist-tmp-uX_TB1
catalog 'trac/locale/el/LC_MESSAGES/messages.po' is marked as fuzzy, skipping
catalog 'trac/locale/hy/LC_MESSAGES/messages.po' is marked as fuzzy, skipping
catalog 'trac/locale/pl/LC_MESSAGES/messages.po' is marked as fuzzy, skipping
catalog 'trac/locale/tr/LC_MESSAGES/messages.po' is marked as fuzzy, skipping
catalog 'trac/locale/ko/LC_MESSAGES/messages.po' is marked as fuzzy, skipping
catalog 'trac/locale/fa/LC_MESSAGES/messages.po' is marked as fuzzy, skipping
catalog 'trac/locale/vi/LC_MESSAGES/messages.po' is marked as fuzzy, skipping
Adding Trac 1.0 to easy-install.pth file
Installing trac-admin script to /home/members/ross/sites/trac.ross.mayfirst.org/users/rosstrac/.local/lib/python2.6/site-packages/
Installing tracd script to /home/members/ross/sites/trac.ross.mayfirst.org/users/rosstrac/.local/lib/python2.6/site-packages/

Installed /home/members/ross/sites/trac.ross.mayfirst.org/users/rosstrac/.local/lib/python2.6/site-packages/Trac-1.0-py2.6.egg
Processing dependencies for Trac==1.0
Finished processing dependencies for Trac==1.0
0 rosstrac@buffy:~$ 

Next change your ~/.bashrc file to use the newly downloaded executable. Add the following line to your .bashrc file:

export PATH="$HOME/.local/lib/python2.6/site-packages:$PATH"

Then run:

source ~/.bashrc

Now run

which trac-admin

You should see the correct local path to trac-admin. Now you should be able to follow the steps from earlier:

  • Choose a directory to install your trac files (your domain.org/include/ directory is a good option). Replace words in capitals with values that make sense for your site:
    mkdir /home/members/GROUPNAME/sites/DOMAIN/include/trac
    mkdir /home/members/GROUPNAME/sites/DOMAIN/include/trac/PROJECTNAME
    
  • Initialize your project (the first question asks for the name of your project, for all other questions, you can safely choose the default values)
    trac-admin /home/members/GROUPNAME/sites/DOMAIN/include/trac/PROJECTNAME initenv
    
  • Create the trac cgi scripts using the trac deploy
    trac-admin /home/members/GROUPNAME/sites/DOMAIN/include/trac/PROJECTNAME deploy /home/members/GROUPNAME/sites/DOMAIN/cgi-bin/trac
    
  • Change the mode of the cgi files so that they are executable:
    chmod 755 /home/members/GROUPNAME/sites/DOMAIN/cgi-bin/trac/cgi-bin/trac.*
    
  • Add an alias to your apache configuration:
    ScriptAlias /trac /home/members/GROUPNAME/sites/DOMAIN/cgi-bin/trac/cgi-bin/trac.cgi
    
Last modified 6 years ago Last modified on Aug 6, 2013, 1:26:27 PM