缘由

当我用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

 

 

centos7没有ifconfig怎么看ip?

ip addr  #看网卡接口和ip

ip addr add 10.8.8.2.24 dev  网卡名  #临时加ip

centos7没有netstat怎么看网络连接?

ss -ano #看网络连接状态

ss -anl #看网络监听状态

centos7怎么看某个tcp端口是什么进程开的,这个进程的pid是多少?

lsof -i:22 #看tcp22端口

centos7用systemd替换了SysV没有service了改用systemctl后怎么看当前的服务项?

systemctl list-unit-files |grep enabled  #查看当前启用的服务。

systemctl disable 服务名称   #禁止某服务

 

centos7 怎么打开http  tcp 80端口?

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload