svn服务器现存的库文件导入,svn导入版本库及相关知识

SVN作为新一代代码版本管理工具,有很多优点,管理方便,逻辑明确,安全性高,代码一致性高。SVN数据存储有两种方式,BDB(事务安全表类型)和FSFS(一种不需要数据库的存储系统),为了避免在服务器连接中断时锁住数据,FSFS是一种更安全也更多人使用的方式。SVN的运行方式也有两种,一种是独立服务器,另一种是借助apache服务,各有利弊,下面就介绍一下这两种方式各自的部署步骤。

1、作为独立服务器运行:

①安装svn,使用本地yum源安装,操作系统镜像里自带的就有,yum install

svn,具体步骤请参考http://ailurus.blog.51cto.com/4814469/1168336;

②创建版本库:

mkdir /svn/project        //创建版本库所在文件夹

svnadmin create --fs-type fsfs /svn/project/first

//创建版本库,如果需要使用bdb方式存储,则将fsfs改成bdb即可

③初始化版本库,即导入文件到版本库中:

svn import /home/software file:///svn/project/first --message "初始化版本"

//将home文件夹的文件导入版本库

svn list --verbose file:///svn/project/first  //查看导入的文件

④启动svn服务,svn服务默认端口为3690,可以使用“netstat -ntlp”命令查看服务启动是否成功:

svnserve -d -r /svn/project

⑤修改策略控制文件,vi authz,如果以后要添加用户,就将用户名加在相应的用户组(admin或者user)后面即可:

### This file is an example authorization file for svnserve.

### Its format is identical to that of mod_authz_svn authorization

### files.

### As shown below each section defines authorizations for the path and

### (optional) repository specified by the section name.

### The authorizations follow. An authorization line can refer to:

###  - a single user,

###  - a group of users defined in a special [groups] section,

###  - an alias defined in a special [aliases] section,

###  - all authenticated users, using the '$authenticated' token,

###  - only anonymous users, using the '$anonymous' token,

###  - anyone, using the '*' wildcard.

###

### A match can be inverted by prefixing the rule with '~'. Rules can

### grant read ('r') access, read-write ('rw') access, or no access

### ('').

[aliases]

# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值