无来

不管你来还是不来
我都在这里,夜夜点亮
不是为了守候
只是为了做好我自己

0%

ubuntu 22.04 设置svn server 开机启动

  1. 创建svnserve系统服务配置文件/etc/systemd/system/svnserve.service

Create systemd service configuration for svnserve /etc/systemd/system/svnserve.service

1
2
3
4
5
6
7
8
9
10
11
12
[Unit]
Description=SVN server
After=network.target

[Service]
User=svn
Group=svn
Type=forking
ExecStart=/usr/bin/svnserve -d -r /home/svn

[Install]
WantedBy=multi-user.target

Note that I set Type=forking because svnserve daemonizes itself with -d.

请注意,我设置Type=forking是因为svnserve使用-d.

Side note: Your own service definitions should go to /etc/systemd/system/, /lib/systemd/system/ is reserved for unit definitions that come with system packages.

旁注:您自己的服务定义应该转到/etc/systemd/system/,/lib/systemd/system/保留给系统包附带的单元定义。

  1. 启动服务器sudo systemctl start svnserve.service

  2. 添加到开机启动 sudo systemctl enable svnserve.service