Subversion is a code repository management system that is very similar to CVS, with some additional features that make it a more complete solution. Here’s a short list:
If you end up upgrading to svn, you’ll need to change all your ant build scripts to make sure they use svn to build and compile, and that you update the repository information and users to the new setup. SVN uses apache and allows for a lot of coll features out of the box like being able to browse your repository from the web, much in thanks to apache because svn uses the http protocol combined with webdav to allow for file uploads, authentication, stuff like that. There is also a lot of community support as well as third party plugins for both svn and IDE platforms like eclipse and netbeanz etc.
So here’s how to set it up:
make sure subversion is installed
[root@bedrock ~]# yum install subversion
[root@bedrock ~]# yum install mod_dav_svn
create your repository
[root@bedrock ~]# mkdir /svn/repos/your_repository
create your svn repository
[root@bedrock ~]# svnadmin create /svn/repos/your_repository
set the permissions
[root@bedrock ~]# chown –R apache:apache /subversion
fix the SUSElinux permissions stuff
[root@bedrock ~]# chcon -R -h -t httpd_sys_content_t /svn
set up the apache location configuration
[root@bedrock ~]# vi /etc/httpd/conf.d/subversion.conf
<Location /svn>
DAV svn
# any "/svn/repoX" URL will map to a repository /svn/repos/repoX
SVNParentPath /svn/repos
# Limit write permission to list of valid users.
<LimitExcept GET PROPFIND OPTIONS REPORT>
# Require SSL connection for password protection.
# SSLRequireSSL
AuthType Basic
AuthName "Openscope SVN Repository"
AuthUserFile /svn/authentication/passwords
Require valid-user
# AuthzSVNAccessFile /svn/authentication/svnauth
</LimitExcept>
</Location>
set up the subversion users
[root@bedrock ~]# htpasswd -cb /svn/authentication/passwords user1 password1
[root@bedrock ~]# htpasswd -b /svn/authentication/passwords user2 password2
restart the apache service
[root@bedrock ~]# service httpd restart
you should be good to go.
Related posts: