About: it’s svn tool.

Step1. Install the packages

yum install mod_dav_svn subversion httpd -y

Step2. Start/enable service

systemctl start httpd 
systemctl enable httpd

Step3. Check version

svn –version

Step4. Modify the svn configuration file

vi /etc/httpd/conf.modules.d/10-subversion.conf
<Location /svn>
DAV svn
SVNParentPath /svn
AuthName "SVN Repos"
AuthType Basic
AuthUserFile /etc/svn/svn-auth
AuthzSVNAccessFile /svn/authz
Require valid-user
</Location>

Step5. Create svn directory

mkdir /svn

Step6. Create a repo

cd /svn
svnadmin create repo1

Step7. Change ownership

chown -R apache:apache repo1

Step8. Setup SVN user accounts

mkdir /etc/svn
htpasswd -cm /etc/svn/svn-auth user001
chown root:apache /etc/svn/svn-auth
chmod 640 /etc/svn/svn-auth
Note: To create more accounts  
htpasswd -m /etc/svn/svn-auth user002
htpasswd -m /etc/svn/svn-auth user003

Step9. Setup permissions for users

cp /svn/repo1/conf/authz /svn/authz
 
vi /svn/authz 
Then you can modify the settings within as below:
 [groups]
 admin=user001
 repo1_user=user002
 repo1_trainee=user003
 [/]
 @admin=rw
 [repo1:/]
 @repo1_user=rw
 @repo1_trainee=r

Step10. Start/enable service

systemctl start httpd.service
systemctl enable httpd.service

Step11. Allow service on the firewall

systemctl restart firewalld.service
firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd –reload
setenforce 0

Step12. Access via browser

http://ipaddress/svn/repo1/
Note: you can choose any user and then password to login.
 User "user001
 User "user002
 User "user003

LEAVE A REPLY

Please enter your comment!
Please enter your name here