龙空技术网

CentOS 7 - SVN服务

alphabook 446

前言:

现在兄弟们对“centos7svn无法检出”可能比较注意,兄弟们都想要剖析一些“centos7svn无法检出”的相关文章。那么小编也在网上汇集了一些有关“centos7svn无法检出””的相关资讯,希望姐妹们能喜欢,各位老铁们快快来学习一下吧!

SVN是subversion的缩写,是一个开放源代码的版本控制系统。

服务器端配置

安装SVN

yum install subversion -ysvnserve --version

创建第一个仓库(默认主路径为/var/svn)

mkdir -p /var/svn/repo1svnadmin create /var/svn/repo1

修改配置文件vi /var/svn/repo1/conf/passwd

# Add below user accountadmin01 = 123456admin02 = 123456user01 = 123456user02 = 123456

修改配置文件vi /var/svn/repo1/conf/authz

# Add below[groups]administrators = admin01,admin02users = user01,user02[/]@administrators = rw@users = r* =

修改配置文件vi /var/svn/repo1/conf/svnserve.conf

# Make sure below activeanon-access=noneauth-access=writepassword-db=passwdauthz-db=authz

启动svn

svnserve -d -r /var/svnps -aux | grep svnserve

更好的自动服务模式

cat /etc/sysconfig/svnserve# 默认为/var/svn,如果仓库创建在其他目录,这里需要相应修改OPTIONS="-r /var/svn"# 启动服务,并设为开机自动运行systemctl start svnservesystemctl enabe lsvnservesystemctl status svnserve

查询socket statistics状态

ss -antp | grep svnserve

设置防火墙例外

firewall-cmd --permanent --add-port=3690/tcpfirewall-cmd --reloadfirewall-cmd --list-ports

报错1:Can't open file '/svn/repos/format': Permission denied

可以临时关闭SELINUX

setenforce 0getenforce

备份

svnadmin dump /svn/repos > /backup/repos-$(date +%Y%m%d).dump

恢复

svnadmin create /svn/repossvnadmin load /svn/repos < /backup/repos-xxxxxxxx.dump

Hotcopy备份与恢复

svnadmin hotcopy /svn/repos /backup/repos-hotcopy-$(date +%Y%m%d)svnadmin hotcopy /backup/repos-hotcopy-xxxxxxxx /svn/repos

Hotcopy参考

Can't I just use a hotcopy to restore the repository?

It depends, hotcopies created with svnadmin hotcopy must be moved to a server with identical setup. You should have the same version of subversion installed on both servers, same operating system, etc.

Subversion dumps are designed to work with different versions of subversion, and are just more flexible. Hotcopies are handy to have, but I recommend creating both hotcopies and dumps as part of your backup plan.

客户端配置

Windows系统安装TortoiseSVN

URL地址为svn://xxx.xxx.xxx.xxx/repo1

CentOS系统

yum install subversion -ymkdir /svn_repo1svn checkout svn://xxx.xxx.xxx.xxx/repo1 /svn_repo1 --username=admin01touch a.csvn add a.csvn commit -m "add a.c"svn status

标签: #centos7svn无法检出