这两天在服务器搭建了一个SVN服务器,一些经验,也留作后用把,有不详细的欢迎批评指正
另外关于子目录的访问配置,这块我还是不懂,希望有前辈能教我一下
1.安装SVN Server
yum install subversion
2.验证安装
svnserve --version
3.创建版本库
mkdir /repo -- 新建repo文件夹
svnadmin create /repo/aaa -- 新建aaa版本
4.启动,杀掉服务
svnserve -d -r /repo/aaa
ps -aux | grep svn
kill 进程号
5.自动启动
vi /etc/rc.local
在最后一行加上
svnserve -d -r /repo/aaa
下面贴配置文件:
1.svnserve.conf:这个最详细,注意每个配置前面都不能有空格
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | ### This file controls the configuration of the svnserve daemon, if you ### use it to allow access to this repository. (If you only allow ### access through http: and/or file: URLs, then this file is ### irrelevant.) ### Visit http: //subversion.tigris.org/ for more information. [general] ### These options control access to the repository for unauthenticated ### and authenticated users. Valid values are "write" , "read" , ### and "none" . The sample settings below are the defaults. ### 对于授权用户与未被授权用户的访问级别控制:read,write,write anon-access = read auth-access = write ### The password-db option controls the location of the password ### database file. Unless you specify a path starting with a /, ### the file's location is relative to the directory containing ### this configuration file. ### If SASL is enabled (see below), this file will NOT be used. ### Uncomment the line below to use the default password file. ### 密码数据文件的保存位置,默认为相对路径,如果以/开头则为绝对路径 ### 如果SASL开启的话,那么就不会验证该文件 password-db = passwd ### The authz-db option controls the location of the authorization ### rules for path-based access control. Unless you specify a path ### starting with a /, the file's location is relative to the the ### directory containing this file. If you don't specify an ### authz-db, no path-based access control is done. ### Uncomment the line below to use the default authorization file. ### 用户数据文件的保存位置,默认为相对路径,如果以/开头则为绝对路径 ### 如果未指定路径,则无访问控制 authz-db = authz ### This option specifies the authentication realm of the repository. ### If two repositories have the same authentication realm, they should ### have the same password database, and vice versa. The default realm ### is repository's uuid. ### 指定验证的范围,如果两个repo的realm属性一样,那么它们就应该使用同一个password<a class = "keylink" href= "http://www.2cto.com/database/" target= "_blank" rel= "noopener nofollow" >数据库</a>,反之亦然 ### 默认的realm就是repo的唯一标示符 realm = 0.1 [sasl] ### This option specifies whether you want to use the Cyrus SASL ### library for authentication. Default is false . ### This section will be ignored if svnserve is not built with Cyrus ### SASL support; to check, run 'svnserve --version' and look for a line ### reading 'Cyrus SASL authentication is available.' ### 是否开启SASL验证,默认是 false 的 ### 此选项会默认svn服务器支持Cyrus,检查的方法是,运行 'svnserve --version' 命令,查看输出是否有 'Cyrus SASL authentication is available.' # use-sasl = false ### These options specify the desired strength of the security layer ### that you want SASL to provide. 0 means no encryption, 1 means ### integrity-checking only, values larger than 1 are correlated ### to the effective key length for encryption (e.g. 128 means 128 -bit ### encryption). The values below are the defaults. ### 下面两个选项用来指定<a class = "keylink" href= "http://www.2cto.com/Article/jiami/" target= "_blank" rel= "noopener nofollow" >加密</a>强度的 # min-encryption = 0 # max-encryption = 256 |
2.passwd:这个就是配置用户的,格式是-->username = passwd
1 2 3 | [users] tang = lin alin = tang |
3.authz
1 2 3 4 5 6 7 8 | ### 配置一个组,右边的是组内的成员的username [groups] g_manager = tang,alin ### svn根目录 ### 给组配置权限 [/] @g_manager = rw |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core GC压缩(compact_phase)底层原理浅谈
· 现代计算机视觉入门之:什么是图片特征编码
· .NET 9 new features-C#13新的锁类型和语义
· Linux系统下SQL Server数据库镜像配置全流程详解
· 现代计算机视觉入门之:什么是视频
· 【译】我们最喜欢的2024年的 Visual Studio 新功能
· 个人数据保全计划:从印象笔记迁移到joplin
· Vue3.5常用特性整理
· 重拾 SSH:从基础到安全加固
· 为什么UNIX使用init进程启动其他进程?