码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu 安装和配置SVN

时间:2015-04-29 21:48:00      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:svnadmin   配置   安装   svn   

Ubuntu 版本为1204server
安装SVN

apt-get install subversion

建立SVN仓库

mkdir -p /home/.svn/test   #建立仓库目录
mkdir -p /home/.svn/test_2
svnadmin create /home/.svn/test #创建仓库,执行完毕后test目录有仓库相关文件
svnadmin create /home/.svn/test_2 

配置和管理SVN

1)仓库的配置文件 $depot/conf/svnserve.conf
anon-access = none #匿名用户的权限设置,可以为read,write,和none
auth-access = write  #认证用户的权限设置,可以为read,write,none
password-db = passwd   #密码数据库的路径
authz-db = authz       #认证规则库的路径

2)配置密码   $depot/conf/passwd  
[users]
allen = 111111    #allen(用户名) = 111111(密码)

3)配置认证规则  $depot/conf/authz
[groups]    
harry_and_sally = harry,sally  #组名 = 用户1,用户2

[/]         #启动时从/home/.svn/test启动,test问根目录。[/]设置test目录为根目录          
harry = rw  #用户对根目录权限为rw
sally = r    #用户对根目录权限为r

[test1:/]    #启动时从/home/.svn启动
@harry_and_sally = rw  #用户组的用户权限都为rw

SVN的启动、关闭、访问

启动:
    svnserve -d -r /home/.svn/test #从test目录启动,对应[/].访问方式为:svn://**IP**/ 
    svnserve -d -r /home/.svn/test1  #从.svn目录启动,对应[test1:/]。访问方式为:svn://**IP**/test1

关闭:
    killall svnserve

##  netstat -at  可以查看svn是否启动 
##  如果需要svn开机启动  ,把启动命令加入到 /etc/rc.local  (开机启动脚本)
##   

SVN client
在windows下安装 TortoiseSVN http://tortoisesvn.tigris.org/

SVN client的使用参考TortoiseSVN的基本使用

Ubuntu 安装和配置SVN

标签:svnadmin   配置   安装   svn   

原文地址:http://blog.csdn.net/u011641885/article/details/45371079

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!