centos7 搭建 svn 服务

systemd 脚本:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[Unit]
Description=Subversion
After=syslog.target network.target

[Service]
Type=forking
ExecStart=/usr/bin/svnserve -d -R -r /home/svn/svn --pid-file=/var/run/svnserve.pid
ExecReload=/bin/kill -HUP $MAINPID
KillMode=control-group
Restart=on-failure
User=root
Group=root
WorkingDirectory=/home/svn/

[Install]
WantedBy=multi-user.target

权限:

关闭 firewalld

1
2
systemctl stop firewalld
systemctl disable firewalld

关闭 SELINUX

查看:

1
2
getenforce
sestatus -v

临时关闭:

1
setenforce 0

重启生效:

1
2
vim /etc/selinux/config
SELINUX=disabled