仅作记录,供以后参考:
1. #svnserve 检查是否正确安装svn服务器
2.svnadmin create /dir/xxx 创建一个根目录
3.进入XXX,首先配置 svnserve.conf 开启12 13 18 25 30这些单井号的行,将12行的 anon-access = read 改为 anon-access = none
4.配置authz ,
12 [groups]
13 # harry_and_sally = harry,sally
14 admin = xxxuser,xxxsuer1 //新添加,用户
末尾添加权限配置
23 [/]
24 @admin = rw
25 * =
5.配置 passwd
6 [users]
7 # harry = harryssecret
8 # sally = sallyssecret
9 xxxuser = 123456
10 xxxuser1 = 123456
6.完成配置,启动服务 svnserve -d -r /dir/xxx
可以通过 svn import 或者 svn co svn://127.0.0.1 下载一个版本后 ,svn add 添加文件
7. 编辑 .subversion 里面可以配置过滤规则,这样可以过滤svn st 查看到的改变列表
1 在/etc/rc.d/init.d/下建立svnserved文档
2 copy到svnserved文档下
- svnserve -d -r /xxx/xxx/xxx
- case "$1" in
- start)
- echo "starting svnserve..."
- svnserve -d -r /xxx/xxx/xxx --listen-host xxx.xxx.xxx.xxx
- echo "finished"
- ;;
- stop)
- echo "stoping svnserve"
- killall svnserve
- echo "finished"
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- *)
- exit
- esac
4 更改脚本为可执行属性,chmod 557 /etc/rc.d/init.d/svnserved
5 将svnserved脚本设置为系统服务, chkconfig --add svnserved, 重启系统,ok!