linux: create svn repository
Assumptions:
You already have SVN installed on your linux server. If you do not know if it is installed, just type command
which svn
If this returns a valid path as output, then it means that svn is installed on your linux box. If not, you need to install it. Installing subversion is very easy (for most distributions) and ample documentation is available on the web. You can start with http://subversion.apache.org/.
Four steps to complete svn repository creation on linux
- log onto server as root
- 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
- Create repository using following command
- 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
- Grant Read/Write/Execute permissions to “all” on this repository
chmod -R 770 /path/to/repo/RepoName
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
After this, all you need to do is
- Install a client like tortoiseSVN on the user’s machine
- SVN Checkout the repository. I would use a URL like following to connect to my newly created repository
svn+ssh://username@servername/path/to/repo/RepoName
Where
- username: one of the users from group all
- servername: my linux server which hosts SVN
For my testproject, the path looks like
svn+ssh://jyotsnas@servername/svnRepos/testproject
Related posts
