linux subversion-1.7.3环境搭建

  1. SVN安装: 
  2. 我采用的是目前当前网站发布的版本:subversion-1.7.3 
  3. 首先,需要安装预先安装四个组件,你的subversion才能正常工作。 
  4. -本文假定apahce已经安装!
  5. -系统在 默认情况下,是已经有apr-util及apr这两个包的,只不过他们的版本较低,只支持subversion 1.4
  6. 因此,具体可以看看:
  7. # rpm -qa | grep apr
    apr-util-1.2.7-7.el5_3.2
    apr-util-1.2.7-7.el5_3.2
    apr-1.2.7-11.el5_3.1
    xorg-x11-drv-dynapro-1.1.0-2
    apr-1.2.7-11.el5_3.1
  8. -
  9. 而subversion要求较高的版本,为此,我们需要删除系统自带的apr,apr-util这两个包!强行删掉!
  10. # rpm -e --allmatches apr-util
    error: Failed dependencies:
    libaprutil-1.so.0()(64bit) is needed by (installed) subversion-1.4.2-4.el5_3.1.x86_64
    libaprutil-1.so.0()(64bit) is needed by (installed) httpd-2.2.3-31.el5.centos.x86_64
    libaprutil-1.so.0 is needed by (installed) subversion-1.4.2-4.el5_3.1.i386
    # rpm -e --allmatches apr-util --nodeps
    # rpm -e --allmatches apr --nodeps
  11. .
  12. .如果你没有执行以上步骤,你在安装完成后,你会发现你执行相关的命令都会报错!
  13. # svnadmin create /data/svn/repos1
    svnadmin: symbol lookup error: /usr/local/svn/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr

  14. # svnserve --version
    svnserve: symbol lookup error: /usr/local/svn/lib/libsvn_subr-1.so.0: undefined symbol: apr_atomic_xchgptr
  1. apr-1.4.6.tar.gz 
  2. apr-util-1.3.8.tar.bz2 
  3. neon-0.29.6.tar.gz 
  4. sqlite-amalgamation(sqlite-autoconf-3071000.tar.gz) 
  5.  
  6. # tar -xzf apr-1.4.6.tar.gz 
  7. # cd apr-1.4.6 
  8. # ./configure --prefix=/usr/local/apr 
  9. # make && make install  
  10. # echo "/usr/local/apr/lib/" >> /etc/ld.so.conf  
  11. # ldconfig  
  12.  
  13. # wget http://archive.apache.org/dist/apr/apr-util-1.3.8.tar.bz2  
  14. # tar -xjf apr-util-1.3.8.tar.bz2 
  15. # cd apr-util-1.3.8 
  16. # ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/ 
  17. # make && make install  
  18. # echo "/usr/local/apr-util/lib" >> /etc/ld.so.conf 
  19. # ldconfig 
  20.  
  21. 安装中发出没找到neon,虽然编译的时候没有中断报错,但为了使用上的便利性,还是安装吧! 
  22. # wget http://www.webdav.org/neon/neon-0.29.6.tar.gz 
  23. # tar -xzf neon-0.29.6.tar.gz  
  24. # cd neon-0.29.6 
  25. # ./configure --prefix=/usr/local/neon 
  26. # make && make install 
  27. # echo "/usr/local/neon/lib" >> /etc/ld.so.conf 
  28. # ldconfig  
  29.  
  30.  
  31. 还要安装一个sqlite  
  32. 编译svn的时候,提示: 
  33. 有两个方法:一要么安装新的版本,二要么替换文件! 
  34. An appropriate version of sqlite could not be found.  We recommmend 
  35. 3.7.6.3, but require at least 3.6.18. 
  36. Please either install a newer sqlite on this system 
  37. or  
  38. get the sqlite 3.7.6.3 amalgamation from
  39.     http://www.sqlite.org/sqlite-amalgamation-3.7.6.3.tar.gz 
  40. unpack the archive using tar/gunzip and copy sqlite3.c from the 
  41. resulting directory to
  42. /root/subversion-1.7.3/sqlite-amalgamation/sqlite3.c 
  43.  
  44. 备注: 
  45. sqlite-amalgamation 这目录在subversion-1.7.3下是没有的,觉得很奇怪,Google后发
  46. 现要自己建立。 
  47.  
  48. 提示中的地址已经找不到了! 
  49. # mkdir /root/subversion-1.7.3/sqlite-amalgamation 
  50. # wget http://www.sqlite.org/sqlite-autoconf-3071000.tar.gz 
  51. # tar -xzf sqlite-autoconf-3071000.tar.gz 
  52. # cd sqlite-autoconf-3071000 
  53. # cp sqlite3.c /root/subversion-1.7.3/sqlite-amalgamation/ 
  54.  
  55. 再次开始编译! 
  56. # ./configure --prefix=/usr/local/svn --with-apr=/usr/local/apr --with-apr- 
  57.  
  58. util=/usr/local/apr-util --with-neon=/usr/local/neon 
  59.  
  60. 这个警告,无所谓的,只是告诉你Berkeley DB已不再被支持了。 
  61. You don't seem to have Berkeley DB version 4.0.14 or newer 
  62. installed and linked to APR-UTIL.  We have created Makefile which will build 
  63. Subversion without support for the Berkeley DB back-end.  You can find the 
  64. latest version of Berkeley DB here: 
  65.  
  66. # make && make install  
  67. # echo "/usr/local/svn/lib" >> /etc/ld.so.conf 
  68. # ldconfig 
  69.  
  70. -此时,可以看下apache是否有生成相应的模块!
  71. # ls /usr/local/apache/modules/ | grep svn
    mod_authz_svn.so
    mod_dav_svn.so

  72.  
  73. # /usr/local/svn/bin/svn --version 
  74. svn, version 1.7.3 (r1242825) 
  75.    compiled Feb 22 2012, 17:29:06 
  76.  
  77. Copyright (C) 2012 The Apache Software Foundation. 
  78. This software consists of contributions made by many people; see the NOTICE 
  79. file for more information. 
  80. Subversion is open source software, see http://subversion.apache.org/ 
  81.  
  82. The following repository access (RA) modules are available: 
  83.  
  84. * ra_neon : Module for accessing a repository via WebDAV protocol using Neon. 
  85.   - handles 'http' scheme 
  86. * ra_svn : Module for accessing a repository using the svn network protocol. 
  87.   - with Cyrus SASL authentication 
  88.   - handles 'svn' scheme 
  89. * ra_local : Module for accessing a repository on local disk. 
  90.   - handles 'file' scheme 
  91. 安装成功了!

 

本文出自 “潜入技术的海洋” 博客,请务必保留此出处http://myhat.blog.51cto.com/391263/786950

posted on 2012-07-19 13:09  linzuxin  阅读(406)  评论(0编辑  收藏  举报

导航