linux下安装svn 解决svn: Unrecognized URL scheme

来源:互联网 发布:hadoop2.6 windows 编辑:程序博客网 时间:2024/05/21 03:27

svn安装

 

1、首先下载软件包,我是在weindows上下载后上传到linux下的(可以使用rz命令)

 

下载地址:http://download.csdn.net/detail/cyteven/6679121

1、安装zlib

tar zvxf zlib-1.2.5.1.tar.gz

 cd zlib-1.2.5.1  

 ./configure --prefix=/usr/local/zlib

make

make install

2、安装openssl

tar zvxf openssl-0.9.8l.tar.gz

cd cd openssl-0.9.8l

./config --prefix=/usr/local/ssl-0.9.8l shared zlib-dynamic enable-camellia

./config -t

make depend

make

make test

make install

cd /usr/local

ln -s ssl-0.9.8l ssl

 

vi /etc/ld.so.conf

加入如下内容:

/usr/local/ssl/lib

ldconfig

 

vi /root/.bash_profile

若原来没有安装openssl的旧版本,则放在PATH中的任何位置都可以,但是记住要用冒号分隔开,而不是分号分隔,详见后面的截图,若想查看当前的PATH环境变量都设置了什么,可以使用如下的命令实现

cd /root/

source .bash_profile

echo $PATH

可以查看修改后效果

验证:

ldd /usr/local/ssl/bin/openssl

3、安装sqllite

 tar -zvxf sqlite-autoconf-3071502.tar.gz 

cd sqlite-autoconf-3071502 

./configure --prefix=/usr/local/sqlite

make

make install

 

4、安装expat

tar zvxf expat-2.1.0.tar.gz 

cd expat-2.1.0/

./configure --prefix=/usr/local/expat

make

make install

echo /usr/local/lib >> /etc/ld.so.conf

 
ldconfig

 

5、开始安装apr

 tar zvxf apr-1.4.6.tar.gz     //解压

 cd apr-1.4.6/

./configure --prefix=/usr/local/apr

 make

 make install

6、开始安装apr-util

cd apr-util-1.4.1/

../configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/

make

make install

echo /usr/local/apr-util/lib/ >> /etc/ld.so.conf

 

7、安装neon

tar zvxf neon-0.30.0.tar.gz 

./configure --prefix=/usr/local/neon --enable-shared

make

make install

 

8、安装svn

tar -zvxf subversion-1.5.0.tar.gz 

tar zvxf subversion-deps-1.5.0-rc5.tar.gz

cp -ri subversion-1.5.0-rc5/* subversion-1.5.0

cd subversion-1.5.0

./configure --prefix=/usr/local/svn -with-apr=/usr/local/apr -with-apr-util=/usr/local/apr-util/ -with-neon= -with-zlib=/usr/local/zlib/ --with-ssl

 

make

make install

9、验证

cd /usr/local/svn/bin

./svn --version

 

11、哈哈成功了(现在可以正常使用svn并且可以正确更新http的站点)

之前一直遇到错误:

前面两个,是subversion编译的默认模块,ra_dav是大多数人遇到的问题。如果ra_dav没有编译到系统中,当你从http://这样的路径checkout时,会出现这样的错误提示:svn: Unrecognized URL scheme


环境变量配置

添加环境变量:

export PATH="$PATH:/usr/local/svn/bin"

这个地方可以执行export指令来验证一下是否配置成功

已经加入到了环境变量,快去验证一下吧

测试SVN是否安装成功,去任意目录执行:

svnserve --version

如果显示版本信息则安装成功.

QA:常见问题

1、configure: error: no XML parser was found: expat or libxml 2.x required 安装noen时候报错

下载 libxml2-devel-2.6.26-2.1.2.8.i386.rpm 和zlib-devel-1.2.3-3.i386.rpm安装包

rpm -ivh zlib-devel-1.2.3-3.i386.rpm

rpm -ivh libxml2-devel-2.6.26-2.1.2.8.i386.rpm

安装后就完美解决了上面的问题

2、checking for library containing RSA_new... not found 
发现openssl没有找到 我们来安装一下这个东东

下载个openssl-devel-0.9.8e-12.el5.i386.rpm

rpm -ivh openssl-devel-0.9.8e-12.el5.i386.rpm

又有报错krb5-devel-1.6.1-36.el5.i386 is needed by openssl-devel-0.9.8e-12.el5.i386

下载krb5-devel-1.6.1-36.el5.i386安装之

rpm -ivh krb5-devel-1.6.1-36.el5.i386.rpm

汗,又有一堆报错:

         e2fsprogs-devel is needed by krb5-devel-1.6.1-36.el5.i386

        keyutils-libs-devel is needed by krb5-devel-1.6.1-36.el5.i386

       libselinux-devel is needed by krb5-devel-1.6.1-36.el5.i386

不过没关系,因为我们能看出来是什么问题那就继续下载之安装之前两个安装ok发下最后一个又报错了

      libsepol-devel >= 1.15.2-1 is needed by libselinux-devel-1.33.4-5.5.el5.i386

看来已经看到希望了

下载libsepol-devel-1.15.2-2.el5.i386.rpm

安装之

rpm -ivh libsepol-devel-1.15.2-2.el5.i386.rpm

ok了这回从下面一次安装上去,嗯完美解决了

本来以为完全ok又遇到如下问题:

cannot restore segment prot after reloc: Permission denied

make:***[revision-install] 错误 127

 

 

编辑/etc/selinux/config,找到这段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing

把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。
......

编辑/etc/sysconfig/selinux,找到:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing

如果SELINUX已经是 SELINUX=disabled,那么就不用改了,否则就把SELINUX=enforcing 注释掉,新加一行:
SELINUX=disabled
保存,退出。

上面都执行过了还是不行 泪奔

 

chcon -t texrel_shlib_t /usr/software/svn/subversion-1.5.0/subversion/libsvn_subr/.libs/libsvn_subr-1.so/usr/software/svn/subversion-1.5.0/subversion/libsvn_subr/.libs/libsvn_subr-1.so

也不行

 

最后发现原来执行这个就ok了:

/usr/sbin/setenforce 0