设为首页 收藏本站
查看: 916|回复: 0

[经验分享] Apache HTTP Server + SVN 版本控制方案(一)

[复制链接]

尚未签到

发表于 2017-1-11 10:47:56 | 显示全部楼层 |阅读模式
  SVN的用处就不多说。直奔主题——如何配置SVN服务器?
  首先第一篇讲述简单的SVNServer协议的配置,第二篇才会涉及到Apache HTTP Server 与 SVN 服务器的配置。其实网上这方面的例子很多了,不过这个例子绝对简单易用,一学就会
  第一步:所需的软件,我会在附件中打包提供给各位下载
  svn-1.4.6-setup.exe SVN 服务器
  TortoiseSVN-1.4.6.11647-win32-svn-1.4.6.msi  SVN 客户端
  LanguagePack-1.4.6.11647-win32-zh_CN.exe   SVN 客户端汉化包
  上述这些也软件也可以到这个网站下载:http://bbs.iusesvn.com/thread-2230-1-1.html
  第二步:安装, 步骤省略,太简单了
  1、安装SVN服务器。
  2、安装SVN客服端, 安装好之后(可能需要重启机器)鼠标右键会出现TortoiseSVN的菜单。(太大没法上传)
  3、安装SVN 客户端汉化包,英文好的可以不装,建议不要安装。
  第三步:使用SVN客户端工具创建一个版本库(其实使用命令行模式也可以,但使用图形化的工具更直观)
  1、在硬盘上创建如下文件目录,名为:e:\svnroot\repos01
  2、鼠标选中repos01目录,右键选择TortoiseSVN——>Create repository here即可。在repos01目中就与版本库相关的目录出现了。
  第四步:修改e:\svnroot\repos01\conf下的文件:
  1、修改svnserve.conf文件, 修改后的内容如下

### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = none
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the conf directory.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the conf
### directory.  If you don't specify an authz-db, no path-based access
### control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
# realm = My First Repository

  2、修改authz, 修改后的内容如下

### 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, to a group of users defined in a special [groups]
### section, or to anyone using the '*' wildcard.  Each definition can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[groups]
# harry_and_sally = harry,sally
# [/foo/bar]
# harry = rw
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/]
brofe=rw

  3、修改passwd文件,修改后的内容如下

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
# harry = harryssecret
# sally = sallyssecret
brofe=brofe
  第四步:将SVNServer做成WinXP系统服务,并随操作系统一起启动
      1、新建一个startsvn.bat文件,然后进行如下内容的编辑操作(注意不要复制, 最好自己手动的抄写一遍,以免其中的空格引起错误)
  sc create svnserve binpath= "D:\Program Files\Subversion\bin\svnserve.exe --service --root e:\svnroot"
                  displayname= "Subversion" depend= tcpip start= auto
  // 参数的相关解释
  (1)  D:\Program Files\Subversion\bin\svnserve.exe   指的是:SVN服务安装目录
  (2)  e:\svnroot  e:\svnroot\repos01该目录的一部分。
  (3)  displayname= "Subversion"   当执行该bat文件后, 如果在操作系统的服务中看到了名为: Subversion的服务就表示安装正常
  2、执行bat文件(可能需要重新启动),查看系统服务中是否存在名为:Subversion的服务,若存在表示SVN服务器配置成功。
  第五步:测试服务器是否正常工作
       1、在系统的任何地方鼠标右键,选择:TortoiseSVN——>Repo-browser, 然后输入如下地址:svn://localhost/repos01
  2、当没有出现Error.....  信息之后,就表示安装成功。你可以使用TortoiseSVN客户端和Eclipse SVN 客户端插件进行相应的操作。
  备注:
  1、如果严格按上述步骤做一定会成功。如果硬是有怪问题,可能是软件版本有问题。
  2、该帖中没涉及版本库配置的高级特性,特别是安全性方面没有详细介绍,想学的朋友可以在网上搜索,资料一大堆,好用的,直观的不多。不过有时间我会整理放上来的。

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-326970-1-1.html 上篇帖子: Apache:系统找不到指定的文件: No installed service named"Apache2" 下篇帖子: http://cwiki.apache.org/confluence/display/WW/OVal
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表