svn server
基于 ubuntu22.04 的 svn server 安装
refer:https://developer.aliyun.com/article/1431862#:~:text=%E5%A6%82%E4%BD%95%E5%9C%A8Ubuntu%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AESVN%E6%9C%8D%E5%8A%A1%E7%AB%AF%E5%B9%B6%E5%AE%9E%E7%8E%B0%E6%97%A0%E5%85%AC%E7%BD%91ip%E8%AE%BF%E9%97%AE%E5%86%85%E7%BD%91%E8%B5%84%E6%96%99%E5%BA%93%201%201.%20Ubuntu%E5%AE%89%E8%A3%85SVN%E6%9C%8D%E5%8A%A1%20%E5%91%BD%E4%BB%A4%E8%A1%8C%E8%BE%93%E5%85%A5%E5%AE%89%E8%A3%85%E5%91%BD%E4%BB%A4%3A%20sudo%20apt%20install,%E7%94%B1%E4%BA%8E%E4%BB%A5%E4%B8%8A%E4%BD%BF%E7%94%A8cpolar%E6%89%80%E5%88%9B%E5%BB%BA%E7%9A%84%E9%9A%A7%E9%81%93%E4%BD%BF%E7%94%A8%E7%9A%84%E6%98%AF%E9%9A%8F%E6%9C%BA%E5%85%AC%E7%BD%91%E5%9C%B0%E5%9D%80%EF%BC%8C%E8%AF%A5%E5%9C%B0%E5%9D%80%E4%B8%BA%E9%9A%8F%E6%9C%BA%E4%B8%B4%E6%97%B6%E5%9C%B0%E5%9D%80%EF%BC%8C24%E5%B0%8F%E6%97%B6%E5%86%85%E4%BC%9A%E5%8F%91%E7%94%9F%E5%8F%98%E5%8C%96%EF%BC%8C%E4%B8%8D%E5%88%A9%E4%BA%8E%E9%95%BF%E6%9C%9F%E8%BF%9C%E7%A8%8B%E8%AE%BF%E9%97%AE%E3%80%82%20…%207%207.%20%E4%BD%BF%E7%94%A8%E5%9B%BA%E5%AE%9ATCP%E7%AB%AF%E5%8F%A3%E5%9C%B0%E5%9D%80%E8%BF%9C%E7%A8%8BSVN%E6%9C%8D%E5%8A%A1%20%E5%8F%B3%E9%94%AE%E6%89%93%E5%BC%80%20relocate%20
安装 svn server
sudo apt-get install subversion
配置 svn server
bash
创建 svn 工作目录
sudo mkdir /var/svn
下面两个命令不是必须的,未验证是否有用
sudo chown -R svn:svn /var/svn
sudo chmod 777 /var/svn
创建 svn 仓库
sudo mkdir /var/svn/repos
启动 svn server
sudo svnadmin create /var/svn/repos --listen-port=3690
配置 svn server, 进入 ./repos/conf/
配置 svnserve.conf
sudo vim /etc/svnserve.conf
编辑 svnserve.conf,取消以下代码的注释
[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
保存退出
修改 passwd 文件,添加 svn 用户
sudo vim /etc/subversion/passwd
编辑 passwd 文件,添加 svn 用户
[users]
svn_user = your_password
保存退出
修改 authz 文件,配置权限
sudo vim /etc/subversion/authz
编辑 authz 文件,添加权限
admin=svn_user
[/]
@admin = rw
保存退出
启动 svn server
sudo svnserve -d -r /etc/svn/
开放端口
sudo ufw allow 3690 # 默认端口,可根据需要修改
验证 svn server
svn co svn://loca