centos7 脚本搭建SVN
#!/usr/bin/env bash
#安装软件 HTTP 和 SVN软件
yum install -y httpd subversion mod_dav_svn
#创建库文件夹并更改文件夹权限
mkdir /home/svn
chown -R apache:apache /home/svn
svnadmin create /home/svn
chmod -R g+rws /home/svn
#修改SVN配置文件
cat > /etc/httpd/conf.modules.d/-subversion.conf << EOF
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule dontdothat_module modules/mod_dontdothat.so
<Location /svn>
DAV svn
SVNPath /home/svn
AuthType Basic
AuthName "SVN repository"
AuthUserFile /etc/subversion/passwd
AuthzSVNAccessFile /home/svn/conf/authz
Require valid-user
</Location>
EOF
#启动HTTP服务
systemctl enable httpd
systemctl start httpd
#创建用户,设置库文件的用户权限
echo "admin = jason" >> /home/svn/conf/authz
echo "[/]" >> /home/svn/conf/authz
echo "@admin = rw" >> /home/svn/conf/authz
echo "*=" >> /home/svn/conf/authz
htpasswd -c /etc/subversion/passwd jason
chown -R apache:apache /home/svn #关闭防火墙和selinux,selinux必须关闭,防火墙不关闭的话打开防火墙的80和3690端口
#运行脚本: sh -x svn.sh
添加账户: htpasswd -m /etc/subversion/passwd monday
账户权限:
cd /home/svn/conf
[root@jason conf]# cat authz |grep -Ev '^%|^$'
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
### - a single user,
### - a group of users defined in a special [groups] section,
### - an alias defined in a special [aliases] section,
### - all authenticated users, using the '$authenticated' token,
### - only anonymous users, using the '$anonymous' token,
### - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
# [/foo/bar]
# harry = rw
# &joe = r
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
admin = jason,test,monday,aimee
users =luffy
[/]
@admin = rw #读写
@users=r #读
*= #其他用户无权限
[/test]
@users = r
重启httpd服务
客户端
TortoiseSVN-1.9.7.27907-x64-svn-1.9.7
SVN地址:http://192.168.199.224/svn/
http://192.168.199.224/svn/test
centos7 脚本搭建SVN的更多相关文章
- CentOS7下搭建SVN服务器
(1).安装SVN 1)安装SVN [root@youxi1 ~]# yum -y install subversion mod_dav_svn [root@youxi1 ~]# cat /etc/s ...
- CentOS7:搭建SVN + Apache 服务器
1. 安装httpd 安装httpd服务: $ sudo yum install httpd 检查httpd是否安装成功: $ httpd -version Server version: Apach ...
- Centos7下搭建SVN服务,本地提交代码自动同步到WEB目录
1.安装SVN服务[root@bogon ~]# yum -y install subversion 2.查看svnserve安装目录[root@bogon ~]# whereis svnserves ...
- Centos7 下搭建SVN + Apache 服务器
1. 安装httpd 安装httpd服务: $ sudo yum install httpd 检查httpd是否安装成功: $ httpd -version Server version: Apach ...
- centos7.5搭建svn
1.安装svnyum install subversion 2.查看安装位置rpm -ql subversion 3.创建svn版本库目录mkdir -p /var/svn/svnrepos 4.创建 ...
- 基于腾讯Centos7云服务器搭建SVN版本控制库
基于腾讯Centos7云服务器搭建SVN版本控制库 最近在和小伙伴组队参加一个关于人工智能的比赛,无奈不知道怎么处理好每个人的代码托管问题,于是找到了晚上免费svn托管服务器的服务,但是所给的免费空间 ...
- centos7 搭建svn服务器&客户端的访问&备份迁移
当今用于版本控制的软件程序主要的有svn和git,其它软件咱不熟悉,今天记录下搭建svn服务器和svn客户端使用: 使用环境:虚拟机为centos7系统,svn服务器安装在centos7系统平台上,s ...
- centos7.3给搭建SVN服务器
centos7.3给搭建SVN服务器 1 安装svnserver yum install subversion 2 查看版本 svnserve --version 3 创建版本库 3.1 运行以下命令 ...
- linux(centos7)下SVN服务器如何搭建
linux(centos)下SVN服务器如何搭建?说到SVN服务器,想必大家都知道,可以是在LINUX下如何搭建SVN服务器呢?那么今天给大家分享一下linux(centos)搭建SVN服务器的思路! ...
随机推荐
- iOS基础知识之排序
1.字符串比较 - (NSComparisonResult)compare:(NSString *)str; 例如: NSString *str1 = @"zhangsan"; N ...
- windows 配置java环境变量
https://www.cnblogs.com/cnwutianhao/p/5487758.html
- kubectl version报did you specify the right host or port
现象: [root@localhost shell]# kubectl version Client Version: version.Info{Major:", GitVersion:&q ...
- [bcc32 Error] typeinfo.h(154): E2367 Can't inherit RTTI class from non-RTTI base 'exception'
[bcc32 Error] typeinfo.h(154): E2367 Can't inherit RTTI class from non-RTTI base 'exception' Full p ...
- 微信小程序request请求封装
var app = getApp(); function request(url,postData,doSuccess,doFail,doComplete){ var host = getApp(). ...
- 自动调整linux系统时间和时区与Internet时间同步
调整linux系统时间和时区与Internet时间同步 一.修改时区:# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime修改为中国的东八区# v ...
- openGL-------------别人的博客
https://blog.csdn.net/dcrmg/article/category/6505957 OpenGL(一)绘制圆.五角星.正弦曲线 ========================= ...
- python字符串的基本用法
var1 = "hello word"var2 = "runootab"print var2.capitalize()#首字母大写print (var2.cou ...
- eclipce导入java 项目不可用
- Android DevArt4:IntentFilter学习及深入~问题描述:在不指定具体action前提下,如果有两个以上的Activity,具有完全相同的intent-filter,项目同步是否会出现异常?程序运行是否会崩溃?
概述:GitHub IntentFilter意图过滤器,三种匹配规则:action.category.data 重点:过滤规则中必须设置 '<category android:name=&quo ...