How to Install and Configure Subversion 1.6 on CentOS 6.2

Subversion is a open source version control system that will manages files and will keep the changes made to the files. In this post i will share the quick steps to install and configure subversion on linux CentOS 6.2 server.

1. Install subversion using yum install :

[root@svn ~]# yum install mod_dav_svn subversion -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * rpmforge: mirror.oscc.org.my
 * updates: mirrors.hostemo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mod_dav_svn.i686 0:1.6.11-2.el6_1.4 will be installed
---> Package subversion.i686 0:1.6.11-2.el6_1.4 will be installed
--> Processing Dependency: perl(URI) >= 1.17 for package: subversion-1.6.11-2.el6_1.4.i686
--> Processing Dependency: libneon.so.27 for package: subversion-1.6.11-2.el6_1.4.i686
--> Running transaction check
---> Package neon.i686 0:0.29.3-1.2.el6 will be installed
--> Processing Dependency: libpakchois.so.0 for package: neon-0.29.3-1.2.el6.i686
---> Package perl-URI.noarch 0:1.40-2.el6 will be installed
--> Running transaction check
---> Package pakchois.i686 0:0.4-3.2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package              Arch            Version                   Repository                     Size
====================================================================================================
Installing:
 mod_dav_svn          i686            1.6.11-2.el6_1.4          CentOS6.2-Repository           79 k
 subversion           i686            1.6.11-2.el6_1.4          CentOS6.2-Repository          2.2 M
Installing for dependencies:
 neon                 i686            0.29.3-1.2.el6            CentOS6.2-Repository          120 k
 pakchois             i686            0.4-3.2.el6               CentOS6.2-Repository           21 k
 perl-URI             noarch          1.40-2.el6                CentOS6.2-Repository          117 k

Transaction Summary
====================================================================================================
Install       5 Package(s)

Total download size: 2.6 M
Installed size: 12 M
Downloading Packages:
----------------------------------------------------------------------------------------------------
Total                                                               7.3 MB/s | 2.6 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : perl-URI-1.40-2.el6.noarch                                                       1/5
  Installing : pakchois-0.4-3.2.el6.i686                                                        2/5
  Installing : neon-0.29.3-1.2.el6.i686                                                         3/5
  Installing : subversion-1.6.11-2.el6_1.4.i686                                                 4/5
  Installing : mod_dav_svn-1.6.11-2.el6_1.4.i686                                                5/5

Installed:
  mod_dav_svn.i686 0:1.6.11-2.el6_1.4               subversion.i686 0:1.6.11-2.el6_1.4

Dependency Installed:
  neon.i686 0:0.29.3-1.2.el6      pakchois.i686 0:0.4-3.2.el6      perl-URI.noarch 0:1.40-2.el6

Complete!

2. Setting up directories

[root@svn ~]# mkdir /svn
[root@svn ~]# mkdir /svn/repos
[root@svn ~]# mkdir /svn/users
[root@svn ~]# mkdir /svn/permissions
[root@svn ~]# chown -R apache:apache /svn

3. Configure httpd Apache server as below:

<VirtualHost *:80>
    ServerAdmin webmaster@svn.ehowstuff.local
    DocumentRoot /svn/repos
    ServerName svn.ehowstuff.local
    ErrorLog logs/svn.ehowstuff.local-error_log
    CustomLog logs/svn.ehowstuff.local-access_log common
</VirtualHost>

4. Create and Configure subversion.conf

[root@svn ~]# vi /etc/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/repos>
        DAV svn
        SVNParentPath /svn/repos
        AuthType Basic
        AuthName "Authorization Realm"
        AuthUserFile /svn/users/passwords
        AuthzSVNAccessFile /svn/permissions/svnaccess
        Require valid-user
</Location>

5. Create first repository using svnadmin command

[root@svn ~]# svnadmin create /svn/repos/testrepo
[root@svn ~]# chown -R apache:apache /svn/repos/testrepo

6. Create htpasswd user to access the testsvn repository

[root@svn ~]# htpasswd -c /svn/users/passwords svnuser1
New password:
Re-type new password:
Adding password for user svnuser1

7. Create svnaccess file to access the testrepo repository

[groups]
testgroup = svnuser1

[testrepo:/]
@testgroup = rw

8. Test your subversion server from browser :

See also  How to Setup MailWatch on CentOS 6.3

http://svn.ehowstuff.local/svn/repos/testrepo/

How to Reset the Directory Manager Password on RHEL 7 / CentOS 7
How to Reset the Directory Manager Password on RHEL 7 / CentOS 7

It is best practice to remember passwords, but because too many passwords, sometimes we forget. We are not encouraged to write the password on any paper or share the password...

How to Find Big Files Size on Linux RHEL/CentOS
How to Find Big Files Size on Linux RHEL/CentOS

As the linux administrator, sometimes we have to identify which files are most take much space in the linux server resulting in low free space. Low disk space can also...

Why Linux users should worry about malware and what they can do about it
Why Linux users should worry about malware and what they can do about it

Don’t drop your guard just because you’re running Linux. Preventing the spread of malware and/or dealing with the consequences of infection are a fact of life when using computers. If...

How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7
How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7

This short howto will explain the steps to reset a lost root password or to reset a forgotten root password on Linux RHEL 7 or CentOS 7. Basically, we will...

How to Update CentOS or Upgrade CentOS to the Latest Version
How to Update CentOS or Upgrade CentOS to the Latest Version

Recently, the latest version of CentOS 7.3 was released. All users of CentOS 7.0, 7.1 and 7.2 can upgrade their system to the most recent. This quick guide will explain...

How to Change your WordPress Username, Nickname and Display Name in MySQL
How to Change your WordPress Username, Nickname and Display Name in MySQL

After you create an account log in WordPress, you may want to change your WordPress username, as appropriate or due to security reason. However, you can not do this from...

How to Enable SSH Root Login on Ubuntu 16.04
How to Enable SSH Root Login on Ubuntu 16.04

As what we wrote in the previous article on how to allow SSH root on Ubuntu 14.04, after installing a fresh new copy of Ubuntu 16.04 LTS, we find that...

How to Change UUID of Linux Partition on CentOS 7
How to Change UUID of Linux Partition on CentOS 7

UUID (Universally Unique IDentifier) should be unique and it is used to identify storage devices on a linux system. If you cloned a virtual machine from vCenter, the metadata containing...

Leave a Reply

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