How to Install and Use SVN on CentOS 6

Subversion or SVN is a name for Apache Subversion, an extremely popular version control system (VCS). SVN free or open source software and is licensed through Apache. SVN is a common component for software and website development. SVN can also be used to control software when there are many collaborators so that changes aren't lost.

DIFFICULTY Basic - 1 | Medium - 2 | Advanced - 3
RELATED PRODUCTS CentOS-based VPS or Dedicated Server


For these commands to work, you will need to be logged in as the root user. To install SVN and its dependencies, we will use yum.

$ yum -y install subversion , mod_dav_svn

After this installs, you will be able to use subversion on your system.

The following commands will convert a ./my-test-directory/ containing files into a working copy of a newly-created repository:

$ mkdir $HOME/my-test-directory
$ mkdir -p $HOME/.svnrepos/
$ svnadmin create ~/.svnrepos/my-test-repos
$ svn mkdir -m "Create directory structure." file://$HOME/.svnrepos/my-test-repos/trunk file://
$HOME/.svnrepos/my-test-repos/branches file://$HOME/.svnrepos/my-test-repos/tags

Committed revision 1.

$ cd ~/my-test-directory
$ svn checkout file://$HOME/.svnrepos/my-test-repos/trunk ./

Checked out revision 1.

$ svn add --force ./
$ svn commit -m "Initial import"
$ svn up

At revision 1.

Congratulations, if you made it this far then you have successfully installed SVN and created your very first repository.

Was dit artikel nuttig?
Hartelijk dank voor je feedback. Gebruik het supporttelefoonnummer of de bovenstaande chatoptie als je een vertegenwoordiger van de afdeling Klantenondersteuning wilt spreken.
Fijn dat we konden helpen! Kunnen we nog iets voor je doen?
Dat spijt ons. Vertel ons wat je verwarrend vond of waarom je probleem niet is opgelost via de geboden oplossing.