CentOS 5.x and SVN server

CentOS

CentOS


Just a quickie tutorial on how to set up a web based subversion server on a CentOS server in a hurry.

To start with you need a CentOS 5.x install with a working web server.
# yum install subversion mod_dav_svn
Pick a directory where you want to house your repo. We’ll say for argument mine is /home/svn.
# vim /etc/httpd/conf.d/subversion.conf

Location /svn>
DAV svn
SVNParentPath /home/svn
AuthType Basic
AuthName “Subversion”
AuthUserFile /etc/svn-auth
Require valid-user
/Location>

Note that the leading less-than symbols are not displayed on the “location” tags because wordpress is retarded.

Add yourself a user into your auth file:
# htpasswd -cm /etc/svn-auth
You’ll be prompted for your password couple times.
Add your directory and fix permissions:
# mkdir /home/svn
# chown apache:apache /home/svn
Create your first repo:
# svnadmin create /home/svn/test
Restart your web service:
# service httpd restart

That’s it! If you point your web browser to http://yourwebserver/svn/test you should get a “Revision 0” notice.

Leave a Reply

You must be logged in to post a comment.