新的版本:1.9.5 必須使用Apache Portable Runtime Utility 1.5.4 Released
沒有安裝的話須要先安裝html
須要安裝apr、apr-util sqlite zlib,python 2.7以上版本
。。。裝的東西好多
而後 make make installpython
Linux不少地方編譯的時候都會用到apr
若是找不到apr就會報錯linux
configure: WARNING: APR not found
The Apache Portable Runtime (APR) library cannot be found.
Please install APR on this system and configure Subversion
with the appropriate –with-apr option.sql
You probably need to do something similar with the Apache
Portable Runtime Utility (APRUTIL) library and then configure
Subversion with both the –with-apr and –with-apr-util options.apache
apr是比較噁心的一個東東,由於用直接用yum install apr安裝apr後,當再安裝其餘東西須要apr環境時候 常常仍是找不到,儘管已經安裝它了。app
這樣的話咱們只能經過下面這兩個參數來指定他們的位置了,可是首先要作的就是安裝apr和apr-until
--with-apr
--with-apr-utilsvn
apr 和 apr-util官網下載地址:this
http://apr.apache.org/download.cgiatom
安裝順序是先安裝apr而後再安裝 apr-util,由於安裝apr-util須要apr環境
首先安裝apr 指定安裝到/usr/local/apr
wget http://mirrors.cnnic.cn/apache/apr/apr-1.4.8.tar.gz
tar zxvf apr-1.4.8.tar.gz
cd apr-1.4.8
./configure --prefix=/usr/local/apr
make & make installsqlite
而後安裝apr-util,指定安裝到/usr/local/apr-util
wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.5.2.tar.gz
tar zxvf apr-util-1.5.2.tar.gz
cd apr-util-1.5.2
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make & make install
通過上面的步驟咱們就能夠安裝其餘程序了,好比編譯安裝svn的時候指定apr和apr-util
指定svn位置/usr/local/subversion 同時也要指定apr和apr-util位置,代碼以下
wget http://mirror.esocc.com/apache/subversion/subversion-1.8.3.tar.gz
cd subversion-1.8.3.tar.gz
./configure --prefix=/usr/local/subversion --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
make & make install
配置:
http://www.iitshare.com/linux-svn-installation-and-configuration.html
設置python路徑:
export PYTHONPATH=$PYTHONPATH:/usr/local/python3.6
設置連接
此時沒有覆蓋老版本,再將原來/usr/bin/python連接改成別的名字
mv /usr/bin/python /usr/bin/python_old2
再創建新版本python的連接
ln -s /usr/local/python3/bin/python3/usr/bin/python
#-----------------------配置環境變量--------------------------------
#添加環境變量
cat>>/etc/profile<<EOF
#----------------------------------
export SVN_HOME=/usr/local/svn
export PATH=\
SVN_HOME/bin:\
PATH
#----------------------------------
EOF
#配置生效
source /etc/profile
#驗證配置
svnserve --version
錯誤: 檢查/usr/lib 和lib64連接 若是不正確的版本,從新建立連接文件
/usr/local/subversion/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr
從新生成:
[root@ch-ngsettel-svn lib64]# ln -s /usr/local/apr/lib/libapr-1.so.0.5.2 libapr-1.so.0
[root@ch-ngsettel-svn lib64]# ln -s /usr/local/apr-util/lib/libaprutil-1.so.0.5.4 libaprutil-1.so.0
mkdir -p /var/svn/reposchmod -R 775 /var/svn/repos