查看下载svn
查看svn是否安装
rpm -qa subversion
查看svn版本
svn --version
查看安装位置
rpm -ql subversion
下载svn
yum install subversion
搭建多项目svn
1.创建svn 总目录
mkdir /opt/svn
2.创建svn项目1、svn项目2目录,并且向文件夹中搭建svn
mkdir /opt/svn/repo1
mkdir /opt/svn/repo2
svnadmin create /opt/svn/repo1
svnadmin create /opt/svn/repo2
注:svn目录中 db中存放的是提交文件,文件存储采用二进制方式,conf 为svn提交配置的密码与用户及其启动。
进入svn项目1的配置文件目录
cd /opt/svn/repo1/conf
vim修改文件authz
---------------------------以下是authz文件内容
### 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
[\]
admin1= rw
admin2 = r
注:此处[\]要加
vim修改文件passwd
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
# harry = harryssecret
# sally = sallyssecret
admin1 = 123456
admin2 = 123456
修改配置文件serve.conf
启动svn此处选择根目录
svnserve -d -r /opt/svn/
查看svn运行状态
ps -ef|grep svnserve
关闭svn进程
kill -9 进程号
开启svn端口
查看端口
firewall-cmd --list-ports
firewall-cmd --list-all
开启端口
firewall-cmd --zone=public --add-port=3690/tcp --permanent
命令含义:
–zone #作用域
–add-port=3690/tcp #添加端口,格式为:端口/通讯协议
–permanent #永久生效,没有此参数重启后失
重启防火墙
firewall-cmd --reload #重启firewall
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
客户端svn链接验证
svn://ip地址:3690/xxxx