二、安装和配置步骤:
1、安装apr-1.5.2
# tar –zvxf apr-1.5.2.tar.gz
# cd apr-1.5.2
# ./configure --prefix=/usr/local/apr /* 安装不指定路径时 默认安装到/usr/local/apr
# make
# make install 2、安装 apr-util-1.5.4
# tar –zvxf apr-util-1.5.4.tar.gz
# cd apr-util-1.5.4
# ./configure --prefix=/usr/local/apu --with-apr=/usr/local/apr
# make
# make install 3、安装 httpd-2.4.12.tar.bz2
# tar –zvxf httpd-2.4.12.tar.bz2
# cd httpd-2.4.12
# ./configure
--prefix=/usr/local/apache
--with-apr=/usr/local/apr/bin/apr-1-config
--with-apr-util=/usr/local/apu/bin/apu-1-config
--enable-modules=so /* DSO模式安装apache (或 --enable-so)
--enable-dav
--enable-maintainer-mode
-- enable-rewrite
# make
# make install 4、安装serf-1.2.1.tar.bz2
解决svn http://...的时候提示svn: Unrecognized URL scheme的错误。1.8版本之前的需要加neon,1.8版本之后弃用neon而改使用serf;
#tar –zvxf serf-1.2.1.tar.bz2
#./configure
--prefix=/usr/local/serf
--with-apr=/usr/local/apr/bin/apr-1-config
--with-arp-util=/usr/local/apu/bin/apu-1-config
# make
# make install
5、安装和配置 subversion-1.8.13.tar.bz2
#tar –zvxf subversion-1.8.13.tar.bz2
#./configure
--prefix=/usr/local/subversion
--with-apxs=/usr/local/apache/bin/apxs
--with-apr=/usr/local/apr/bin/apr-1-config
--with-apr-util=/usr/local/apu/bin/apu-1-config
--with-ssl
--with-zlib
--enable-maintainer-mode
--with-serf=/usr/local/serf
#make
#make install 注:configure的时候会报错:
configure: checking sqlite library
checking sqlite amalgamation... no
checking sqlite amalgamation... no
checking sqlite3.h usability... no
checking sqlite3.h presence... no
checking for sqlite3.h... no
checking sqlite library version (via pkg-config)... no
An appropriate version of sqlite could not be found. We recommmend
3.7.15.1, but require at least 3.7.12.
Please either install a newer sqlite on this system
or
get the sqlite 3.7.15.1 amalgamation from:
http://www.sqlite.org/sqlite-amalgamation-3071501.zip
unpack the archive using unzip and rename the resulting
directory to:
/root/subversion-1.8.13/sqlite-amalgamation
configure: error: Subversion requires SQLite 安装上面提示,下载sqlite放到subversion目录里并重命名,重新configure通过
wget http://www.sqlite.org/sqlite-amalgamation-3071501.zip
unzip sqlite-amalgamation-3071501.zip
mv sqlite-amalgamation-3071501 subversion-1.8.13/sqlite-amalgamation 确定一下svn有没有安装成功
#/usr/local/svn/bin/svnserve --version 会看到相关版本信息!
安装完后在libexec下会看到两个库文件:
mod_authz_svn.so mod_dav_svn.so
6、配置apache支持svn
a、拷贝mod_authz_svn.so mod_dav_svn.so到apache的module目录下
在config文件里开启这两个库的支持:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so b、开始建立版本库
#/usr/local/subversion/bin/svnadmin create /svn/project/www /*创建仓库"www"
#ls /svn/project/www /*查看有没有创建好,如果多了一些文件则说明版本库已经创建好 c、修改svn版本库权限
由于apache启动默认用户是daemon:daemon,svn启动默认用户是root
chown -R root:daemon /svn/project/www
chmod -R 775 /sv/project/www d、配置apche支持svn
#vi /usr/local/apache/conf/httpd.conf
#在文件末尾添加