安装apr
wget http://mirror.bit.edu.cn/apache//apr/apr-1.6.3.tar.gz
tar -zxvf apr-1.6.3.tar.gz
./configure --prefix=/desired/path/of/apr
make
sudo make install
安装apr-util
wget http://mirror.bit.edu.cn/apache//apr/apr-util-1.6.1.tar.gz
tar -zxvf apr-util-1.6.1.tar.gz
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make #遇到错误,见下文说明
sudo make install
make时遇到错误
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
解决方案:
sudo yum install expat-devel
安装sqlite
wget http://www.sqlite.org/2017/sqlite-autoconf-3210000.tar.gz
tar -zxvf sqlite-autoconf-3210000.tar.gz
./configure --prefix=/usr/local/sqlite
make
sudo make install
安装zlib
wget http://www.zlib.net/zlib-1.2.11.tar.gz
tar -zxvf zlib-1.2.11.tar.gz
./configure --prefix=/usr/local/zlib
make
sudo make install
安装subversion
wget http://mirrors.hust.edu.cn/apache/subversion/subversion-1.9.7.tar.gz
./configure --prefix=/usr/local/subversion_1.9.7 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-sqlite=/usr/local/sqlite --with-zlib=/usr/local/zlib
make
sudo make install
添加环境变量
在/etc/bashrc最后一行添加
export PATH=/usr/local/subversion_1.9.7/bin:$PATH
finished!