• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Electric Toolbox Blog

The Electric Toolbox Blog

Linux, Apache, Nginx, MySQL, Javascript and PHP articles

  • Applications
  • FCKEditor
  • Apache
  • Windows
  • Contact Us
Home / Installing subversion on CentOS

Installing subversion on CentOS

Subversion (SVN) is a version control system. This post looks at how to install subversion on CentOS (the process is similar for other Linux distros) and the setting up a repository.

To install subversion on CentOS you need to have the RMForge custom repository enabled, and then issue the following command:

sudo yum install subversion

This will check for any dependencies and then prompt you to install those and subversion itself. Type in "y" and <enter> to install these.

Unfortunately it doesn’t set up anything else after installing the necessary files, so you need to add a subversion user and set up the repositories etc yourself. If we decide to call the subversion user "svn" then you add them like so:

sudo /usr/sbin/useradd svn
sudo passwd svn

And then change to the subversion user like so:

su svn

Change to the svn user’s directory and then create a "repositories" directory like so:

cd
mkdir repositories

And now create your project’s repository. For example, if we had a project called "myproject" you would do this:

cd repositories
svnadmin create myproject

There will now be a "myproject" directory containing the following:

-rw-rw-r-- 1 svn svn  229 Nov 21 16:58 README.txt
drwxrwxr-x 2 svn svn 1024 Nov 21 16:58 conf
drwxrwsr-x 6 svn svn 1024 Nov 21 16:58 db
-r--r--r-- 1 svn svn    2 Nov 21 16:58 format
drwxrwxr-x 2 svn svn 1024 Nov 21 16:58 hooks
drwxrwxr-x 2 svn svn 1024 Nov 21 16:58 locks

You need to edit "myproject/conf/svnserve.conf" and uncomment the following lines:

auth-access = write
password-db = passwd

and edit the password file "myproject/conf/passwd" adding a new user and password. Note that the password is stored in plain text. In the following example we have a user called "john" whose password is "foobar123":

[users]
john = foobar123

And finally, as the svn user, start the subversion daemon like so:

svnserve -d -r /home/svn/repositories

You can now connect to the subversion repository at e.g. svn://svn@hostname/myproject

You can add additional repositories under this user using the "svnadmin create" command and then access them at svn://[userame]@[hostname]/[project name]

Check Out These Related posts:

  1. Subversion Command Line Script to export changed files V2
  2. Getting Transaction Check Error with Yum
  3. jQuery: show plain text in a password field and then make it a regular password field on focus
  4. Installing AWStats on CentOS

Filed Under: Applications, Linux/Unix/BSD

Primary Sidebar

Categories

  • Apache
  • Applications
  • Article
  • Case Studies
  • Email Servers
  • FCKEditor
  • HTML And CSS
  • Javascript
  • Linux/Unix/BSD
  • Microsoft SQL Server
  • Miscellaneous Postings
  • MySql
  • Networking
  • Nginx Web Server
  • Offsite Articles
  • OSX
  • PHP
  • Quick Tips
  • RFC – Request for Comments
  • SilverStripe
  • VMWare
  • VPN
  • Windows
  • WordPress

Recent Posts

  • Vim Show Line Numbers
  • Add User To Group Linux
  • Chmod 777 Tutorial
  • How to Copy Directory Linux
  • Linux create user

Copyright © 2021. ElectricToolBox. All Rights Reserved.

  • Contact Us
  • Copyright Info
  • Privacy Policy
  • Sitemap