Ubuntu 安装和配置SVN

来源:互联网 发布:矩阵 方阵 编辑:程序博客网 时间:2024/05/17 00:01

Ubuntu 版本为1204server
安装SVN

apt-get install subversion

建立SVN仓库

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

配置和管理SVN

1)仓库的配置文件 $depot/conf/svnserve.confanon-access = none #匿名用户的权限设置,可以为read,write,和noneauth-access = write  #认证用户的权限设置,可以为read,write,nonepassword-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  #用户对根目录权限为rwsally = 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  #从.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的基本使用

1 0