• 当前位置: 首 页 > 教育百科 > 学历/技能 > 正文

    svn一键安装脚本

    :2022年01月26日
    懒人笔记

    #!/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

    [编辑:宋聪乔 &发表于江苏]
    [我要纠错]

    来源:本文内容搜集或转自各大网络平台,并已注明来源、出处,如果转载侵犯您的版权或非授权发布,请联系小编,我们会及时审核处理。
    声明:江苏教育黄页对文中观点保持中立,对所包含内容的准确性、可靠性或者完整性不提供任何明示或暗示的保证,不对文章观点负责,仅作分享之用,文章版权及插图属于原作者。

    关键词: bash#yang 2017-7-12#svn 服务 一键 安装
    有价值
    0
    无价值
    0
    猜您喜欢
    最热文章

    暂不支持手机端,请登录电脑端访问

    正在加载验证码......

    请先完成验证