Chinaunix首页 | 论坛 | 博客
  • 博客访问: 208524
  • 博文数量: 5
  • 博客积分: 4075
  • 博客等级: 上校
  • 技术积分: 775
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-17 15:16
文章分类

全部博文(5)

文章存档

2008年(5)

我的朋友

分类: LINUX

2008-03-25 14:52:39

安装环境
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

访问 ,输入刚才创建的用户名和密码进行身份验证,且通过验证后应该可以看到信息。Rivision 1:/

今天刚发现的一个很好的IBM的链接,解决了我的权限的大问题,共享:
http://www-128.ibm.com/developerworks/cn/java/j-lo-apache-subversion/index.html
阅读(4602) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:Ubuntu常见问题(持续更新)

给主人留下些什么吧!~~