Apache + SSL + SVN 版本控制系统配置文档
星期二, 十二月 15th, 2009本文在CentOS 5.3平台通过测试;最后修改于2009-12-15
源码下载
-
zlib-1.2.3.tar.gz
openssl-0.9.8l.tar.gz
apr-1.3.9.tar.gz
apr-util-1.3.9.tar.gz
httpd-2.2.14.tar.gz
sqlite-3.6.21.tar.gz
sqlite-amalgamation-3.6.21.tar.gz
subversion-1.6.6.tar.gz
Subversion简介
Subversion(SVN)被称为是CVS的下一代版本管理器,在版本管理的特性上有着许多独特的优势。不仅可以管理程序源代码,而且也可用于文档或其他相关资料的管理。我们建议,在团队今后的项目当中尽量使用SVN进行软件版本管理。此文档将简要的叙述如何使用SVN客户端和配置SVN服务器。
SVN是一系列的库,它与一个命令行的客户端相互配合工作。有两类不同的SVN服务器进程,包括一个svnserve进程,这是一个类似CVS的pserver进程的独立运行程序,svnserve进程可以说是一个常用协议,配置相对简单;另一个是使用mod_dav_svn模块的Apache 2.0,而mod_dav_svn进程使用了WebDAV作为它的网络协议。本文选择用 Apache + SSL + SVN,可以通过标准的 http/https来提供服务。
SVN可以使用两种数据存储方式: Berkeley DB 和 FSFS。 Berkeley DB 的优势在于其成熟性,但需要更多的日常管理和维护,并且是平台依赖的。所以我选择更简便的 FSFS。
安装 zlib
tar zxvf zlib-1.2.3.tar.gz cd zlib-1.2.3 ./configure --prefix=/usr/local/zlib make make install
安装 openssl
tar zxvf openssl-0.9.8l.tar.gz cd openssl-0.9.8l ./config shared zlib make make test make install 创建连接 mv /usr/bin/openssl /usr/bin/openssl.OFF mv /usr/include/openssl /usr/include/openssl.OFF rm -rf /usr/lib/libssl.so ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl ln -s /usr/local/ssl/include/openssl /usr/include/openssl ln -sv /usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so 配置库文件搜索路径 echo "/usr/local/ssl/lib" >> /etc/ld.so.conf ldconfig -v 检测安装结果 openssl version
安装 apr
tar xzvf apr-1.3.9.tar.gz cd apr-1.3.9 ./configure --prefix=/usr/local/apr make make install cd ..
安装 apr-util
tar xzvf apr-util-1.3.9.tar.gz cd apr-util-1.3.9 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr make make install cd ..
安装 apache
tar zxvf httpd-2.2.14.tar.gz cd httpd-2.2.14 ./configure --prefix=/usr/local/apache --enable-so --enable-mods-shared=all --enable-track-vars \ --enable-rewrite --enable-cgi --with-zlib --enable-suexec --enable-cache --enable-disk-cache \ --enable-mem-cache --with-mpm=prefork --enable-ssl --with-ssl=/usr/local/ssl --with-expat=builtin \ --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-dav --enable-dav-fs \ --with-included-apr --enable-maintainer-mode make make install cd ..
安装 neon
tar zxvf neon-0.29.0.tar.gz cd neon-0.29.0 ./configure --prefix=/usr/local/neon make make install cd ..
安装 sqlite
CentOS5.3系统自带sqlite版本为sqlite-3.3.6;而subversion-1.6.6至少需要sqlite-3.4.0(官方推荐3.6.13;这里我们选择最新的3.6.21)版本以上。
有2种办法可以解决:
第一种方法:下载 sqlite-amalgamation-3.6.21.tar.gz;解压后命名为sqlite-amalgamation,移动subversion源码目录下即可。
第二种方法:下载 sqlite-3.6.21.tar.gz 编译安装,本文使用此方法。
tar zxvf sqlite-3.6.21.tar.gz cd sqlite-3.6.21 ./configure --prefix=/usr/local/sqlite make make install cd ..
安装 subversion
export LC_ALL=en_US tar zxvf subversion-1.6.6.tar.gz cd subversion-1.6.6 ./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr \ --with-apr-util=/usr/local/apr-util --with-ssl=/usr/local/ssl --with-zlib=/usr/local/zlib \ --with-neon=/usr/local/neon --with-sqlite=/usr/local/sqlite --enable-maintainer-mode make make install cd ..
如果make过程中报如下错误:
/usr/bin/ld: /usr/local/zlib/lib/libz.a(deflate.o): relocation R_X86_64_32S against `a local symbol' can not be
used when making a shared object; recompile with -fPIC
/usr/local/zlib/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [subversion/libsvn_subr/libsvn_subr-1.la] error 1
请参照: 解决安装软件时的/usr/local/lib/libz.a(compress.o)错误
配置 SVN
待续。。。