How to install subversion(SVN) in RedHat Linux

Install the required packages

yum install httpd subversion mod_dav_svn -y

Create and Configure a Local SVN Repository.

mkdir -p /var/www/svn

Navigate to the svn directory and create a repo.

cd /var/www/svn/

svnadmin create test-repo

Setup Trunk-Based development folder structure

svn mkdir file:////var/www/svn/test-repo/trunk -m "Create trunk directory"
svn mkdir file:///var/www/svn/test-repo/branches -m "Create branches directory"
svn mkdir file:///var/www/svn/test-repo/tags -m "Create tags directory"

Change ownership of /var/www/svn directory.

chown -R apache:apache /var/www/svn/

Create a subversion configuration file and add the following lines

vi /etc/httpd/conf.d/subversion.conf

Create subversion user to access the repo.

htpasswd -cm /etc/svn-auth-accounts mahesh

Enable and start apache service.

systemctl enable httpd
systemctl start httpd

Access your svn repo in web browser

http://server-ip/svn/repo-name

By Mahesh

Leave a Reply

Your email address will not be published. Required fields are marked *