This is how to blog, Install & Configure Apache Subversion (SVN) on CentOS 7.
What is Apache Subversion :-
Apache Subversion, which is unremarkably referred to inwards its abbreviated variety out equally SVN, (named subsequently the command yell SVN) is a pop software versioning in addition to revision command organisation which is distributed equally a costless software nether the Apache License. Mainly used past times developers to keep introduce in addition to historic file versions similar documentation, source code, in addition to spider web pages, it primarily aims to travel a compatible successor to the extensively used CVS (Concurrent Versions System). As a affair of fact, the Subversion has been widely used past times the costless software community. This tutorial explains how to install in addition to travel SVN on CentOS 7.Step:1 Install SVN & Apache Packages :
SVN & Apache (HTTPD) packet are available inwards the default CentOS vii repository. Use below yum command to install required packages :
[root@SVN ]# yum install httpd subversion mod_dav_svn mod_ldap
Step:2 Edit the configuration file of Apache Subversion
[root@svn ]# vi /etc/httpd/conf.modules.d/10-subversion.conf
Make certain below mentioned trace of piece of job are uncomment inwards the config file (/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
Step:3 Start & enable the apache (httpd) service:
[root@svn ]# systemctl starting fourth dimension httpd
[root@svn ]# systemctl enable httpd Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Step:4 Allow httpd port inwards firewall:
Add port fourscore using below command
[root@svn ]# firewall-cmd --zone=public --permanent --add-port=80/tcp success
Reload firewall config using below command
[root@svn ]# firewall-cmd --reload success
Check allowed port using below command
[root@svn ]# firewall-cmd --zone=public --permanent --list-port 80/tcp
Step:5 Create & Configure SVN Repository :
First Create a Directory where you lot desire to exercise all the repositories.
[root@svn ]# mkdir /svndata
Now exercise SVN repository using below command.
[root@svn ]# svnadmin exercise /svndata/testrepo
Now Change the permission in addition to brand possessor to Apache using below command
[root@svn ]# chown -R apache:apache /svndata/testrepo/
Step:6 Create repository configuration file:
Now, We postulate to exercise a config file for the testrepo so that nosotros tin access it through Apache.
Create testrepo.conf file to path /etc/httpd/conf.d/
[root@svn ]# vi /etc/httpd/conf.d/testrepo.conf
Now append below mentioned trace of piece of job into file.
<location /testrepo> DAV svn SVNPath /svndata/testrepo Order deny,allow Deny from all Allow from 10.0.0.0/24 Allow from 10.0.1.0/24 AuthType Basic AuthName "SVN Auth" AuthBasicProvider "ldap" AuthLDAPURL ldap://BMT-DC-01.ISHIR.LOCAL:3268/DC=ISHIR,DC=LOCAL?sAMAccountName?sub?(objectClass=user) AuthLDAPBindDN svnauth@ISHIR.LOCAL AuthLDAPBindPassword ********* authzldapauthoritative Off AuthzSVNAccessFile /etc/svn/testrepo require valid-user </Location>
Save in addition to buy the farm from file.
Step:7 Create User access file.
We postulate to exercise auth file, Where nosotros tin assign user access for the specific repository using below command.
[root@svn ]# vi /etc/svn/testrepo
Now add together the user whom you lot desire to plough over access on this repo.
[/] asingh = rw
Save in addition to buy the farm from file.
Step:8 Restart Apache in addition to endeavor to browse the URL.
[root@svn ]# systemctl restart httpd
Now browse the URL:
Step:9 Import Trunk, Tag in addition to Branch :
First, exercise a directory where nosotros volition exercise trunk, tag in addition to branches then that inwards futurity nosotros tin exactly import from here.
[root@svn ]# mkdir /home/amar [root@svn ]# cd /home/amar/ [root@svn amar]# mkdir body branches tag
Let's import trunk, tag in addition to branches into testrepo using below command.
[root@svn ]# svn import /home/amar/ file:///svndata/testrepo/ -m "initial messege" Adding /home/amar/tag Adding /home/amar/trunk Adding /home/amar/branches Committed revision 1. [root@svn ]#
Step:10 Restart Apache in addition to depository fiscal establishment fit URL:
[root@svn ]# systemctl restart httpd
Now browse the URL
That's All
!!!!! Cheers !!!!!!