1. 安装
yum install subversion
2. 创建仓库
建一个svn的仓库,所有的代码都放在这里
# mkdir /opt/svn/
# cd /opt/svn/
# svnadmin create /opt/svn
[root@node1 svn]# ll
total 8
drwxr-xr-x 2 root root 54 Oct 29 00:11 conf
drwxr-sr-x 7 root root 266 Oct 29 01:13 db
-r--r--r-- 1 root root 2 Oct 28 23:28 format
drwxr-xr-x 2 root root 231 Oct 28 23:28 hooks
drwxr-xr-x 2 root root 41 Oct 28 23:28 locks
-rw-r--r-- 1 root root 229 Oct 28 23:28 README.txt
3. 配置
- authz 是权限控制文件
- passwd 是帐号密码文件
- svnserve.conf 是SVN服务配置文件
[root@node1 conf]# cat authz |egrep -v "^$|^#"
[aliases]
[groups]
[/]
wf=rw
wayne=rw
* =
[root@node1 conf]# cat passwd |egrep -v "^$|^#"
[users]
wf = 123456
wayne = 123456
[root@node1 conf]# cat svnserve.conf |egrep -v "^$|^#"
[general]
anon-access = read #匿名用户可读