Installing SVN (Server & Client) on CentOS

The process is EXTREMELY simple. One line to install SVN, two to create the repository, and one to run the daemon:

yum install subversion.i386 mkdir /svn svnadmin create /svn/my-repo/ svnserve -d

Here’s what my results produced (The first line confirms I have subversion available in yum): [root@hosting ~]# yum list | grep ‘subversion’ subversion.i386 1.4.2-4.el5_3.1 base subversion-devel.i386 1.4.2-4.el5_3.1 base subversion-javahl.i386 1.4.2-4.el5_3.1 base subversion-perl.i386 1.4.2-4.el5_3.1 base subversion-ruby.i386 1.4.2-4.el5_3.1 base [root@hosting ~]# yum install subversion.i386 Loaded plugins: fastestmirror Determining fastest mirrors addons | 951 B 00:00 base | 2.1 kB 00:00 extras | 2.1 kB 00:00 updates | 1.9 kB 00:00 wiredtree | 951 B 00:00 Excluding Packages in global exclude list Finished Setting up Install Process Resolving Dependencies –> Running transaction check —> Package subversion.i386 0:1.4.2-4.el5_3.1 set to be updated –> Processing Dependency: perl(URI) >= 1.17 for package: subversion –> Processing Dependency: neon >= 0.25.5-6.el5 for package: subversion –> Processing Dependency: libneon.so.25 for package: subversion –> Processing Dependency: libapr-1.so.0 for package: subversion –> Processing Dependency: libaprutil-1.so.0 for package: subversion –> Running transaction check —> Package apr.i386 0:1.2.7-11.el5_3.1 set to be updated —> Package apr-util.i386 0:1.2.7-11.el5 set to be updated –> Processing Dependency: libpq.so.4 for package: apr-util —> Package neon.i386 0:0.25.5-10.el5_4.1 set to be updated —> Package wt-URI.noarch 0:1.35-1 set to be updated –> Processing Dependency: perl(Business::ISBN) for package: wt-URI –> Running transaction check —> Package postgresql-libs.i386 0:8.1.21-1.el5_5.1 set to be updated —> Package wt-Business-ISBN.noarch 0:2.00_01-1 set to be updated –> Processing Dependency: perl(Business::ISBN::Data) >= 1.09 for package: wt-Business-ISBN –> Running transaction check —> Package wt-Business-ISBN-Data.noarch 0:1.13-1 set to be updated –> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================ Package Arch Version Repository Size ============================================================================================================================================ Installing: subversion i386 1.4.2-4.el5_3.1 base 2.3 M Installing for dependencies: apr i386 1.2.7-11.el5_3.1 base 123 k apr-util i386 1.2.7-11.el5 base 80 k neon i386 0.25.5-10.el5_4.1 base 101 k postgresql-libs i386 8.1.21-1.el5_5.1 updates 196 k wt-Business-ISBN noarch 2.00_01-1 wiredtree 353 k wt-Business-ISBN-Data noarch 1.13-1 wiredtree 12 k wt-URI noarch 1.35-1 wiredtree 146 k Transaction Summary ============================================================================================================================================ Install 8 Package(s) Upgrade 0 Package(s) Total download size: 3.3 M Is this ok [y/N]: y Downloading Packages: (1/8): wt-Business-ISBN-Data-1.13-1.noarch.rpm | 12 kB 00:00 (2/8): apr-util-1.2.7-11.el5.i386.rpm | 80 kB 00:00 (3/8): neon-0.25.5-10.el5_4.1.i386.rpm | 101 kB 00:00 (4/8): apr-1.2.7-11.el5_3.1.i386.rpm | 123 kB 00:00 (5/8): wt-URI-1.35-1.noarch.rpm | 146 kB 00:00 (6/8): postgresql-libs-8.1.21-1.el5_5.1.i386.rpm | 196 kB 00:00 (7/8): wt-Business-ISBN-2.00_01-1.noarch.rpm | 353 kB 00:00 (8/8): subversion-1.4.2-4.el5_3.1.i386.rpm | 2.3 MB 00:00 ——————————————————————————————————————————————– Total 1.6 MB/s | 3.3 MB 00:02 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : apr 1/8 Installing : neon 2/8 Installing : postgresql-libs 3/8 Installing : wt-Business-ISBN-Data 4/8 Installing : apr-util 5/8 Installing : wt-URI 6/8 Installing : subversion 7/8 Installing : wt-Business-ISBN 8/8 Installed: subversion.i386 0:1.4.2-4.el5_3.1 Dependency Installed: apr.i386 0:1.2.7-11.el5_3.1 apr-util.i386 0:1.2.7-11.el5 neon.i386 0:0.25.5-10.el5_4.1 postgresql-libs.i386 0:8.1.21-1.el5_5.1 wt-Business-ISBN.noarch 0:2.00_01-1 wt-Business-ISBN-Data.noarch 0:1.13-1 wt-URI.noarch 0:1.35-1 Complete! [root@hosting ~]# mkdir /svn [root@hosting ~]# svnadmin create /svn/my-repo/ [root@hosting ~]# svnserve -d

The last thing to do is to configure the password if you want one.

vi /svn/my-repo/conf/svnserve.conf

vi /svn/my-repo/conf/passwd

The details of those two files are beyond the scope of this post. Besides I’m sure you’ll want to triple check, as every one else does, that the svn password file is in plain text. Yes, that’s correct. Plain text.  That makes you think about all the svn repositories that you used secure passwords to access now doesn’t it?