Part 4: Trac Installation
Trac
Download Trac from http://trac.edgewall.org and XMLRPC plugin for Trac from http://trac-hacks.org/wiki/XmlRpcPlugin. Transfer them to your virtual server.
scp Trac-0.12.2.tar.gz xmlrpcplugin-r10897.zip root@10.200.242.97:/tmp
Now go to your temporary folder in the virtual server and move Trac tarball to /usr/local and extract it
cd /tmp mv Trac-0.12.2.tar.gz /usr/local cd /usr/local tar zxvf Trac-0.12.2.tar.gz cd Trac-0.12.2
Create a subversion repository for Trac
svnadmin create /services/svn/repositories/trac
Install Trac using the following commands:
python ./setup.py install mkdir -p /services/trac/projects trac-admin /services/trac/projects/googleadvsearch initenv Project Name: GoogleAdvancedSearch Database Connection: : sqlite:db/trac.db] chown -R www-data.www-data /services/trac/ find /services/trac/ -type d|xargs chmod g+sw htpasswd -cm /services/trac/projects/googleadvsearch/.htpasswd admin trac-admin /services/trac/projects/googleadvsearch/ Trac admin console is displayed. Type the following: Trac [/services/trac/projects/googleadvsearch]> permission add admin TRAC_ADMIN Trac [/services/trac/projects/googleadvsearch]> quit
Test Trac installation:
tracd --port 8000 /services/trac/projects/googleadvsearch
Open a web browser and point it to your virtual server in port 8000 (http://10.200.242.97:8000). Remember to change to your IP. You should see the following screens:
Create /etc/apache2/trac.conf file with the following content:
<Location> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption PYTHON_EGG_CACHE /tmp/python_egg_cache PythonOption TracUriRoot /trac PythonOption TracEnvParentDir /services/trac/projects/ AuthType Basic AuthName "trac-googleadvsearch" AuthUserFile /services/trac/projects/googleadvsearch/.htpasswd Require valid-user </Location>
Open /etc/apache2/apache2.conf file and add it at the end:
Include /etc/apache2/trac.conf
XMLRPC Plugin
Go back to temporary folder, extract plugin zipped file and install it using the following commands:
cd /tmp unzip xmlrpcplugin-r10897.zip cd xmlrpcplugin/trunk python setup.py bdist_egg cp dist/*.egg /services/trac/projects/googleadvsearch/plugins/
Now edit /services/trac/projects/googleadvsearch/conf/trac.ini file and it in the end the following:
[components] tracrpc.* = enabled
Restart apache:
apachectl restart
Open a web browser again and point it to Trac in the virtual server http://10.200.242.97/trac (change IP)
Log in using admin/admin (or other user/password you chose in previous steps)
Choose GoogleAdvSearch project:
Click in Admin
Select Permissions
In “Grant Permission” section add information below and click Add button:
- Subject: anonymous
- Action: XML_RPC