RHEL5安装SVN整合Apache
1.RHEL5,默认已经安装了APACHE,与Subversion
2.在RHEL5光盘中找到mod_dav_svn-1.4.2-2.el5.i386.rpm,安装之,rpm -ivh mod_dav_svn-1.4.2-2.el5.i386.rpm。
3.这样,软件就都具备了。
4.开始整合SVN和APPACHE,mod_dav_svn模块安装完成之后,对/etc/httpd/conf.d/subversion.conf文件进行修改,该文件就是subversion与APACHE整合的主要配置文件。
列如:
####################################################################
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
#
# Example configuration to enable HTTP access for a directory
# containing Subversion repositories, "/var/www/svn". Each repository
# must be readable and writable by the 'apache' user. Note that if
# SELinux is enabled, the repositories must be labelled with a context
# which httpd can write to; this will happen by default for
# directories created in /var/www. Use "restorecon -R /var/www/svn"
# to label the repositories if upgrading from a previous release.
#
#
# To create a new repository "http://localhost/repos/stuff" using
# this configuration, run as root:
#
# # cd /var/www/svn
# # svnadmin create stuff
# # chown -R apache.apache stuff
#
<Location /repos>
DAV svn
SVNParentPath /var/www/svn
# # Limit write permission to list of valid users.
# <LimitExcept GET PROPFIND OPTIONS REPORT>
# # Require SSL connection for password protection.
# # SSLRequireSSL
#
AuthType Basic
AuthName "Subversion repos"
#用户名文件
AuthUserFile /var/www/svn/passwdfile
#权限控制
AuthzSVNAccessFile /var/www/svn/aclfile
Require valid-user
# </LimitExcept>
</Location>
<Location /repos1>
DAV svn
SVNParentPath /var/www/svn1
# # Limit write permission to list of valid users.
# <LimitExcept GET PROPFIND OPTIONS REPORT>
# # Require SSL connection for password protection.
# # SSLRequireSSL
#
AuthType Basic
AuthName "Subversion repos"
#用户名文件
AuthUserFile /var/www/svn1/passwdfile
#权限控制
AuthzSVNAccessFile /var/www/svn1/aclfile
Require valid-user
# </LimitExcept>
</Location>
这里主要是<Location /repos1></Location>之间的内容,它主要是告诉APACHE,svn的库的路径在那里,身份验证文件,和访问权限验证文件在什么路径下。
注意可以有多过<Location /repos1></Location>节点,代表多个SVN库。
6./etc/httpd/conf/httpd.conf 是apache的服务器配置文件。里面的内容不用修改了。
7.添加用户以及设置权限
htpasswd -cm /svnrepos/passwdfile username//这是第一个用户创建是
以后都用 htpasswd -m /svnrepos/passwdfile username
在 /svnrepos/aclfile 文件中编辑目录权限和用户组
例如:
[groups]
groupname1=user1,user2
groupname2=user3
[CMMI:/]
@groupname1=rw
@groupname2=r
*=r
相关推荐
pub_svnserve.conf的 pub_authz.conf的配置文件有非法字符的原因引起,需要查找pub_authz.conf提的非法内容比如多余的空格删除或直接将pub_authz.conf