Ruben Laguna's blog

Aug 17, 2007 - 1 minute read - Comments - easyinstall howto installation linux plugin python rpc setuptools trac xml xmlrpc xml_rpc

How to install trac 0.10.4 and XmlRpcPlugin on a non-standard directory location

First you need setuptools/EasyInstall:

cd $HOME/opt
wget http://peak.telecommunity.com/dist/ez_setup.py
mkdir -p $HOME/opt/easyinstall/lib/python2.4/site-packages
PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages python ez_setup.py --prefix=$HOME/opt/easyinstall

Next, trac:

cd $HOME/opt
wget http://ftp.edgewall.com/pub/trac/trac-0.10.4.tar.gz
tar xvzf trac-0.10.4.tar.gz
cd trac-0.10.4
python setup.py install --prefix=$HOME/opt/trac
cd ..
rm -rf trac-0.10.4
cd trac
PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages/:$HOME/opt/trac/lib/python2.4/site-packages/  bin/trac-admin $HOME/testtracenv initenv

Then the xmlrpcplugin:

cd $HOME/opt
wget -O xmlrpcplugin.zip  'http://trac-hacks.org/changeset/latest/xmlrpcplugin?old_path=/&filename=xmlrpcplugin&format=zip'
unzip xmlrpcplugin.zip
cd xmlrpcplugin/0.10/
PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages/ python setup.py bdist_egg
cp dist/*.egg $HOME/testtracenv/plugins
cat <<EOF >>$HOME/testtracenv/conf/trac
.ini
> [components]
> tracrpc.* = enabled
> EOF

And now you can test your installation:

cd $HOME/opt/trac
PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages/:$HOME/opt/trac/lib/python2.4/site-packages/  bin/tracd -p 8080 $HOME/testtracenv

And point your browswer to http://localhost:8080/testtracenv/xmlrpc if it returns a Forbidden: XML_RPC privileges are required to perform this operation then the installation is complete.

forbidden.png

You start using XML_RPC only need to do assign permissions for users using trac-admin, to enable xml_rpc for the anonymous user type this:

PYTHONPATH=$HOME/opt/easyinstall/lib/python2.4/site-packages/:$HOME/opt/trac/lib/python2.4/site-packages/  bin/trac-admin $HOME/testtracenv permission add anonymous XML_RPC

Hope this helps