SVN设置开机自动启动

usr/lib/systemd/system/添加svn.service文件

home/sdbdatasvn/svnrepos(换成绝对路径)

如果出现权限问题,请chmod  777  home/sdbdatasvn/svnrepos

#find /usr -name svnserve

#/home/sdbdatasvn/svnrepos  Physical Absolute Path

[Unit] 

Description=svn protocol

After=syslog.target network.target 

 

[Service] 

Type=forking 

EnvironmentFile=/etc/sysconfig/svnserve 

ExecStart=/usr/bin/svnserve  --daemon --pid-file=/run/svnserve/svnserve.pid  -d -r /home/sdbdatasvn/svnrepos 

 

[Install] 

WantedBy=multi-user.target

文件创建后执行如下命令

  1. systemctl  start  svn  (启动)
  2. systemctl  status  svn (查看状态)
  3. systemctl  stop  svn (停止)
  4. systemcl  enable svn(加入自动启动列表)
  5. 服务启动后 如果出现下面错误

Can't create session svn: Unable to connect to a repository at URL 'svn://192.168.30.119/xxx'

Permission denied svn: Can't open file '/home/sdbdatasvn/svnrepos/xxx/format': Permission denied

原因:未关闭selinux

  1. getenforce  Enforcing(标识运行中)
  2. setenforce  0(0关闭=Permissive  1运行)
  3. 永久关闭selinux
  4. vim /etc/selinux/config   SELINUX=disabled
  5. reboot查看svn是否正常

相关文章:

  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-12-09
猜你喜欢
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案