免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1136 | 回复: 0
打印 上一主题 下一主题

Linux下安装SVN服务器 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-25 14:52 |只看该作者 |倒序浏览
安装环境
CentOS 4.3 Final
软件列表
httpd-2.0.61.tar.gz
db-4.3.29.tar.gz
subversion-1.3.2.tar.gz
软件位置
/data/software
安装步骤
#mkdir /data/software/pkg -p
安装Berkeley DB
#cd /data/software/pkg
#tar zxvf ../db-4.3.29.tar.gz
#cd db-4.3.29/docs
#../dist/configure
#make && make install
#echo /usr/local/BerkeleyDB.4.3/lib >> /etc/ld.so.conf
#ldconfig
安装Apache
#cd /data/software/pkg
#tar zxvf ../httpd-2.0.61.tar.gz
#./configure --prefix=/usr/apache --enable-dav  \ --with-berkeley-db=/usr/local/BerkeleyDB.4.3 --with-dbm=db43
#make && make install
安装Subversion
#cd /data/software/pkg
#tar zxvf ../db-4.3.29.tar.gz
#cd db-4.3.29
#./configure --with-apxs=/usr/apache/bin/apxs --prefix=/usr/local/subversion  \ --with-apr=/usr/apache --with-apr-util=/usr/apache --with-ssl --with-zlib  \ --enable-maintainer-mode --with-berkeley-db=/usr/local/BerkeleyDB.4.3
#make && make install
建立仓库
#groupadd svn
#useradd svnroot -g svn
#passwd svnroot
#su svnroot
#mkdir /data/svn/repository
#cd /usr/local/subversion/bin
#./svnadmin create /data/svn/repository/test
#cd /data/svn/svnroot/repository/test
#/usr/local/subversion/bin/svnadmin --version
#exit (返回root帐号)
#chmod 700 /data/website/svn/repository
配置SVN
#vi /usr/apache/conf/httpd.conf
   //找到下列语句,如果没有则自行添加
   LoadModule dav_svn_module modules/mod_dav_svn.so
   LoadModule authz_svn_module modules/mod_authz_svn.so
  //在后面添加
   
   DAV svn
   SVNParentPath /data/website/svn/repository
   AuthzSVNAccessFile /etc/svn-access-file
   AuthType Basic
   AuthName "SVN Test"
   AuthUserFile /etc/svn-auth-file
   Require valid-user
   
   //#/usr/apache/bin/apachectl restart
生成验证用户(第一次生成时加上参数c,以后增加用户则不用)
#/usr/apache/bin/htpasswd -(c)m /etc/svn-auth-file test
输入用户密码
分配权限
#vi /etc/svn-access-file
### 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
# * =
[/]
# @harry_and_sally = rw
# * = r
test = rw
steven = r
   //[groups]下面定义的是组名称及成员用户,[/]表示对整个test项目的操作,他下面的是用户或组在这个项目里的权限
修改Apache启动权限
#vi /usr/apache/conf/httpd.conf
   //将apache运行的用户和用户组改成跟仓库一样权限的用户及组
   User svnroot
   Group svn
#/usr/apache/bin/apachectl restart
访问http://IP/svn/test ,输入刚才创建的用户名和密码进行身份验证,且通过验证后应该可以看到信息。Rivision 1:/
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/13177/showart_507636.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP