服务器 频道

实战:建立RHEL 5.0下版本控制服务器

安装Subversion服务器

    1. 重新安装Apache服务器

    RHEL 5默认安装的Apache没有并包含--enable-so选项,所以无法产生mod_dav_svn.没有这个模块,SVN就无法采用http方式运行,所以必须重新编译新的Apache 。
    #wget http://down.itlearner.com/Soft_Down.asp?UrlID=1&P=1&SoftID=2356
    #tar zxvf httpd-2.2.3.tar.gz
    #cd httpd-2.2.3
    #./configure --enable-dav --enable-so --enable-maintainer-mode
    #make
    #make install
    此时会产生一个/usr/local/apache2系统目录。

    2. 安装Subversion

    #wget http://www.iusesvn.com/bbs/download/subversion-1.4.0.tar.gz
    # tar zxvf subversion-1.4.0.tar.gz 
    # cd subversion-1.4.0 
    # ./configure --prefix=/usr/local/subverion --with-apxs=/usr/local/apache2/bin/apxs  
    # make
    # make install
    说明:--with-apxs指定apxs的安装的目录,可以在安装过程中自动生成两个必要的模块文件mod_dav_svn.so和mod_authz_svn.so以及能够支持它们可以正常地工作。
S    ubversion安装完成后会生成如表-1组件:

表-1 Subversion组件

     3. 通过svnserver命令检查版本

    运行命令:
    #svnserver –version
    svnserve,版本 1.4.0 (r21228)
   编译于 May 16 2007,16:02:18
    Copyright (C) 2000-2006 CollabNet.
    Subversion is open source software, see http://subversion.tigris.org/
    This product includes software developed by CollabNet (http://www.Collab.Net/).
    The following repository back-end (FS) modules are available:
    * fs_fs : 模块与纯文本文件(FSFS)档案库一起工作。
    另外svnserver命令参数
    -d [--daemon]            : 后台模式
    --listen-port 参数     : 监听端口(后台模式)
    --listen-host 参数     : 监听主机名或IP地址(后台模式)
    --foreground             : 在前台运行(调试时有用)
    -h [--help]              : 显示这个帮助
    --version                : show program version information
    -i [--inetd]             : inetd 模式
    -r [--root] 参数       : 服务根目录
    -R [--read-only]         : force read only, overriding repository config file
    -t [--tunnel]            : 隧道模式
    --tunnel-user 参数     : 隧道用户名(模式是当前用户UID的名字)
    -T [--threads]           : 使用线程代替进程
    -X [--listen-once]       : 监听一次(调试时有用)
    --pid-file 参数        : write server process ID to file arg

    4. 建立Subversion 的数据库

    Subversion 的数据库用来存放任意数量项目的受版本控管数据,建立方法很简单
    #svnadmin create /svndate

0
相关文章