Introduction
I assume you are using Linux and having subversion installed, then you will follow the steps to setup a subversion server with URL looks like svn://localhost/reponame
Setup
1. Create a repository
CD to /opt directory and create a new folder named /opt/repo, then you can use chmod command to rest its permission. Then use the following subversion tool to create new svn project based on /opt/repo/myproject1.
admin create myproject1
2. Create a SVN user
vim /opt/repo/myproject1/conf/svnserve.conf
In that file add the following configure items.
anon-access = none
auth-access = write
password-db = passwd
Create a file /opt/repo/myproject1/conf/passwd.
vim /opt/repo/myproject1/conf/passwd
In that file you fill your user name and password as "username = password", for example:
zhangsan = password1
lisi = password2
then you created two users, zhangsan and lisi, with passwords just after equal character.s
3. Start SVN server as daemon
svnserve -d -r /opt/repo
Now you've made /opt/repo as the root of svn server, and every project folder you created with command svnadmin will store here.
For now, you can access your project1 by svn address.
svn://localhost/myproject1
All done!
Check the project out from svn repository for checking.
svn co svn://localhost/myproject1 --username zhangsan --password password1
Since we set anon-access to none you should be prompted for username and password which you created in the file /opt/repo/myproject1/conf/passwd. In the path, myproject1 is the real project. We manage source code based on projects, rather than using trunk, tags, branches directly.