#!/bin/bash#yang 2017-7-12#svn服务一键安装脚本 centos6echo +++++++++++++++++++++echo + svn server install+echo +++++++++++++++++++++read -p "create svn user:" svnuserread -...
#!/bin/bash
#yang 2017-7-12
#svn服务一键安装脚本 centos6
echo +++++++++++++++++++++
echo + svn server install+
echo +++++++++++++++++++++
read -p "create svn user:" svnuser
read -p "create svn mima:" svnpw
read -p "create svn new dir(/home/svnroot/test):" svndir
setenforce 0
`sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config`
if [ -d "$svndir" ]; then
echo "error! svn dir is already!"
exit
else
yum install -y subversion || exit
mkdir "$svndir" -p
svnadmin create "$svndir"
#svnserve.conf 配置文件,passwd:用户名口令文件,authz:权限配置文件
echo '[/]' >>"$svndir"/conf/authz
echo "$svnuser = rw" >>"$svndir"/conf/authz
echo "$svnuser=$svnpw">>"$svndir"/conf/passwd
sed -i 's/# anon-access = read/anon-access = none/g' "$svndir"/conf/svnserve.conf
sed -i 's/# auth-access = write/auth-access = write/g' "$svndir"/conf/svnserve.conf
sed -i 's/# password-db = passwd/password-db = passwd/g' "$svndir"/conf/svnserve.conf
sed -i 's/# authz-db = authz/authz-db = authz/g' "$svndir"/conf/svnserve.conf
#启动svn服务
svnserve -d -r "$svndir"
echo "svnserve -d -r "$svndir"" >> /etc/rc.local
echo "svn server is ok!"
fi
来源:https://www.252823.com/post/9.html
来源:本文内容搜集或转自各大网络平台,并已注明来源、出处,如果转载侵犯您的版权或非授权发布,请联系小编,我们会及时审核处理。
声明:江苏教育黄页对文中观点保持中立,对所包含内容的准确性、可靠性或者完整性不提供任何明示或暗示的保证,不对文章观点负责,仅作分享之用,文章版权及插图属于原作者。
Copyright©2013-2024 JSedu114 All Rights Reserved. 江苏教育信息综合发布查询平台保留所有权利
苏公网安备32010402000125 苏ICP备14051488号-3技术支持:南京博盛蓝睿网络科技有限公司
南京思必达教育科技有限公司版权所有 百度统计