LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1727|回复: 3

在archlinux上安装apache+subversion

[复制链接]
发表于 2005-6-19 15:16:47 | 显示全部楼层 |阅读模式
这里简单的把昨天的配置过成列一下,希望对朋友们有所帮助!当然也希望多提意见和建议,以便共同提高!

1.安装
# pacman -Sy httpd subversion

2.配置
配置比较麻烦一点有几个需要注意的地方
(1)首先配置httpd.conf
vi /etc/httpd/conf/httpd.conf
加入下面2行:
LoadModule dav_svn_module     lib/apache/mod_dav_svn.so
LoadModule authz_svn_module   lib/apache/mod_authz_svn.so
(2)生成一个svn的仓库
svnadmin create /home/httpd/svn
然后,你就会在/home/httpd/svn下看到如下的目录和文件:
ls /home/httpd/svn
README.txt  conf  dav  db  format  hooks  locks
注意:这里兰色的表示目录,黑色的表示普通文件。
(3)继续修改httpd.conf文件:
vi /etc/httpd/conf/httpd.conf
增加如下内容:
<Location /svn>
  DAV svn
  SVNPath /home/httpd/svn

  AuthType Basic
  AuthName "bixuan.com SVN server"
  AuthUserFile /etc/httpd/conf/webteampasswords
  AuthGroupFile /etc/httpd/conf/groups
  Require group web manager # 这里表示组别表示属于这些组的人可以访问,当然你可以改成:Require valid-user这样子来让所有的用户来访问
  #<Limit POST PUT DELETE>
  #  Require group web
  #</Limit>
</Location>
注意这里:
/etc/httpd/conf/webteampasswords这个文件是通过:
htpasswd /etc/httpd/conf/webteampasswords username
来建立的。
这里建立一个:叫bixuan的用户
注意:第一次如果这个/etc/httpd/conf/webteampasswords文件不存在,比如加上-c参数
htpasswd -c /etc/httpd/conf/webteampasswords bixuan

/etc/httpd/conf/groups的格式如下:
manager: bixuan
other: test

cd /home/httpd/svn/conf/
cat > access
[groups]
manager = bixuan
all = test,bixuan,xujh


[svn:/]
@all = r
@manager = rw

[svn:/bixuan.com]
@all =
@manager = rw
@web = rw
xujh = rw

access这个文件是要自己建立的。

最后注意:/home/httpd/svn这个svn的仓库目录权限一定要使httpd.conf里的User和Group有可读和可写的权限,我这里是:
User bixuan
Group users

所以:chown -R bixuan.users /home/httpd/svn

3.启动
# /etc/rc.d/httpd start

4.测试
在命令行来使用,我这里就不多介绍了,请参看相关文档!
在windows下使用:TortoiseSVN
下载安装:http://tortoisesvn.tigris.org/download.html
使用:右健单击,然后选择相应的命令就可以了。
常见的操作:http://freebsd.sinica.edu.tw/~plasma/svnbook/book.html

原文地址:http://spaces.msn.com/members/bixuan/Blog/cns!1ppP_O7hwmq-eqCGykDJf1XA!166.entry
发表于 2005-6-19 19:59:47 | 显示全部楼层
我觉得好多 碧轩的帖子都可以进Wiki, 等Arch新的Wiki架好了,不妨试试。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-20 09:02:33 | 显示全部楼层
谢谢ganloo
回复 支持 反对

使用道具 举报

发表于 2005-6-23 19:13:03 | 显示全部楼层
sigh,比debian确实麻烦,哈哈...手动的乐趣...........
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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