为了方便进行hadoop开发和测试核自己控制,我在linux开发机上搭建了一个svnserve,没想到还费了挺多时间,汗
具体步骤如下,希望后来人可以节约点时间了
1. 安装subversion
我采用的方式是 sudo yum subversion
根据你的box的不同你可以采用不同的安装方式
2. 创建你的svn仓库文件目录
svnadmin create /home/maosen/svnrepos
这时候就会在/home/maosen/svnrepos目录里面生成一系列的文件
conf dav db format hooks locks README.txt
3. 进行授权管理
根据你的需求可以进行不同的配置,我的配置如下:
svnserve.conf文件:
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the conf directory.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the conf
### directory. If you don't specify an authz-db, no path-based access
### control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
authz文件:
[groups]
developer = maosen
[/]
@developer = rw
* = r
[repository:/home/maosen/dev/svnrepos]
@developer = rw
* = r
passwd文件:
[users]
maosen = 123456
4. 载入你的代码
svn import dev/localsvn/hadoop-0.20.0/ file:///home/maosen/dev/svnrepos/hadoop-0.20.0 -m 'import'
5. 访问你的代码
svn co svn:///"hostname or ip"/hadoop-0.20.0 hadoop-0.20.0
完毕
(hitzhang) |