Saturday, February 11, 2012

SVN repository creation on linux in four steps

  1. log onto server as root
  2. I prefer to have all svn repositories in one directory for better organization and easy maintenance. So next step for me would be to change to my svn directory.

cd /svnRepos

If you do not already have a directory for svn repositories, I would recommend creating one.

mkdir svnRepos

  1. Create repository using following command

svnadmin create /path/to/repo/RepoName

where : RepoName is the name of repository to be created. As an example, I want to create a repository for my testproject. I would write

svnadmin create testproject

  1. Change group ownership of repository for the intended group. In this case, consider I have a user group created as “all” and I want this group to have ownership to this repository.

chown -R :all /path/to/repo/RepoName

  1. Grant Read/Write/Execute permissions to “all” on this repository

chmod -R 770 /path/to/repo/RepoName

6. svnserve -d --listen-port 2122 -r /home/demo/repository

No comments:

Post a Comment