Setup a Subversion server in three minutes

25 篇文章 0 订阅
18 篇文章 0 订阅

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.



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值