STEP BY STEP SVN INSTALLATION
Apache Subversion mostly used for software versioning and revision control system. and used to maintain the software files such as source code documents and developed web pages.
Here basic installation methods for subversion and user based access for directories.
# yum update -y
# yum install subversion mod_dav_svn -y
# yum install httpd -y
Remove welcome.conf use below command as a root user.
# sed -i 's/^/#&g' /etc/httpd/conf.d/welcome.conf
# sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/httpd/conf/httpd.conf
Add below lines in 10-subversion.conf.
vi /etc/httpd/conf.modules.d/10-subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule dontdothat_module modules/mod_dontdothat.so
<Location /svn>
DAV svn
SVNParentPath /home/svn
AuthName "SVN Repos"
AuthType Basic
AuthUserFile /etc/svn/svn-auth
AuthzSVNAccessFile /home/svn/pro1/conf/authz
Require valid-user
</Location>
Create a svn folder for example i have created in /home/svn.
# mkdir /hom/svn
# cd /home/svn/
Create svn repo using below command.
# svnadmin create /home/svn/pro1
Add svn privileged user using below command one more user you need to add, never use htpasswd -c use only m to add repo users.
# htpasswd -cm /etc/svn/svn-auth user1
# htpasswd -m /etc/svn/svn-auth user2
Change owner ship and set permission for svn-auth file.
# chown root:apache /etc/svn/svn-auth
# chmod 640 /etc/svn/svn-auth
Set user based directory access to edit authz file add line as per your directory repo level and save the file.
[groups]
admin=user1
pro1_user=user2
[/]
@admin=rw
[repo1:/trunk/software]
@pro1_user=rw
[repo1:/trunk/documents]
@pro1_user=r
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
# [/foo/bar]
After saving the authz file restart the httpd service.
# systemctl start httpd.service
# systemctl enable httpd.service
Apache Subversion mostly used for software versioning and revision control system. and used to maintain the software files such as source code documents and developed web pages.
Here basic installation methods for subversion and user based access for directories.
# yum update -y
# yum install subversion mod_dav_svn -y
# yum install httpd -y
Remove welcome.conf use below command as a root user.
# sed -i 's/^/#&g' /etc/httpd/conf.d/welcome.conf
# sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/httpd/conf/httpd.conf
Add below lines in 10-subversion.conf.
vi /etc/httpd/conf.modules.d/10-subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule dontdothat_module modules/mod_dontdothat.so
<Location /svn>
DAV svn
SVNParentPath /home/svn
AuthName "SVN Repos"
AuthType Basic
AuthUserFile /etc/svn/svn-auth
AuthzSVNAccessFile /home/svn/pro1/conf/authz
Require valid-user
</Location>
Create a svn folder for example i have created in /home/svn.
# mkdir /hom/svn
# cd /home/svn/
Create svn repo using below command.
# svnadmin create /home/svn/pro1
Add svn privileged user using below command one more user you need to add, never use htpasswd -c use only m to add repo users.
# htpasswd -cm /etc/svn/svn-auth user1
# htpasswd -m /etc/svn/svn-auth user2
Change owner ship and set permission for svn-auth file.
# chown root:apache /etc/svn/svn-auth
# chmod 640 /etc/svn/svn-auth
Set user based directory access to edit authz file add line as per your directory repo level and save the file.
[groups]
admin=user1
pro1_user=user2
[/]
@admin=rw
[repo1:/trunk/software]
@pro1_user=rw
[repo1:/trunk/documents]
@pro1_user=r
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
# [/foo/bar]
After saving the authz file restart the httpd service.
# systemctl start httpd.service
# systemctl enable httpd.service
No comments:
Post a Comment