你好,游客 登录 注册 搜索
背景:
阅读新闻

Apache 下SVN项目管理使用说明

[日期:2015-01-11] 来源:Linux社区  作者:Linux [字体:大 中 小]

Apache 下SVN项目管理使用说明

(1)Apaceh和SVN先要装好。

(2)在apache的目录下找到httpd.conf文件,在最后一行增加如下配置
Include conf/svn.properties

(3)在apache的目录conf下增加一个svn.properties文件
增加内容如下(1):

  DAV svn
  SVNParentPath "D:/svn"
  AuthType Basic
  AuthName "Subversion repositories"
  AuthUserFile "D:/svn/apache-conf/passwd.txt"
  AuthzSVNAccessFile "D:/svn/apache-conf/authz.txt"
  Require valid-user


(4)创建文件夹
D:/svn    根目录
D:/svn/apache-conf/passwd.txt 存放用户和密码
D:/svn/apache-conf/authz.txt 存放权限

(5)创建用户和密码到指定文件中
建入apache的目录下
D:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin>htpasswd D:/svn/
apache-conf/passwd.txt admin
New password: *****
Re-type new password: *****
Adding password for user admin

注:如果第一次创建要加 -c

(6)查看D:/svn/apache-conf/passwd.txt文件
test_a:$apr1$OjRiZrcQ$Ak35e8BFBID8yoGTPbJMw1
test_b:$apr1$VFlQ9DGr$k8Y9cOQOPZZH6gO4Moubm1
test_c:test_c
admin:$apr1$3kGI5K9V$eiprg8yv8Xsr2uqUERb8x.

注:也可以加明文密码

(7)创建svn仓库目录
D:\Program Files (x86)\Subversion\bin>svnadmin create D:\svn\lmsj


(8)增加权限内容D:/svn/apache-conf/authz.txt,内容如下
[groups]
admin=admin
other_1=test_a
other_2=test_b,test_c

[pro_1:/]
@admin=rw

[pro_1:/test]
@other_1=rw

[pro_1:/test2]
@other_2=rw


-----------------例 创建一个lmsj的目录----------------
(1)创建目录和文件
D:\app_svn\conf\authz.txt
D:\app_svn\conf\passwd.txt

(2)配置svn.properties文件,路径上面有

  DAV svn
  SVNParentPath "D:/app_svn"
  AuthType Basic
  AuthName "Subversion repositories"
  AuthUserFile "D:/app_svn/conf/passwd.txt"
  AuthzSVNAccessFile "D:/app_svn/conf/authz.txt"
  Require valid-user


(3)创建用户在D:/app_svn/conf/passwd.txt文件中
D:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin>htpasswd D:/app_
svn/conf/passwd.txt admin
New password: *****
Re-type new password: *****
Adding password for user admin

注,以上创建的用户是加密的密码,也可以手工直接增加用户,可以是明文密码
admin:$apr1$3kGI5K9V$eiprg8yv8Xsr2uqUERb8x.
test_a:test_a

(4)增加权限,修改D:/app_svn/conf/authz.txt文件,内容如下
[groups]
admin=admin
other=test_a

[/]
@admin=rw

[lmsj:/]
@admin=rw
@other=r

(5)增加仓库,在svn安装目录的bin下
D:\Program Files (x86)\Subversion\bin>svnadmin create D:\app_svn\lmsj

(6)重启apache

(7)SVN客户端测试
http://localhost/app_svn/lmsj

--------------------------------------分割线 --------------------------------------

Linux中Subversion配置实例 http://www.linuxidc.com/Linux/2012-02/53109.htm

CentOS 6.2 SVN搭建 (YUM安装) http://www.linuxidc.com/Linux/2013-10/91903.htm

CentOS 6.5部署Apache+SVN  http://www.linuxidc.com/Linux/2013-12/94315.htm

Apache+SVN搭建SVN服务器 http://www.linuxidc.com/Linux/2013-03/81379.htm

Windows下SVN服务器搭建和使用 + 客户端重新设置密码 http://www.linuxidc.com/Linux/2013-05/85189p5.htm

Ubuntu Server 12.04 安装 SVN 并迁移 Virtual SVN数据 http://www.linuxidc.com/Linux/2013-05/84695.htm

Ubuntu Server搭建svn服务以及迁移方法 http://www.linuxidc.com/Linux/2013-05/84693.htm

借助网盘搭建SVN服务器 http://www.linuxidc.com/Linux/2013-10/91271.htm

--------------------------------------分割线 --------------------------------------

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-01/111612.htm

linux
相关资讯       SVN使用 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款