Monday, April 28, 2014

SVN-Subversion installation and configuration

 

Installing SVN

yum install mod_dav_svn subversion
Add it in httpd conf or in httpd/conf.d/subversion.conf

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /svn>
DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
Require valid-user
</Location>

Creating User for accessing the SVN

htpasswd -cm /etc/svn-auth-users user1
New password:
Re-type new password:
Adding password for user user1

## Create user2 ##
htpasswd -m /etc/svn-auth-users user2
New password:
Re-type new password:
Adding password for user user2

Creating the directories and correcting permissions

mkdir /var/www/svn
cd /var/www/svn

Creating repositories

svnadmin create testrepo
chown -R apache.apache testrepo


## If you have SELinux enabled (you can check it with "sestatus" command) ##
## then change SELinux security context with chcon command ##

chcon -R -t httpd_sys_content_t /var/www/svn/testrepo

## Following enables commits over http ##
chcon -R -t httpd_sys_rw_content_t /var/www/svn/testrepo

or else disable the selinux
setenforce 0
Restart the service

systemctl restart httpd.service
## OR ##
service httpd restart

## CentOS / RHEL ##
/etc/init.d/httpd restart
## OR ##
service httpd restart

 

No comments:

Post a Comment