liangcai
12/30/2015 - 3:24 AM

linux ubuntu 一键安装svn,直接使用源安装会有问题,编译安装太麻烦,使用老版本可以一键安装,脚本来源于网络,替换了失效的下载链接。

linux ubuntu 一键安装svn,直接使用源安装会有问题,编译安装太麻烦,使用老版本可以一键安装,脚本来源于网络,替换了失效的下载链接。

#!/bin/bash
                                                                    
yum -y remove subversion
mkdir -p /dist/{dist,src}
cd /dist/dist
/bin/rm -f openssl* subversion*
wget "http://www.openssl.org/source/openssl-1.0.1c.tar.gz"
wget "https://code-jinchengjiang.googlecode.com/files/subversion-1.7.8.tar.gz"
wget "https://centos.googlecode.com/files/apr-1.4.6.tar.gz"
wget "https://archive.apache.org/dist/apr/apr-util-1.4.1.tar.gz"
wget "http://www.sqlite.org/sqlite-autoconf-3071502.tar.gz"
wget "http://www.webdav.org/neon/neon-0.29.6.tar.gz"
                                                                    
cd /dist/src
rm -rf openssl*
rm -rf subversion*
rm -rf apr*
rm -rf sqlite*
rm -rf neon*
                                                                    
tar xf /dist/dist/openssl-1.0.1c.tar.gz
cd openssl-1.0.1c
./config --prefix=/usr/local/ssl-1.0.1c shared
./config -t
make
make install
echo '/usr/local/ssl-1.0.1c/lib' >/etc/ld.so.conf.d/openssl.conf
ldconfig -v
cd /dist/src
tar xf /dist/dist/apr-1.4.6.tar.gz
cd apr-1.4.6/
./configure --prefix=/usr/local/apr
make
make install
cd /dist/src
tar xf /dist/dist/apr-util-1.4.1.tar.gz
cd apr-util-1.4.1/
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install
cd /dist/src
tar xf /dist/dist/sqlite-autoconf-3071502.tar.gz
cd sqlite-autoconf-3071502
./configure --prefix=/usr/local/sqlite
make
make install
cd /dist/src
tar xf /dist/dist/neon-0.29.6.tar.gz
cd neon-0.29.6
./configure --prefix=/usr/local/neon --with-ssl=openssl
make
make install
                                                                    
cd /dist/src
tar xf /dist/dist/subversion-1.7.8.tar.gz
cd subversion-1.7.8
./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-sqlite=/usr/local/sqlite --with-ssl --without-berkeley-db --with-neon=/usr/local/neon
make 
make install
                                                                    
ln -s /usr/local/bin/svn /usr/bin/