########下载源代码包##########
wget http://subversion.tigris.org/downloads/subversion-1.6.15.tar.gz;
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.15.tar.gz;
wget http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.2.21.tar.gz;
wget http://archive.apache.org/dist/apr/apr-1.4.2.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.3.10.tar.gz
yum -y install gcc* openssl-devel expat-devel openssl openssl-devel libxml2-devel glibc-common gd-devel;
安装apr,安装apr-util,安装 apache
其中apache的安装需要启用--enable-dav,--enable-maintainer-mode,才能支持subversion的访问。
参看其它博文,安装以上软件
下面详细介绍subversion的安装
tar zxvf subversion-1.6.15.tar.gz;
tar zxvf subversion-deps-1.6.15.tar.gz;
cd subversion-1.6.15;
./configure --prefix=/siteServer/svnserver --with-apxs=/siteServer/apache2/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --without-berkeley-db;
make;
make install;
cd ..;
下面就是配置你的svn,这个需要你手动操作
1.建立svn版本库目录
mkdir -pv /siteServer/svnserver/svndata
chown -Rv www /siteServer/svnserver/svndata
chmod -Rv 755 /siteServer/svnserver/svndata
2.建立svn版本库
/siteServer/svnserver/bin/svnadmin create --fs-type fsfs /siteServer/svnserver/svndata/jken
3.建立访问控制文件
#第一次加用户名
/siteServer/apache2/bin/htpasswd -c /siteServer/svnserver/svndata/passwd xiaoyue
/siteServer/apache2/bin/htpasswd /siteServer/svnserver/svndata/passwd xiaoli
4.建立本地项目控制文件
cd /siteServer/svnserver/svndata/jken/conf
vi authz
[groups]
admin=xiaoyue,xiaoli
[jken:/]
@admin = rw
cat /siteServer/apache2/conf/httpd.conf | grep svn
显示
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
就表明安装成功。
vi /siteServer/apache2/conf/httpd.conf
添加
<Location /svn>
DAV svn
SVNParentPath /siteServer/svnserver/svndata
AuthType Basic
AuthName "Subversion"
AuthUserFile /siteServer/svnserver/svndata/passwd
AuthzSVNAccessFile /siteServer/svnserver/svndata/jken/conf/authz
Require valid-user
</Location>
5.启动apache
/siteServer/apache2/bin/apachectl start
http://192.168.1.236/svn/jken
完成。。。。