Setup Subversion and Trac on CentOS 5
Recently I set up a virtual server to use as a development machine. It runs on CentOS 5 and hosts several Subversion repositories with associated Trac projects.
There are many guides and plenty of help on the net to help you setup such a system. However, when I tried to do it I came across a few problems and I hope this post may help at least a few people trying to do the same as me. I am not going to rewrite the great tutorials out there, I will just point you to them and note what things I did differently.
This ‘guide’ should get you from a fresh install of CentOS 5 linux to one or more working Subversion (SVN) repositories and associated Trac wiki’s. Apache/WebDAV is used as the network layer. I have only tested this on a fresh install of CentOS 5.
The Environment
I am aiming for the following:
- CentOS 5, SVN installed. Apache2 as the network layer using mod_dav_svn.
- Trac running on Apache with mod_python
- SVN repositories located at: /srv/svn (e.g. /srv/svn/my-project), accessible via http://server/svn/my-project
- Trac projects located at: /srv/trac (e.g /srv/trac/my-project) accessible via http://server/trac/my-project
How I did it
Not all the steps are vital (probably) but this is how I got it working. Feel free to skip any non-relevant steps (i.e. there is probably no need for a fresh install). Replace any occurence of <project> with the name of your first project.
1. Fresh install of CentOS. I followed most of the Perfect Setup Guide, except the mail and ISPConfig stuff. The important part is setting up the Apache2 web server.
2. Make sure SVN and mod_dav_svn are installed. As root:
yum install subversion mod_dav_svn
vim /etc/httpd/conf/httpd.conf
If the following two lines are not present, add them:
LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so
3. Install Trac: Follow Nick’s guide with the alternative Clearsilver installation below. Skip the Apache Configuration part.
Follow all of parts 1 and 2. Instead of part 3 do:
wget http://dag.wieers.com/rpm/packages/clearsilver/clearsilver-0.10.4-1.el5.rf.i386.rpm rpm -i clearsilver-0.10.4-1.el5.rf.i386.rpm wget http://dag.wieers.com/rpm/packages/clearsilver/python-clearsilver-0.10.4-1.el5.rf.i386.rpm rpm -i python-clearsilver-0.10.4-1.el5.rf.i386.rpm
Continue with parts 4.1 and 4.2 of Nick’s guide. Remember, leave out Apache configuration section.
4. Create your first SVN Repository:
svnadmin create --fs-type fsfs /srv/svn/<project>
5. Initialise a Trac project for your new repository:
trac-admin /srv/trac/<project> initenv
For the trac-admin command use the defaults if not sure, giving a descriptive name for the project. The `Path to repository` is: /srv/svn/<project>.
6. Set the correct file permissions for apache
chown -R apache.apache /srv/svn/<project> chown -R apache.apache /srv/trac/<project>
7. Tell apache where to find the new repository. Here we create an additional Apache configuration file specifically for the SVN repositories.
vim /etc/httpd/conf.d/subversion.conf
Add the following directive:
<Location /svn/<project>> DAV svn SVNPath /srv/svn/<project> AuthType Basic AuthName "<project> Repository" AuthzSVNAccessFile /srv/svn/svn-acl-conf AuthUserFile /srv/svn/<project>.htpasswd Require valid-user </Location>
8. Add a repository user:
touch /srv/svn/<project>.htpasswd htpasswd -m /srv/svn/<project>.htpasswd <username>
9. Create the Access Control List for the SVN Repository
vim /srv/svn/svn-acl-conf
Add the following directives:
[<project>:/] <username> = rw
Where <username> represents the username of the repository user you created earlier.
10. Tell apache where to find the new Trac project. Here we create an additional Apache configuration file specifically for the Trac projects.
vim /etc/httpd/conf.d/trac.conf
Add the following directives:
<Location /trac/<project>> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv /srv/trac/<project> PythonOption TracUriRoot /trac/<project> </Location> <Location "/trac/<project>/login"> AuthType Basic AuthName "trac" AuthUserFile /srv/trac/<project>.htpasswd Require valid-user </Location>
11. Add a Trac user:
touch /srv/trac/<project>.htpasswd htpasswd -m /srv/trac/<project>.htpasswd <username>
12. Give admin permissions to the Trac user you just created:
trac-admin /srv/trac/<project> permission add <username> TRAC_ADMIN
Where <username> represents the username of the Trac user you just created.
13. Restart Apache:
service httpd restart
You should now have SVN and Trac installed. You will have an SVN repository setup (http://server/svn/<project>) and the Trac wiki (http://server/trac/<project>) associated with the repository.
Please let me know if this helped you. If you come across any problems I will be happy to try and help.
Resources
The last part of CentOS HowTos: Subversion will give you a quick introduction on how to use SVN.
Subversion setup guides: here and here
Trac setup guides: here and here.
ClearSilver template system (used by Trac).
Posted by Daniel Skinner 2008-01-06 17:19:17
Tags: centos, Guides, subversion, trac, tutorial, version control




Thanks a lot, just tried this out, left out the trac install, worked first time.
Comment by beds — January 6, 2008 @ 7:14 pm
Great howto. Thanks. One small change on your item 4…
svnadmin create -fs-type fsfs /srv/svn/
should be:
svnadmin create –fs-type fsfs /srv/svn/
Note the double dash in front of fs-type.
Regards,
PC
Comment by PCBender — February 28, 2008 @ 2:46 pm
I’m glad it helped you out.
Thanks for reporting the error, I will fix it right away.
Comment by Daniel — February 28, 2008 @ 6:57 pm
This saved me a lot of work. Big Thanks!
Additionally to the steps above I had to add
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
to my /etc/httpd/conf/httpd.conf
otherwise I got
Unknown DAV provider: svn
Comment by Daniel — March 3, 2008 @ 9:48 pm
One more thing (just in case anyone else is running into this)
I had to disable SELinux otherwise modpython couldn’t access /srv/trac//VERSION
Comment by daniel — March 3, 2008 @ 10:30 pm
Glad it helped you out. Thanks for the feedback, I will add that to the guide shortly.
Comment by Daniel Skinner — March 3, 2008 @ 11:06 pm
When you yum install mod_dav_svn, you get /etc/httpd/conf.d/subversion.conf, so you don’t really need to make any subversion changes to httpd.conf. Edit /etc/httpd/conf.d/subversion.conf instead.
Comment by Mike — May 13, 2008 @ 8:17 pm
Thanks Daniel for posting this guide.
I tried to follow this tutorial (but skipped the Trac steps) and just came up some problem on my Centos 5 (latest one)
1. I added these lines
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
the apache did not start until I added an other line:
LoadModule dav_module modules/mod_dav.so
2. Everything seem work fine, I can see the successful message as below when type http://localhost/svn
Revision 0: /
——————————————————
Powered by Subversion version 1.4.2 (r22196).
the problem is that i could not able to create, edit or commit the file to repository.
Here is the error message:
Can’t create directory ‘/subversion/svn/db/transactions/0-1.txn’: Permission denied.
Anyone have idea why this happended?
Cheers
Comment by sailboatvn — May 14, 2008 @ 1:33 pm
Can you create, edit or commit from a command line?
If you can then you might need to ensure the user which apache is running as has permission to write to the files.
On my version apache is the user, so I would try something like:
chown -R apache.apache /subversion/svn/
Let me know it that works!
Comment by Daniel Skinner — May 14, 2008 @ 2:07 pm
Hi Daniel,
Thanks for your reply.
1. I could not create, edit or commit from command line at all.
2. Not sure which version apache is for user or root, but all the steps (your guides) above were done under ROOT account
I typed this command line
# httpd -version
and got this respond
Server version: Apache/2.2.3
Server built: Nov 10 2007 12:44:14
3. I did try your suggestion
chown -R apache.apache /subversion/svn/
and also
chown -R apache.apache /subversion
but the same error message came back still.
I’m quite stumped :(
Please let me know if you have any other thoughts.
Cheers,
Dave
Comment by Sailboatvn — May 15, 2008 @ 11:16 am
[...] Installing Trac on CentOS 5 I’m using Slicehost, but these instructions should work for any hosting provider running CentOS 5. I am not using Subversion (because it sucks and has been slain by Git). If you need SVN support, check out the posts by Nick or Daniel Skinner. [...]
Pingback by Installing Trac on CentOS 5 « Compulsivo, Inc. — May 16, 2008 @ 11:37 pm
Dave,
Do:
cd /subversion/svn/
ls -la
Do the permissions look reasonable?
If not, try doing a temporary hack: chmod -R 777 to see if that fixes the issue – if it does don’t leave it like that but at least we have identified it’s file/ownership permissions that is problematic.
Comment by Daniel Skinner — May 17, 2008 @ 11:41 am
Hi Daniel,
Thanks very much for helps. The problem was came from SELinux, it actually blocked users from accessing to httpd service.. Phew.. here is the error message from Setroubleshoot
SELinux prevented /usr/sbin/httpd from writing 10-1.txn.Detailed DescriptionSELinux prevented /usr/sbin/httpd from writing 10-1.txn.
If 10-1.txn is a core file, you may want to allow this. If 10-1.txn is not a core file, this could signal a intrusion attempt.
Allowing Access
Changing the “allow_daemons_dump_core” boolean to true will allow this access: “setsebool -P allow_daemons_dump_core=1.”
The following command will allow this access:
setsebool -P allow_daemons_dump_core=1
Please note that the suggestion does not work at all. I disable SELinux by editting /etc/selinux/config and change the SELINUX line to SELINUX=permissive:
Cheers mate.
Comment by Dave Bui — May 23, 2008 @ 11:13 am
I also thought I did fairly well. Everything seemed to install and restart, but I get this error
ClearSilver not installed (No module named neo_cgi)
when I browse to my trac url. However, if I go back and revisit the clearsilver rpm instructions, I’m told clearsilver IS already installed. Any ideas?
Comment by Pete — June 4, 2008 @ 1:09 pm
Try re-installing the python bindings:
wget http://dag.wieers.com/rpm/packages/ clearsilver/python-clearsilver-0.10.4-1.el5.rf.i386.rpm
rpm -i python-clearsilver-0.10.4-1.el5.rf.i386.rpm
Comment by Daniel Skinner — June 4, 2008 @ 3:15 pm
Thanks Daniel that did the trick; we are now on Trac ;-)
Comment by Pete — June 5, 2008 @ 7:42 am
[...] up a server to use as a development machine. From a standard CentOS 5 installation I have installed SubVersion and Trac. Now I have finally got round to installing phpUnderControl for continuous integration and build [...]
Pingback by Install phpUnderControl on CentOS 5 | Daniel Skinner: News and Articles on Web Development — June 12, 2008 @ 3:19 pm
Hey awesome blog! Know anyone who would be interested in part time admin’ing a Linux box? Hit me up!
Comment by Steven Russo — June 17, 2008 @ 4:36 am
Hello,
Does this guide remain valid in case of virtual hosts configuration ?
Thanks
Emilien
Comment by Emilien — June 20, 2008 @ 9:50 pm
Hi Emilien,
Yes, this guide will apply to a VHost setup.
You should be able to simply replace the Location directives with VirtualHost directives. The content of the directive remains the same with the addition of the servername and serveralias directives of course.
For the trac login you may want to place the location directive within the trac virtualhost if that is how you would like things setting up.
Let me know how it goes.
Daniel
Comment by Daniel Skinner — June 21, 2008 @ 10:39 am
Yeah, it works well !
Thank you Daniel.
Emilien
Comment by Emilien — June 22, 2008 @ 10:28 pm
Daniel,
I’ve gotten Trac and subversion installed, however i’m using Trac 11.1 and i’m getting a lot of python tracebacks in my httpd error logs:
PythonHandler trac.web.modpython_frontend: File “/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py”, line 381, in dispatch_request\n env = open_environment(env_path, use_cache=not run_once)
PythonHandler trac.web.modpython_frontend: File “/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/env.py”, line 567, in open_environment\n env = env_cache.setdefault(env_path, open_environment(env_path))
PythonHandler trac.web.modpython_frontend: File “/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/env.py”, line 571, in open_environment\n env = Environment(env_path)
PythonHandler trac.web.modpython_frontend: File “/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/env.py”, line 185, in __init__\n load_components(self, plugins_dir and (plugins_dir,))
PythonHandler trac.web.modpython_frontend: File “/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/loader.py”, line 109, in load_components\n loadfunc(env, search_path, auto_enable=plugins_dir)
PythonHandler trac.web.modpython_frontend: File “/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/loader.py”, line 39, in _load_eggs\n distributions, errors = working_set.find_plugins(
PythonHandler trac.web.modpython_frontend: File “/usr/lib/python2.4/site-packages/pkg_resources.py”, line 640, in __init__\n self.scan(search_path)
PythonHandler trac.web.modpython_frontend: File “/usr/lib/python2.4/site-packages/pkg_resources.py”, line 669, in scan\n for dist in find_distributions(item):
PythonHandler trac.web.modpython_frontend: File “/usr/lib/python2.4/site-packages/pkg_resources.py”, line 1577, in find_on_path\n for entry in os.listdir(path_item):
PythonHandler trac.web.modpython_frontend: OSError: [Errno 13] Permission denied: ‘/srv/trac/test/plugins’
Any light you can shed on this?
Much appreciated!
Ian
Comment by Ian — September 1, 2008 @ 8:16 pm
Upon further analysis, SELinux on CentOS5 was the culprit…
Comment by Ian — September 2, 2008 @ 3:04 am
That’s nearly always the problem! I would be interested in knowing how to get it working with SELinux in enforcing mode – This is something I will look into.
Comment by Daniel Skinner — September 2, 2008 @ 9:44 am
It’s really very simple… I had to beat my head on my desk before i realized how simple it was, but it’s simple, heh.
From root’s home directory (i use this path, because doing this poops a few files out, and it really doesn’t matter where you do it from) SELinux must be running for this to work.
grep -i ‘Trac’ /var/log/audit/audit.log |audit2allow -M trac
This will create a file called trac.pp, and another called trac.te.
Then, to import it into the kernel:
semodule -i trac.pp
That’s it. You’re done.
Explanation:
audit2allow allows you to create a policy based on the AVC in the audit.log file that SELinux generates. You find the lines that show that the service ‘trac’ has been blocked, and audit2allow uses them to create a policy package (.pp file).
Once you’re done, load the .pp file by using the semodule command.
Comment by Ian — September 2, 2008 @ 10:00 am
Oh…
And there’s a way to avoid having to do this with subversion as well… If you put your respository in /var/www, you don’t have to worry about setting up an SELinux policy.
This trick doesn’t work with Trac, you still have to create a policy. I think because python is accessing files.
Comment by Ian — September 2, 2008 @ 10:09 am
Excellent – Thanks for the explanation.
Comment by Daniel Skinner — September 2, 2008 @ 10:11 am
My pleasure, excellent tutorial!
Comment by Ian — September 2, 2008 @ 10:19 am
[...] I’m using Slicehost, but these instructions should work for any hosting provider running CentOS 5. I am not using Subversion (because it sucks and has been slain by Git). If you need SVN support, check out the posts by Nick or Daniel Skinner. [...]
Pingback by Installing Trac on CentOS 5 | Compulsivo — September 25, 2008 @ 8:22 pm
Thanks you huge, all work, a manual simply fairy tale. It was taken with others in the sum about 5 hours, now all has earned from the first attempt. Thanks.
Comment by Maksim — October 11, 2008 @ 2:59 am
Hi,
SVN and Trac commands work fine, but when I try to going to the url on the browser I get a 500 error. The error log reports:
[Wed Nov 19 22:40:03 2008] [error] [client 127.0.0.1] PythonHandler trac.web.modpython_frontend: Traceback (most recent call last):
[Wed Nov 19 22:40:03 2008] [error] [client 127.0.0.1] PythonHandler trac.web.modpython_frontend: File “/usr/lib64/python2.4/site-packages/mod_python/apache.py”, line 287, in HandlerDispatch\n log=debug)
[Wed Nov 19 22:40:03 2008] [error] [client 127.0.0.1] PythonHandler trac.web.modpython_frontend: File “/usr/lib64/python2.4/site-packages/mod_python/apache.py”, line 464, in import_module\n module = imp.load_module(mname, f, p, d)
[Wed Nov 19 22:40:03 2008] [error] [client 127.0.0.1] PythonHandler trac.web.modpython_frontend: File “/usr/local/lib/python2.5/site-packages/Trac-0.11.2-py2.5.egg/trac/__init__.py”, line 14, in ?\n __version__ = __import__(‘pkg_resources’).get_distribution(‘Trac’).version
[Wed Nov 19 22:40:03 2008] [error] [client 127.0.0.1] PythonHandler trac.web.modpython_frontend: ImportError: No module named pkg_resources
Any ideas of what I could be doing wrong?
Thank you.
Comment by Adrian — November 20, 2008 @ 3:49 am
BTW – I am on CentOS 5.2 and I installed Trac-0.11.2 . SVN version is 1.54. CentOS installs default with Python 2.4, but I installed 2.5 through yum using remi’s repository.
The trac web server brings everything up ok. I am just having a really hard time getting this to work in Apache.
Thank you.
Comment by Adrian — November 20, 2008 @ 3:58 am
The error you are seeting is a Python exception and ultimately the error is ‘No module named pkg_resources’
It Python setuptools installed?
Comment by Daniel Skinner — November 20, 2008 @ 7:05 am
on the clicent I’m fill usrname and passwork see low
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn’t understand how to supply the credentials required.
pls help me
Comment by vodanh — November 24, 2008 @ 11:15 am
Hi,
You can use Naraio for trac, subversion,Apache and openldap.
It can be downloaded from http://opensourcedevelopment.net.
It is free open source product…..
Regards
Comment by Mike — November 27, 2008 @ 8:22 am
hello, you should prefer this solution about selinux ;)
sudo chcon -R -h -t httpd_sys_content_t /srv/svn
sudo chcon -R -h -t httpd_sys_content_t /srv/trac/
subversion explains this trick in link below
http://subversion.tigris.org/faq.html
Comment by blaise — November 27, 2008 @ 11:26 pm
sorry I spoke to fast about trac,
the solution is here:
http://trac.edgewall.org/wiki/TracWithSeLinux
Comment by blaise — November 27, 2008 @ 11:32 pm
Hey, thanks for the guide, it was the only one that guided me to a successful Trac configuration (or the only one I could understand, at least). I have a couple of questions:
1. How do I have /trac in the browser to list all my projects? I believe it can be done by Trac.
2. Is there anyway to do the creation of new projects without having to add them every time by hand to httpd.conf? Maybe there is a more practical way?
Thanks in advance.
Comment by Alejandro — December 29, 2008 @ 1:40 pm
I’m glad the post was of use to you!
1. I’m not entirely sure – sounds reasonable though.
2. Yes there is. You need to write some form of shell script to make the changes for you. Note there is a non-interactive version of trac-admin you will need to use.
Alternatively, the next evolution of this setup is to use something like Buildix which will elegantly solve 1 and 2 for you by providing a rich integration between Trac, CruiseControl and Subversion, allowing you to easily create and manage projects.
See: http://buildix.thoughtworks.com/
Comment by Daniel Skinner — December 30, 2008 @ 11:47 am
izeen: Your comment is awaiting moderation.
Hi daniel,
Thanks for your excellent work.I have installed as per your suggestion without tracker.I am able to modify my original file and commit so that the modification can be accessed by respective revision numbers in command prompt.When i try to view it in apache i am able to see the files but there is no option of editing or deleting the files.can u help me and also i am getting the error message
while restarting the httpd service but access to the svn repository is working fine
service httpd restart
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Comment by fizeen — January 7, 2009 @ 6:25 am
I have to tell: THANKS!
I still have to understand all steps, because uses of .so modules of APACHE as mod_dav_svn.so are a mistery for me. We don’t use SVN currently. Now Im going to make a post to spanish users of TRAC. I was able to backup/restore from a older version of TRAC. Let me post some doubts in future :D
Bye!
Rubén Ortizs last blog post..Unable to open pty: No such file or directory
Comment by Rubén Ortiz — January 20, 2009 @ 9:32 am
[...] http://www.daniel-skinner.co.uk/ [...]
Pingback by Rubén Ortiz » Instalar TRAC en CentOS 5 — January 20, 2009 @ 12:06 pm
Thank you so much!
Instead of the guide linked in step 3, I just used “yum install trac”. Everything seems to be working great.
Comment by Bryan — January 21, 2009 @ 10:39 pm
This looks really good. The last piece I would like to do is add SSL for some security. Any suggestions?
Comment by Jim — March 7, 2009 @ 12:19 am
I was having two problems:
1. Couldn’t log into the SVN repository (at http://server/svn/project) – Apache was writing in the error log that it doesn’t have permission to open the htpasswd file, even after I chmodded it to 777.
2. Accessing the TRAC URL was giving a 500 Internal Server Error and complaining in the log about being unable to load Genshi.
Solution? Disable SELinux.
Comment by Janos — March 11, 2009 @ 1:04 pm
Great HowTo. It works!
Comment by rtessmann — March 23, 2009 @ 5:02 pm
Hey,
i followed your steps and seems to work, but i bound already a VirtualHost to *:80.
So have i to add another VirtualHost with a different ServerName?
Perhaps you can share some infos :)
Thx a lot!
Comment by phx — May 8, 2009 @ 8:23 pm
Hey there,
I followed everything and it is working fine. Trac is up and all. Only thing is I can not connect to my SVN server. When I try
svn list I get:
svn: PROPFIND request failed on ‘/svn/’
svn: PROPFIND of ‘/svn/’: 403 Forbidden ()
for my server url I used http://server/svn/ where “server” is the URL where trac is happily running.
any ideas?
Cheers,
P
Comment by P — May 22, 2009 @ 7:17 pm
[...] stumbled upon this article and I must say it’s a great guide for getting both of these applications up and running [...]
Pingback by Setting up Subversion and Trac on CentOS 5 | Phazeon.com — June 13, 2009 @ 6:15 am
Mate… love your work, heaps helpful and will make it in my list of best-of’s!
Comment by Ryders — June 13, 2009 @ 10:52 am
Ihave cent os 4.7, python 2.3.4 and trying to install trac 0.11.4, after i configured every thing i got this error can any body help me…
Traceback (most recent call last):
File “/usr/lib/python2.3/site-packages/Trac-0.11.4-py2.3.egg/trac/web/api.py”, line 367, in send_error
‘text/html’)
.
.
File “/usr/lib/python2.3/site-packages/Trac-0.11.4-py2.3.egg/trac/db/api.py”, line 111, in _parse_db_str
scheme, rest = db_str.split(‘:’, 1)
ValueError: unpack list of wrong size
Comment by raghava — June 19, 2009 @ 2:53 pm
why don’t u used pam authentication.
Comment by phaneendra — July 14, 2009 @ 10:52 am
Hello
nice guide! I linked you in my blog. One question, in which part of your guide we associate Trac and SVN?
“and the Trac wiki (http://server/trac/) associated with the repository.”
Is some strange to understand currently.
Thanks
Comment by Rubén Ortiz — August 11, 2009 @ 10:17 am
When I run the command:
trac-admin /srv/trac/support permission add usaf TRAC_ADMIN
I get the following error:
Traceback (most recent call last):
File “/usr/bin/trac-admin”, line 7, in ?
sys.exit(
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/admin/console.py”, line 1314, in run
return admin.onecmd(command)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/admin/console.py”, line 133, in onecmd
rv = cmd.Cmd.onecmd(self, line) or 0
File “/usr/lib/python2.4/cmd.py”, line 219, in onecmd
return func(arg)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/admin/console.py”, line 426, in do_permission
self._do_permission_add(user, action)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/admin/console.py”, line 463, in _do_permission_add
self._permsys.grant_permission(user, action)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/perm.py”, line 320, in grant_permission
self.store.grant_permission(username, action)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/perm.py”, line 223, in grant_permission
db = self.env.get_db_cnx()
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/env.py”, line 273, in get_db_cnx
return DatabaseManager(self).get_connection()
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/db/api.py”, line 85, in get_connection
connector, args = self._get_connector()
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/db/api.py”, line 118, in _get_connector
scheme, args = _parse_db_str(self.connection_uri)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/db/api.py”, line 146, in _parse_db_str
scheme, rest = db_str.split(‘:’, 1)
ValueError: need more than 1 value to unpack
Comment by guild — August 27, 2009 @ 11:10 am
I am a newbie to Trac and SVN. I successfully installed SVN on my CentOS server. Now I Installed Trac 0.11.5, when I browse it I am getting the following error
“Internal Error
TracError: OSError: [Errno 13] Permission denied: ‘/srv/trac/repos/plugins’”
and when i run trac-admin /srv/trac/repos permission add root1 TRAC_ADMIN command then I am getting the following message on the server
/root/.python-eggs/MySQL_python-1.2.3c1-py2.6-linux-i686.egg-tmp/_mysql.so:6: RuntimeWarning: Python C API version mismatch for module _mysql: This Python has API version 1012, module _mysql has version 1013.
û5Sslx¿
¸¼ÀÔØôLX`dl ´¸Ô $,04<@DLPT\`dlpt|Á
¤¬°´¼ÀÄÌÐÔÜàäìðôüÂ
$,04<@DLPT\`dlpt|Â
¤¬°´¼ÀÄÌÐÔÜàäìðôüÃ
$,04<`ptÃ
¬°ÀàäìðôüÄ
$,04<@DLPT\¨¬´¸¼ÄÈÌàäèìðôøÅÅ
@DLPT\`dlpt|Å
¤¬°´¼ÀÄÌÐÔÜàäì´¸À
PuTTYTraceback (most recent call last):
File “/usr/bin/trac-admin”, line 7, in ?
sys.exit(
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/admin/console.py”, line 1314, in run
return admin.onecmd(command)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/admin/console.py”, line 133, in onecmd
rv = cmd.Cmd.onecmd(self, line) or 0
File “/usr/lib/python2.4/cmd.py”, line 219, in onecmd
return func(arg)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/admin/console.py”, line 426, in do_permission
self._do_permission_add(user, action)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/admin/console.py”, line 463, in _do_permission_add
self._permsys.grant_permission(user, action)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/perm.py”, line 320, in grant_permission
self.store.grant_permission(username, action)
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/perm.py”, line 226, in grant_permission
(username, action))
File “/usr/lib/python2.4/site-packages/Trac-0.11.5-py2.4.egg/trac/db/util.py”, line 59, in execute
return self.cursor.execute(sql_escape_percent(sql), args)
File “/usr/lib/python2.4/site-packages/sqlite/main.py”, line 255, in execute
self.rs = self.con.db.execute(SQL % parms)
_sqlite.IntegrityError: columns username, action are not unique
[root@load repos]# PuTTY
Please help me with this.
Comment by Gannu — September 30, 2009 @ 12:31 pm
Hi,
Nice post! Thanks for sharing. I tried this and it helps me a great deal. Keep up the good work.
Comment by kashif — October 15, 2009 @ 6:01 am
Hi,
Thanks for this. I successfully installed Trac on a subdomain using this method. Is there another way of installing trac and SVN for each domain/subdomain?
Also, when I go to http://server/svn/my_repo, it show 404 error. Does this mean that I didn’t successfully install my SVN?
Sorry for my noob questions and thanks in advance if you reply to this.
Regards
Comment by Lyndon — October 25, 2009 @ 2:40 pm
Great tutorial, I went through your guide and got no problem. Now I have the SubVersion and Trac installed. Thanks a lot!
Comment by Duy Nguyen — December 2, 2009 @ 1:50 pm
Hi,
Followed your instruction but only one user can access the repo (the user created above). But user created in the ACL and the same steps above when they log in there just Forbidden 403 error returned.
Any help?
Comment by Duy — December 15, 2009 @ 3:27 pm
I have the same problem as a mate above:
“Accessing the TRAC URL was giving a 500 Internal Server Error and complaining in the log about being unable to load Genshi.”
Genshi is installed! Genshi 0.5.1
Solution? Help !
Comment by Giedrius — January 10, 2010 @ 10:39 am
Ok, I disabled selinux and it helped! :)
Comment by Giedrius — January 10, 2010 @ 12:26 pm