CentOS6.5搭建apache+SVN环境
时间:2015-01-30 11:18 来源:linux.it.net.cn 作者:IT
1.实验环境
svn server(subversion):192.168.40.129
svn client(TortoiseSVN):下载地址(http://tortoisesvn.net/downloads.html)
[root@localhost ~]# rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.HjLnDh: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]更新epel源仓库:
[root@localhost ~]# yum repolist
[root@localhost ~]# yum -y install httpd httpd-devel mod_dav_svn subversion mod_ssl
httpd,mod_dav_svn,httpd-devel,mod_ssl支持WEB形式管理SVN
subversion (SVN服务器)
[root@localhost ~]# ls /etc/httpd/modules/ | grep svn
mod_authz_svn.so
mod_dav_svn.so
#查看svn版本:
[root@localhost ~]# svn --version
svn, version 1.6.11 (r934486)
compiled Mar 6 2014, 10:49:10
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
The following repository access (RA) modules are available:
* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
- handles 'http' scheme
- handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- with Cyrus SASL authentication
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
[root@localhost ~]# mkdir /data/svn -p
[root@localhost ~]# svnadmin create /data/svn/
[root@localhost ~]# cd /data/svn/
[root@localhost svn]# ls
conf db format hooks locks README.txt
#更改/data/svn属主属组:
[root@localhost svn]# chown -R apache.apache /data/svn/
[root@localhost conf.d]# vim /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn-test>
DAV svn
# SVNParentPath /var/www/svn
SVNPath /data/svn
SVNListParentPath on
# # Limit write permission to list of valid users.
# <LimitExcept GET PROPFIND OPTIONS REPORT>
# # Require SSL connection for password protection.
# # SSLRequireSSL
#
AuthType Basic
AuthName "svn for project"
AuthUserFile /data/svn/passwdfile
AuthzSVNAccessFile /data/svn/accessfile
Require valid-user
# </LimitExcept>
</Location>
[root@localhost conf.d]# htpasswd -c /data/svn/passwdfile kaibin
New password:
Re-type new password:
Adding password for user kaibin
[root@localhost conf.d]# htpasswd /data/svn/passwdfile zhangsan
New password:
Re-type new password:
Adding password for user zhangsan
[root@localhost ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd:
# vim /data/svn/accessfile
[/]
*=rw
[groups]
dev=kaibin
test=zhangsan
[svn-test:/]
@test=r
@dev=r
[repos:/test]
@test=rw
*=
[root@localhost svn]# svnserve -d -r /data/svn
(责任编辑:IT)
1.实验环境 svn server(subversion):192.168.40.129 svn client(TortoiseSVN):下载地址(http://tortoisesvn.net/downloads.html)
|
