centos7.4|Centos7.X 源码编译安装subversion svn1.8.x的教程

更新时间:2020-10-18    来源:php安装    手机版     字体:

【www.bbyears.com--php安装】

缘由

当我用vagrant做开发环境的时候,windows上的svn版本为1.8.x,而vagrant管理的centos7虚拟机中的svn版本为1.7.x的版本.

这样会导致svn低版本不能管理svn高版本管理的仓库.需要把svn版本升级到1.8.x的版本.

centos7.x官方仓库中subversion(svn)的版本号为 1.7.x尝试了RepoForge,EPEL三方源也还是svn 1.7.x的版本~

所以需要源码编译安装svn1.8.x版本

安装svn需要的依赖库说明

centos7 linux系统要支持svn需要包 apr apr-util zlib serf
subversion1.8.x须要应用serf软件包支撑http和https访问svn的版本库
serf编译安装又需要scons.
所以zlib、scons通过yum安装,arp、apr-util、serf通过源码编译安装

还需要更新sqlite版本sqlite-amalgamation,在shell脚本中体现

安装shell

#移除老版本svn以及支持库
yum -y remove apr apr-util subversion subversion-libs

#安装svn依赖库
yum install -y zlib scons
wget https://dist.apache.org/repos/dist/release/apr/apr-1.5.1.tar.gz
wget https://dist.apache.org/repos/dist/release/apr/apr-util-1.5.4.tar.gz
tar zxvf apr-1.5.1.tar.gz
cd apr-1.5.1
./configure
make && make install
cd ..
tar zxvf apr-util-1.5.4.tar.gz
cd apr-util-1.5.4
./configure --with-apr=/usr/local/apr
make && make install
cd ..

wget http://pkgs.fedoraproject.org/repo/pkgs/libserf/serf-1.3.3.tar.bz2/8375cf4fe2a89773c7d6dbf0d540ed27/serf-1.3.3.tar.bz2
tar xjfv serf-1.3.3.tar.bz2
cd serf-1.3.3
scons PREFIX=/usr/local/serf APR=/usr/local/apr APU=/usr/local/apr
scons install

#复制serf库文件否则会报以下错误的
#svn: error while loading shared libraries: libserf-1.so.1: cannot open shared object file: No such file or directory
cp libserf-1.so* /usr/local/lib/
scons -c
cd ..

#安装svn
wget http://mirrors.cnnic.cn/apache/subversion/subversion-1.8.13.tar.gz
tar zxvf subversion-1.8.13.tar.gz
cd subversion-1.8.13
#更新sqlite
wget http://www.sqlite.org/sqlite-amalgamation-3071501.zip
unzip sqlite-amalgamation-3071501.zip
mv sqlite-amalgamation-3071501 sqlite-amalgamation
./configure  --with-apr=/usr/local/apr  --with-apr-util=/usr/local/apr --with-serf=/usr/local/serf
make && make install
svn help

本文来源:http://www.bbyears.com/jiaocheng/105462.html

热门标签

更多>>

本类排行