-
yum install httpd subversion mod_dav_svn
- You need also SSH
-
To run the server:
svn serve --daemon --root /home/mike/svn-repos
It will be bound to the port 3690
Networking with svn+ssh
If you specify a svn+ssh schema to access the repo, every user must have an account on the server. Every user of the repository must have read and write access to the files in the repo. Moreover, every file they create must be both writable and readable by the other users of the repo.
In order for multiple Unix users to access the repository, they should all be in a single Unix group and have a umask 002 when running svnserve via SSH. You also need to set the group ’sticky bit’ on the repository directories. Here’s a step-by-step guide to set this up.
/usr/sbin/groupadd subversion
/usr/sbin/usernmod -G subversion -a svn_user1
/usr/sbin/usernmod -G subversion -a svn_user2
chgrp -R subversion /home/svn-repos
chown -R 770 subversion /home/svn-repos
chmod g+s /home/svn-repos/db
Now we can try to checkout:
svn checkout svn+ssh://mike@oilo/home/svn-repos/sesame/trunk sesame
Networking with Apache
We will see how to set up Apache to host a Subversion repository.
Install mod_dav_svn. Installing it, we wiil add a new subversion.conf file, where you need to write:
<Location /svn-repos>
DAV svn
SVNPath /home/svn-repos
</Location>
Make sure the svn-repos directory is owned by the Apache user, and restart the Apache server.
Ah this point the repository is unsecured, allowing read and write access to anonymous users.