1、新建项目
svnadmin create /mnt/fbdisk/svn/newproject
2、会在svn下面建立newproject目录
total 24
drwxr-xr-x 2 root root 4096 Apr 3 14:05 conf
drwxr-sr-x 6 root root 4096 Apr 2 22:49 db
-r--r--r-- 1 root root 2 Apr 2 22:49 format
drwxr-xr-x 2 root root 4096 Apr 2 22:49 hooks
drwxr-xr-x 2 root root 4096 Apr 2 22:49 locks
-rw-r--r-- 1 root root 229 Apr 2 22:49 README.txt
3、进入conf目录
[[email protected] conf]# ll
total 12
-rw-r--r-- 1 root root 1119 Apr 3 14:02 authz 配置访问权限
-rw-r--r-- 1 root root 355 Apr 2 22:56 passwd 配置密码
-rw-r--r-- 1 root root 3068 Apr 3 14:05 svnserve.conf 配置svn服务
修改svnserver.conf,修改后如下
[[email protected] conf]# cat svnserve.conf |grep -v ^#|grep -v ^$
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
realm = feiben
[sasl]
修改passwd添加账号密码,对应关系为账号密码,等号两边不能有空格,一个账号对应一行
[[email protected] conf]# cat passwd |grep -v ^#|grep -v ^$
[users]
admin=error#[email protected]#
jinshan=error#[email protected]#
修改authz,
[[email protected] conf]# cat authz |grep -v ^#|grep -v ^$
[aliases]
[groups]
admin = admin,jinshan 添加组成员
[/]
@admin = rw admin组成员有读写权限
4、关闭与启动
[[email protected] conf]# ps -ef |grep svn
root 22086 1 0 14:06 ? 00:00:00 svnserve -d -r /mnt/fbdisk/svn/
root 22128 22012 0 14:15 pts/0 00:00:00 grep --color=auto svn
[[email protected] conf]# kill -9 22086 关闭
[[email protected] conf]# svnserve -d -r /mnt/fbdisk/svn/ 启动