当前位置: 首页 > news >正文

Linux部署SVN

yum install subversionmkdir /data/svn/pokemonsvnadmin create /data/svn/pokemon

ls /data/svn/pokemonconf目录:版本库的配置文件,包含用户访问账号、权限等
db目录:存放数据
format文件:是一个文本文件,里面只放了一个整数,表示当前文件库配置的版本号(可以用vi打开看一下)
hooks目录:放置hook脚本文件的目录
locks目录:用来放置subversion的db锁文件和db_logs锁文件的目录,用来追踪存取文件库的客户端
README.txt文件:说明文档
注:这里生成文件可能有一定的滞后,如果未看到文件可以稍微等一会再查看修改版本库配置文件
版本库的配置文件位于  /data/svn/pokemon/conf/ 路径下,包含有以下几个文件:authz:负责账号权限的管理,控制账号是否读写权限
passwd:负责账号和密码的用户名单管理
svnserve.conf:svn服务器配置文件

vim /data/svn/pokemon/conf/authz在文件底部添加
[/]
admin = rwadmin是帐号 rw 分别是读写权限[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe# [/foo/bar]
# harry = rw
# &joe = r
# * =# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r[/]
admin = rw

vim /data/svn/pokemon/conf/passwd在users列下添加帐号和密码
admin = xxxxadmin是帐号  xxxx是密码[users]
# harry = harryssecret
# sally = sallyssecretadmin = xxxx

vi svnserve.conf把以下行前面的# 注释删除,让它启用
anon-access = read
auth-access = writepassword-db = passwdauthz-db = authz把realm从 realm = My First Repository 改成
realm = pokemon 以下是修改完毕的
### 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.apache.org/ for more information.[general]
### The anon-access and auth-access options control access to the
### repository for unauthenticated (a.k.a. anonymous) users and
### authenticated users, respectively.
### Valid values are "write", "read", and "none".
### Setting the value to "none" prohibits both reading and writing;
### "read" allows read-only access, and "write" allows complete
### read/write access to the repository.
### The sample settings below are the defaults and specify that anonymous
### users have read-only access to the repository, while authenticated
### users have read and write access to the repository.
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.
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
### directory containing this file.  The specified path may be a
### repository relative URL (^/) or an absolute file:// URL to a text
### file in a Subversion repository.  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
### The groups-db option controls the location of the file with the
### group definitions and allows maintaining groups separately from the
### authorization rules.  The groups-db file is of the same format as the
### authz-db file and should contain a single [groups] section with the
### group definitions.  If the option is enabled, the authz-db file cannot
### contain a [groups] section.  Unless you specify a path starting with
### a /, the file's location is relative to the directory containing this
### file.  The specified path may be a repository relative URL (^/) or an
### absolute file:// URL to a text file in a Subversion repository.
### This option is not being used by default.
# groups-db = groups
### 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.
realm = pokemon
### The force-username-case option causes svnserve to case-normalize
### usernames before comparing them against the authorization rules in the
### authz-db file configured above.  Valid values are "upper" (to upper-
### case the usernames), "lower" (to lowercase the usernames), and
### "none" (to compare usernames as-is without case conversion, which
### is the default behavior).
# force-username-case = none
### The hooks-env options specifies a path to the hook script environment
### configuration file. This option overrides the per-repository default
### and can be used to configure the hook script environment for multiple
### repositories in a single file, if an absolute path is specified.
### Unless you specify an absolute path, the file's location is relative
### to the directory containing this file.
# hooks-env = hooks-env[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### Enabling this option requires svnserve to have been built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### 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.
# min-encryption = 0
# max-encryption = 256

启动svn 服务器
需要注意,启动时路径不能包括pokemon
svnserve -d -r /data/svn/通过以下链接访问svn
svn://xxx.xxx.xxx.xxx:3690/pokemon停止svn
killall svnserve

修正查看日志报错

Item is not readable

修改SVN配置文件svnserve.conf中anon-access配置项为anon-access=none,注释原配置项

anon-access = read
auth-access = write改成
anon-access = none
auth-access = write

相关文章:

  • Spring Boot 获取maven打包时间
  • 【GPT-SOVITS-05】SOVITS 模块-残差量化解析
  • 电影aac是什么意思?如何播放、转换、编辑aac?
  • 广州高新技术企业认定申报条件、申报材料的具体指南!
  • webGIS开发第六章
  • Python二级备考(1)考纲+基础操作
  • 力扣爆刷第102天之hot100五连刷96-100
  • 【leetcode】67.二进制求和
  • 2733: 【搜索】【广度优先】 马遍历棋盘
  • 一分钟了解JAVA语言
  • RuoYi-Vue开源项目2-前端登录验证码生成过程分析
  • C++提高笔记(五)---STL容器(set/multiset、map/multimap)
  • flutter 局部view更新,dialog更新进度,dialog更新
  • 【热门话题】深入浅出:npm常用命令详解与实践
  • Redis监控工具
  • 《Java8实战》-第四章读书笔记(引入流Stream)
  • 【347天】每日项目总结系列085(2018.01.18)
  • 【407天】跃迁之路——程序员高效学习方法论探索系列(实验阶段164-2018.03.19)...
  • 345-反转字符串中的元音字母
  • C学习-枚举(九)
  • Dubbo 整合 Pinpoint 做分布式服务请求跟踪
  • echarts花样作死的坑
  • express + mock 让前后台并行开发
  • JavaScript异步流程控制的前世今生
  • java第三方包学习之lombok
  • Python学习笔记 字符串拼接
  • React+TypeScript入门
  • select2 取值 遍历 设置默认值
  • - 概述 - 《设计模式(极简c++版)》
  • 前端面试总结(at, md)
  • 算法系列——算法入门之递归分而治之思想的实现
  • 如何用纯 CSS 创作一个货车 loader
  • ​​​​​​​​​​​​​​汽车网络信息安全分析方法论
  • (27)4.8 习题课
  • (env: Windows,mp,1.06.2308310; lib: 3.2.4) uniapp微信小程序
  • (八)c52学习之旅-中断实验
  • (附源码)ssm高校社团管理系统 毕业设计 234162
  • (附源码)ssm考试题库管理系统 毕业设计 069043
  • (学习日记)2024.04.10:UCOSIII第三十八节:事件实验
  • (转)甲方乙方——赵民谈找工作
  • .bat批处理(十):从路径字符串中截取盘符、文件名、后缀名等信息
  • .Net 6.0 处理跨域的方式
  • .NET Core 版本不支持的问题
  • .NET Core 通过 Ef Core 操作 Mysql
  • .Net Core与存储过程(一)
  • .net MySql
  • .NET 应用架构指导 V2 学习笔记(一) 软件架构的关键原则
  • .NET国产化改造探索(一)、VMware安装银河麒麟
  • .NET命名规范和开发约定
  • .NET轻量级ORM组件Dapper葵花宝典
  • @DateTimeFormat 和 @JsonFormat 注解详解
  • @Transaction注解失效的几种场景(附有示例代码)
  • [ai笔记9] openAI Sora技术文档引用文献汇总
  • [BZOJ] 2006: [NOI2010]超级钢琴
  • [BZOJ3211]:花神游历各国(小清新线段树)