How to Install and Configure Subversion 1.8 on CentOS 6.5

Subversion is a open source version control system that will manages files and will keep the changes made to the files. With Subversion, it can help you to recovers the older files and directories and also to examine the history of your files and directories how they are changed all over time. This post will discuss how you can install and configure Subversion 1.8 on CentOS 6.5

1. Prepare WANdisco repo :

[root@centos6-05 ~]# wget opensource.wandisco.com/RPM-GPG-KEY-WANdisco -O /tmp/RPM-GPG-KEY-WANdisco
[root@centos6-05 ~]# wget opensource.wandisco.com/RPM-GPG-KEY-WANdisco -O /tmp/RPM-GPG-KEY-WANdisco
--2014-03-11 23:29:59--  http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
Resolving opensource.wandisco.com... 54.248.108.17
Connecting to opensource.wandisco.com|54.248.108.17|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1759 (1.7K) [application/octet-stream]
Saving to: â/tmp/RPM-GPG-KEY-WANdiscoâ

100%[==========================================================>] 1,759       --.-K/s   in 0.003s

2014-03-11 23:30:00 (665 KB/s) - â/tmp/RPM-GPG-KEY-WANdiscoâ

2. Import RPM-GPG-KEY-WANdisco. Once imported, it safe to delete :

[root@centos6-05 ~]# rpm --import /tmp/RPM-GPG-KEY-WANdisco
[root@centos6-05 ~]# rm -rf /tmp/RPM-GPG-KEY-WANdisco

You can get more subversion file from the followings :
http://opensource.wandisco.com/rhel/6/svn-1.8/RPMS/x86_64/

See also  How to Check VPS Network Speed

3. Configure WANdisco repo file :

[root@centos6-05 ~]# vi /etc/yum.repos.d/WANdisco-1.8.repo
[WANdisco]
name=WANdisco SVN Repo 1.8
enabled=1
baseurl=http://opensource.wandisco.com/rhel/6/svn-1.8/RPMS/
gpgcheck=1

4. Install subversion using yum install :

[root@centos6-05 ~]# yum install subversion mod_dav_svn -y

Full installation screen :

[root@centos6-05 ~]# yum install subversion mod_dav_svn -y
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/metalink                                                                | 5.2 kB     00:00
 * Webmin: download.webmin.com
 * base: centos.ipserverone.com
 * epel: epel.mirror.net.in
 * extras: centos.ipserverone.com
 * updates: centos.ipserverone.com
WANdisco                                                                     |  951 B     00:00
WANdisco/primary                                                             |  65 kB     00:00
WANdisco                                                                                    309/309
Webmin                                                                       |  951 B     00:00
Webmin/primary                                                               |  21 kB     00:00
Webmin                                                                                      168/168
base                                                                         | 3.7 kB     00:00
base/primary_db                                                              | 4.4 MB     00:45
epel                                                                         | 4.2 kB     00:00
epel/primary_db                                                              | 6.0 MB     01:51
extras                                                                       | 3.4 kB     00:00
extras/primary_db                                                            |  19 kB     00:00
updates                                                                      | 3.4 kB     00:00
updates/primary_db                                                           | 2.1 MB     00:18
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mod_dav_svn.x86_64 0:1.8.8-1 will be installed
---> Package subversion.x86_64 0:1.8.8-1 will be installed
--> Processing Dependency: libserf-1.so.1()(64bit) for package: subversion-1.8.8-1.x86_64
--> Running transaction check
---> Package serf.x86_64 0:1.3.2-2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                   Arch                 Version                Repository              Size
====================================================================================================
Installing:
 mod_dav_svn               x86_64               1.8.8-1                WANdisco                77 k
 subversion                x86_64               1.8.8-1                WANdisco               2.2 M
Installing for dependencies:
 serf                      x86_64               1.3.2-2                WANdisco                43 k

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

Total download size: 2.3 M
Installed size: 7.8 M
Downloading Packages:
(1/3): mod_dav_svn-1.8.8-1.x86_64.rpm                                        |  77 kB     00:00
(2/3): serf-1.3.2-2.x86_64.rpm                                               |  43 kB     00:00
(3/3): subversion-1.8.8-1.x86_64.rpm                                         | 2.2 MB     00:19
----------------------------------------------------------------------------------------------------
Total                                                               112 kB/s | 2.3 MB     00:20
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : serf-1.3.2-2.x86_64                                                              1/3
  Installing : subversion-1.8.8-1.x86_64                                                        2/3
  Installing : mod_dav_svn-1.8.8-1.x86_64                                                       3/3
Stopping httpd: [  OK  ]
Starting httpd: [  OK  ]
  Verifying  : mod_dav_svn-1.8.8-1.x86_64                                                       1/3
  Verifying  : subversion-1.8.8-1.x86_64                                                        2/3
  Verifying  : serf-1.3.2-2.x86_64                                                              3/3

Installed:
  mod_dav_svn.x86_64 0:1.8.8-1                      subversion.x86_64 0:1.8.8-1

Dependency Installed:
  serf.x86_64 0:1.3.2-2

Complete!

5. Setting up SVN directories :

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

6. Configure httpd Apache server as below :

[root@centos6-05 ~]# vim /etc/httpd/conf/httpd.conf
<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>

7. Do a backup of origial subversion file :

[root@centos6-05 ~]# mv /etc/httpd/conf.d/subversion.conf /etc/httpd/conf.d/subversion.conf.bak

8. Create and Configure subversion.conf :

[root@centos6-05 ~]# 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>

9. Create first repository using svnadmin command :

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

10. Create htpasswd user to access the testrepo repository :

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

11. Create svnaccess file to access the testrepo repository :

[root@centos6-05 ~]# vi /svn/permissions/svnaccess

Add the following :

[testrepo:/]
svnuser1 = rw

12. Restart httpd :

[root@centos6-05 ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

13. Test your subversion server from browser :

See also  How to Install Subversion 1.6.16 on CentOS 5.5 Server

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 *