doc/笔记/Docker搭建SVN-Server及WebSVN-d...

73 lines
2.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Docker搭建SVN-Server及WebSVN
date: 2023-07-25 17:33:02.904
updated: 2023-07-25 17:34:36.389
url: /archives/docker-da-jian-svn-server-ji-websvn
categories:
- Docker
- Tools
tags:
- Docker
- Tools
---
# Docker搭建SVN-Server及WebSVN
## 搭建
拉取镜像
```shell
docker pull elleflorio/svn-server
```
运行镜像
```shell
docker run -d --name svn --restart=always -v /usr/local/svnData:/home/svn -p 13690:80 -p 3690:3690 elleflorio/svn-server
```
创建管理员用户
```shell
docker exec -t svn htpasswd -b /etc/subversion/passwd <username> <password>
```
对持久Volume添加write权限
```shell
chmod -R 777 /usr/local/svnData
```
## 进入SVN仓库URL
浏览器地址栏输入http://ip:13690/svn此时会让你输入用户名和密码,用户密码即上面命令行创建的用户和密码,进入后就可以看到仓库列表
浏览器地址栏输入http://ip:13690/svnadmin第一次进入会进行后台的配置管理
| 配置名称 | Value |
| ---------------------------------------------------- | ----------------------------------------- |
| Subversion authorization file | /etc/subversion/subversion-access-control |
| User authentication file (SVNUserFile) | /etc/subversion/passwd |
| User view provider type | passwd |
| User edit provider type | passwd |
| Group view provider type | svnauthfile |
| Group edit provider type | svnauthfile |
| Repository view provider type | svnclient |
| Repository edit provider type | svnclient |
| Parent directory of the repositories (SVNParentPath) | /home/svn |
| Subversion client executable | /usr/bin/svn |
| Subversion admin executable | /usr/bin/svnadmin |
以上配置填写好后进行test测试Test passed后再进行保存配置信息特别注意Parent directory of the repositories (SVNParentPath)一定要Test passed
## 创建仓库及仓库授权
进入http://ip:13690/svnadmin/repositorycreate.php页面进行创建仓库输入仓库名称、选择仓库类型(默认是文档系统)及预设仓库结构点击create
进入http://ip:13690/svnadmin/accesspathslist.php页面选择已创建的仓库进行用户或组及操作权限(只读及读写)授权
授权完成后就可以进行仓库内容VCS了
For https://www.cnblogs.com/zepc007/p/14521394.html