阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Apache 下SVN项目管理使用说明

122次阅读
没有评论

共计 2639 个字符,预计需要花费 7 分钟才能阅读完成。

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

————————————– 分割线 ————————————–

正文完
星哥说事-微信公众号
post-qrcode
 
星锅
版权声明:本站原创文章,由 星锅 2022-01-20发表,共计2639字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中