CentOS 6.5安装部署SVN 1.8.13

CentOS 6.5安装部署SVN 1.8.13
PS:原来写了一篇Subversion 1.6的编译安装过程,随着更新,安装在发生很大变化,故重新写一篇Subversion 1.8.13稳定版的安装过程!

  1. 基本设置规划

            #软件安装包存储:
            /usr/local/src
    
            #subversion安装目录:
            /usr/local/subversion
    
            为方便查找目录,设置变量
            # vi .bashrc
            alias  worksrc='cd /usr/local/src'
            配置生效
            # source .bashrc
            
  2. 安装基本依赖包

            yum -y install gcc libtool autoconf zlib-devel openssl  unzip zip libxml expat;
            
  3. 官网下载源码包

            worksrc;
            wget http://mirrors.hust.edu.cn/apache/subversion/subversion-1.8.13.tar.gz;
            tar -zxvf subversion-1.8.13.tar.gz;
            cd subversion-1.8.13;
            ./get-deps.sh;#下载依赖的第三方包
            

    Subversion还取决于以下第三方包
    如果你只是安装一个客户端只需要(Apache Portable Runtime, Sqlite, and Zlib)
    get-deps.sh 运行这个脚本会自动下载apr’, ‘apr-util’, ‘serf’, ‘zlib’, and ‘sqlite-amalgamation’到运行get-deps.sh的同级目录。除了sqlite-amalgamation,其它的第三方软件还需要显式的make make install。如果不是安装在默认目录的话还要指定安装目录
    注意:有可选的依赖项(如openssl,swig,httpd)get-deps.sh 不会下载

  4. 编译下载的第三方包

    1. 编译apr和apr-util

      Apache Portable Runtime 0.9.7或1. x.X(必需),安装svn需要APR和APR-util
      安装好apr后通过./configure 配置来指定安装路径,应该能够找到apr-config脚本在标准目录下(例如 prefix/bin)。例如,如果使用Apache httpd服务器编译安装的apr
      $ ./configure –with-apr=/usr/local/apache2 –with-apr-util=/usr/local/apache2 //前面安装apache的时候使用srclib安装的apr。所以apache 里面有apr的包 ,如果是单独装的可以直接指定为单独的路径

                      worksrc;
                      cd subversion-1.8.13;
                      cd apr;
                      ./configure;
                      make && make install;#得到安装路径=/usr/local/apr/bin/apr-1-config
                      cd ../;
                      cd apr-util;
                      ./configure  --with-apr=/usr/local/apr/bin/apr-1-config;
                      make && make install;#得到安装路径/usr/local/apr/bin/apu-1-config
                      #命令汇总:   worksrc; cd subversion-1.8.13/apr; ./configure; make && make install; worksrc; cd subversion-1.8.13/apr-util; ./configure  --with-apr=/usr/local/apr/bin/apr-1-config; make && make install;
                      
    2. zlib

      Subversion的二进制差异算法取决于Zlib压缩

                      worksrc;
                      cd subversion-1.8.13;cd zlib;
                      ./configure;
                      make && make install;
                      #命令汇总:   worksrc; cd subversion-1.8.13;cd zlib; ./configure --shared; make && make install;
                      
    3. expat

      expat官网下载源码包

                      worksrc;
                      wget http://iweb.dl.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz;
                      tar -zxvf expat-2.1.0.tar.gz;
                      cd expat-2.1.0;
                      ./configure --prefix=/usr/local/expat;
                      make && make install;
                      #命令汇总: worksrc;wget http://iweb.dl.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz;tar -zxvf expat-2.1.0.tar.gz;cd expat-2.1.0;./configure --prefix=/usr/local/expat;make && make install;
                      
    4. serf

      Subversion1.8之后,http资源类型支持库,apache从该版本之后,舍弃了neon。Subversion 1.8中http客户端基于neon已经被移除,改用self。如果要支持http方式需要在安装svn前安装serf!
      如果/get-deps.sh 没有下载到serf,可以到serf官方下载
      Serf 依赖通过OpenSSL 支持 OpenSSL加密

                      yum -y install openssl;
                      

      serf低版本1.2.1

                      tar xjf serf-1.2.1.tar.bz2;
                      cd serf-1.2.1;
                      ./configure --prefix=/usr/local/serf --with-apr=/usr/local/apr
                      --with-apr-util=/usr/local/apr --with-openssl=/usr/bin/openssl;
                      make && make instal;
                      

      serf1.3.8高版本安装

      高版本serf需要安装最低scons-2.3版本的依赖包scons下载

                      #安装scons
                      wget http://jaist.dl.sourceforge.net/project/scons/scons/2.3.0/scons-2.3.0-1.noarch.rpm;
                      rpm -ivh scons-2.3.0-1.noarch.rpm;
                      #安装serf
                      wget http://serf.googlecode.com/svn/src_releases/serf-1.3.8.tar.bz2;
                      tar -jxvf serf-1.3.8.tar.bz2;
                      cd serf-1.3.8;
                      scons PREFIX=/usr/local/serf APR=/usr/local/apr/bin/apr-1-config APU=/usr/local/apr/bin/apu-1-config install;
      
                      #命令汇总: wget http://jaist.dl.sourceforge.net/project/scons/scons/2.3.0/scons-2.3.0-1.noarch.rpm;rpm -ivh scons-2.3.0-1.noarch.rpm;wget http://serf.googlecode.com/svn/src_releases/serf-1.3.8.tar.bz2;tar -jxvf serf-1.3.8.tar.bz2;cd serf-1.3.8;scons PREFIX=/usr/local/serf APR=/usr/local/apr/bin/apr-1-config APU=/usr/local/apr/bin/apu-1-config install;
                      
    5. Sqlite

      sqlite官网下载源码包

                      worksrc;
                      wget http://www.sqlite.org/2015/sqlite-autoconf-3081002.tar.gz;
                      tar -zxvf sqlite-autoconf-3081002.tar.gz;
                      cd sqlite-autoconf-3081002;
                      ./configure --prefix=/usr/local/sqlite;
                      make && make install;
                      worksrc;
                      cd subversion-1.8.13;
                      wget http://www.sqlite.org/2015/sqlite-amalgamation-3081002.zip;
                      unzip sqlite-amalgamation-3081002.zip;
                      cd sqlite-amalgamation-3081002;
                      cp -a ./sqlite3.c ./sqlite-amalgamation/
                      #命令汇总: worksrc;wget http://www.sqlite.org/2015/sqlite-autoconf-3081002.tar.gz;tar -zxvf sqlite-autoconf-3081002.tar.gz;cd sqlite-autoconf-3081002;./configure --prefix=/usr/local/sqlite;make && make install;worksrc;cd subversion-1.8.13;wget http://www.sqlite.org/2015/sqlite-amalgamation-3081002.zip;unzip sqlite-amalgamation-3081002.zip;cd sqlite-amalgamation-3081002;cp -a ./sqlite3.c ./sqlite-amalgamation/
                      
  5. 最后编译安装 subversion

            ./configure --prefix=/usr/local/subversion --with-openssl --with-apr=/usr/local/apr/bin/apr-1-config  --with-apr-util=/usr/local/apr/bin/apu-1-config  --with-serf=/usr/local/serf   --with-zlib --enable-maintainer-mode --with-sqlite=/usr/local/sqlite   --with-expat=/usr/local/expat/include:/usr/local/expat/lib:expat
            make && make install;
            #命令汇总: ./configure  --prefix=/usr/local/subversion --with-openssl --with-apr=/usr/local/apr/bin/apr-1-config  --with-apr-util=/usr/local/apr/bin/apu-1-config  --with-serf=/usr/local/serf --with-sqlite=/usr/local/sqlite   --with-expat=/usr/local/expat/include:/usr/local/expat/lib:expat --with-zlib --enable-maintainer-mode ;make && make install;
            
            #更新动态链接库
            echo "/usr/local/serf/lib" >> /etc/ld.so.conf;
            echo "/usr/local/subversion/lib" >> /etc/ld.so.conf;
            ldconfig;
            #命令汇总:  echo "/usr/local/serf/lib" >> /etc/ld.so.conf && echo "/usr/local/subversion/lib" >> /etc/ld.so.conf && ldconfig
            
  6. 检查svn版本,及其支持的scheme格式:svn,file,http,https

            [root@localhost subversion-1.8.13]# svn --version
            svn, version 1.8.13 (r1667537)
               compiled Sep 23 2014, 23:57:47 on x86_64-unknown-linux-gnu
    
            Copyright (C) 2014 The Apache Software Foundation.
            This software consists of contributions made by many people;
            see the NOTICE file for more information.
            Subversion is open source software, see http://subversion.apache.org/
    
            The following repository access (RA) modules are available:
    
            * ra_svn : Module for accessing a repository using the svn network protocol.
              - with Cyrus SASL authentication
              - handles 'svn' scheme
            * ra_local : Module for accessing a repository on local disk.
              - handles 'file' scheme
            * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
              - using serf 1.3.8
              - handles 'http' scheme
              - handles 'https' scheme
            
相关文章
  1. 对Web静态资源缓存自动更新的思考与实践的总结
  2. 单机多git帐号的访问详解案例
  3. php-redis扩展
  4. Redis安装部署
  5. gearman应用-分布式图库系统设计
  6. SVN trunk, branches and tags
本站版权
1、本站所有主题由该文章作者发表,该文章作者与尘埃享有文章相关版权
2、其他单位或个人使用、转载或引用本文时必须同时征得该文章作者和尘埃的同意
3、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责
4、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
5、原文链接:
二维码
Posted in Cache/File存储, Subversion
Comments are closed.