#!/bin/bash dir="/svndata" name="puppet" user="test" passwd="test" yum -y install subversion expect mkdir -p $dir cd $dir/ svnadmin create $name echo " [groups] admin = $user [$name:/] @admin = rw">>$dir/$name/conf/authz echo "$user = $passwd">>$dir/$name/conf/passwd #svn import $dir/$name/ file://$dir/$name -m "Initial repository" sed -i 's/# password-db = passwd/password-db = \'$dir'\/'$name'\/conf\/passwd/g' $dir/$name/conf/svnserve.conf sed -i "s/# anon-access = read/anon-access = none/" $dir/$name/conf/svnserve.conf sed -i 's/# authzauthz-db = authz/authz-db = \'$dir'\/'$name'\/conf\/authz/g' $dir/$name/conf/svnserve.conf sed -i 's/\$OPTIONS/& -r \'$dir'\//' /etc/init.d/svnserve /etc/init.d/svnserve start
使用说明:svn co svn://IP/puppet 用户和密码都是test
ps:新增了一行anon-access方便客户端查看svn服务器提交的log
出处:http://tntdba.blog.51cto.com/1199791/1131484
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索svn
, conf
, name
, passwd
, dir
svnserve
,以便于您获取更多的相关知识。
时间: 2024-10-27 21:11:36