Apache +SVN 如何配置才能用http:svn服务器IP地址svn的方式访问资源库

Apache +SVN 如何配置才能用http:svn服务器IP地址svn的方式访问资源库,第1张

1:安装svn
apt-get install subversion

2 开启svn服务器
svnserve -d
检查是否开启:ps aux | grep svnserve
若出现如下内容:
wkr 6537 00 00 13784 956 Ss 16:18 0:00 svnserve -d
wkr 7593 00 00 5784 864 pts/0 S+ 21:57 0:00 grep –color=auto svnserve
表示服务已开启。(注意:一定要有第1行,只有第2行说明服务未启动)
停止svn服务: killall svnserve

3 建立仓库
svnadmin create /home/svnrepos
理论上,仓库可以建立在任何目录中。
注意:重启svnserve 执行 svnserve -d -r /home
这样在eclipse客户端把工程导入svn的时候 url需要填写
svn://ip/svnrepos/project_name
如果启动的时候带如下参数:svnserve -d -r /home/svnrepos
客户端:svn://ip/project_name 这样子会报错。验证失败
4 修改配置文件
编辑 svnserveconf
vi /home/svnrepos/conf/svnserveconf
把anon-access = read 改为 none,auth_access = write
password-db = passwd authz-db = authz 的注释去掉,还有[general]的注释也要去掉(这个默认没有注释)。
注:当你去掉注释的时候,不要简单的把前面的#去掉,要把前面的空格一块去掉,不然在Eclipse中使用的时候会出现配置文件格式错误的问题。
注意:如果authz-db = authz 这个注释掉了,则不需要配置/home/svnrepos/conf/authz

5 修改帐户文件
vi /home/svnrepos/conf/passwd
### This file is an example password file for svnserve
### Its format is similar to that of svnserveconf 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
user1 = pass1 # 输入你定义的用户名和密码,密码显然没有加密
6 修改授权文件
gedit /home/svnrepos/conf/authz
修改或者输入下面2行:
[svnrepos:/] ##格式为 版本库名称 + :/
user1 = rw
其中,repos1是仓库名称,user1是用户名,rw代表读写。
7客户端连接
svn co svn://ip/oplinux
用户名密码:rsync
8实现SVN与WEB同步,可以CO一个出来,也可以直接配在仓库中

1)设置WEB服务器根目录为/alidata/>

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/13156039.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-06-13
下一篇 2023-06-13

发表评论

登录后才能评论

评论列表(0条)

保存