#!/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
Usage Description: SVN co svn://ip/puppet user and password are test
PS: A new line anon-access convenient for clients to view SVN server submitted log
Source: http://tntdba.blog.51cto.com/1199791/1131484