1.安装Ap、rApr-util和 apache


#wget http://archive.apache.org/dist/apr/apr-1.4.8.tar.gz
#wget http://archive.apache.org/dist/apr/apr-util-1.5.2.tar.gz
#wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.6.tar.gz

tar xzf apr-1.4.8.tar.gz
cd apr-1.4.8

./configure --prefix=/usr/local/apr && make && make install

tar xzf apr-util-1.5.2.tar.gz
cd apr-util-1.5.2
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config && make && make install



tar -zxvf httpd-2.4.6.tar.gz

./configure --prefix=/usr/local/apache2 --enable-so --enable-dav --enable-dav-fs --enable-ssl --enable-maintainer-mode --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre && make && make install



2. 安装serf-1.2.1
yum -y install expat-devel
wget http://serf.googlecode.com/files/serf-1.2.1.tar.bz2 #serf-1.2.1.zip是win版有问题
tar xjf serf-1.2.1.tar.bz2
cd serf-1.2.1
./configure --prefix=/usr/local/serf --with-apr=/usr/local/apache --with-apr-util=/usr/local/apache
make && make install





3. 安装svn
tar xzf subversion-1.8.1.tar.gz
cd subversion-1.8.1
./get-deps.sh


./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs \
--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-zlib \
--with-openssl --enable-maintainer-mode --with-serf=/usr/local/serf --enable-mod-activation

make && make install


4. 检查是否安装成功
安装成功会在/usr/local/apache2/conf/httpd.conf自己加入下面2行:

LoadModule dav_svn_module /usr/local/subversion/libexec/mod_dav_svn.so
LoadModule authz_svn_module /usr/local/subversion/libexec/mod_authz_svn.so

检查svn是否支持http方式:
# svn --version
svn, version 1.8.1 (r1503906)

err:

[root@svn bin]# /usr/local/subversion/bin/svn
/usr/local/subversion/bin/svn: symbol lookup error: /usr/local/subversion/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr
[root@svn bin]# /usr/local/subversion/bin/svnversion --version
/usr/local/subversion/bin/svnversion: symbol lookup error: /usr/local/subversion/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr


解决:
新配置的服务器,在运行svn命令时,全部出错显示上面的错误信息。
在网上搜索发现,原来这个错误是由于系统已经安装了apr的库文件,而在编译Svn时已经指定了httpd的apr库。
在执svn命令时,优先从系统自带的apr库载入,而引起不必要的错误。

只需要执行以下命令,将apr和apr-util都卸载即可

rpm -e –allmatches apr-util –nodeps
rpm -e –allmatches apr –nodeps



svnadmin create /data/MyProjects

5.创建项目:

mkdir -p /data/MyProjects
svnadmin create /data/MyProjects/zxw

[root@svn conf]# cat svnserve.conf |grep -v '^$' |grep -v '#'
[general]
anon-access = read
auth-access = write
password-db = /data/MyProjects/zxw/conf/passwd
authz-db = /data/MyProjects/zxw/conf/authz
[sasl]


[root@svn conf]# cat /data/MyProjects/zxw/conf/passwd |grep -v '^$' |grep -v '#'
[users]
zxw = zxw
jiangjh = jiangjh
jinq=jinq
sunbo=sunbo

[root@svn conf]# cat /data/MyProjects/zxw/conf/authz |grep -v '^$' |grep -v '#'
[aliases]
[groups]
account=zxw,jiangjh,jinq,sunbo
[/]
@account = rw
* =



source:http://www.cnblogs.com/lj2007331/p/3273045.html

问题:

不能看日志

把相应库的conf目录中的svnserve.conf文件打开,找到“anon-access = ……”这一行,改成“anon-access = none”,保存一下。再看日志就行了。