zoukankan      html  css  js  c++  java
  • FW: Linux 搭建 csvn 服务器。

    from:http://hi.baidu.com/visual_art/item/a2e593ee50a447d3eb34c916

    Linux SVN服务器CollabNet Subversion搭建 how to install CSVN 如何成功在linux上成功启动CollabNet svn

    1.    下载安装Svn服务器

    (1)下载CollabNet Subversion,到这个网址去下载最新版本:

           http://www.open.collab.net/cn/downloads/subversion/redhat.html

    如下图所示:

     

    下载完之后文件:

     

     

    (3)以超级用户登录系统,设置我们安装CollabNet Subversion目录/opt的读写权限,设置svn群组下的用户对该文件具有读写权限,如下图所示

     

    最后点击“对包含的文件应用权限”按钮。


           把svn群组下的用户加入到sudo组,打开/etc/sudoers文件,找到root ALL=(ALL) ALL,在下一行加入svnuser ALL=(ALL) ALL,强制保存退出。
            (4)解压安装,执行如下命令:

           启动成功之后,默认管理员登录地址:
    地址:http://localhost:3343/csvn
    用户名:admin
    密码:admin

    2.    添加项目库和用户

    (1)添加项目库,在浏览器中打开http://localhost:3343/csvn,以admin/admin登录。

      

    点击菜单栏“Repositories”——“new Repository”, 在Name中输入code项目库名,再点击右下角的Create按钮即可。

    (2)、添加用户,点击菜单栏“Users”——“new User”, 在右边输入相应的用户信息,再点击右下角的Create按钮即可。

     
    3.    Window安装TortoiseSVN

    在window 下安装 TortoiseSVN-1.6.10.19898-win32-svn-1.6.12.msi客户端,安装过程一直点下一步即可。

    最后Check Out项目,如下图所示:

     

    4.    安装过程出错问题汇总

     1、- Exit status=1 Process err output: httpd: Syntax error on line 72 of /opt/csvn/data/conf/httpd.conf: Syntax error on line 23 of /opt/csvn/data/conf/svn_viewvc_httpd.conf: Cannot load /opt/csvn/lib/modules/mod_python.so.2.4into server: libpython.so.2.4.1.0: cannot open shared object file: No such file or directory

    原因:没有先安装python-2.4.3-27.el5.i386.rpm,在/usr/lib/文件夹里找不到libpython。

    2、ERROR services.CommandLineService - Exit status=1 Process error: httpd: bad user name 7230

    原因:当前csvn start的用户为超级管理员root,不能使用root用户启动程序。

    3、user is not in the sudoers file. This incident will be reported.

    原因:当前用户不属于sudoer组。

    解决方法:

    (1)$where is sudoers -------找出文件所在的位置,默认都是/etc/sudoers

    #chmod u+w /etc/sudoers    以超级用户登录su -root ,修改文件权限即添加文件

    拥有这的写权限 限,ls -al /etc/sudoers 可以查看原文件的权限。

    (2)vim /etc/sudoers 编辑文件,在root ALL=(ALL)ALL行下添加XXX ALL=(ALL)ALL,XXX

    为你的用户名。添加方法:找到root行,按下”i“键进入编辑模式添加即可!编辑好

    后esc键进入一般模式,“:w!",":q!"保存退出!

    (3)最后, #chmod u-w /etc/sudoers 回到文件的原权限!

     4、sudo: /etc/sudoers is mode 0640, should be 0440

    原因:/etc/sudoer 的权限为 0440时才能正常使用,否则sudo命令就不能正常使用。

    解决方法:

    (1)、Ctrl+Alt+F1   进入文本模式。用超级用户登录,如root

    (2)、输入:chmod 0440 /etc/sudoers           //回车

    (3)、exit 退出

    (4)、Ctrl+Alt+F7 返回图形模式。

    (5)、在试试sudo命令,可以用了

    上面转自:http://blog.csdn.net/liuzhengkang/archive/2010/09/24/5903867.aspx

    说下我碰到的问题吧!

    开始是使用ROOT用户进去使用   bin/csvn start 能够使用admin/admin登录,但是点击启动时出现,服务器出错,

    后面在网上看倒了这篇文章。里面说要使用不要使用ROOT用户。还有就是要复制.SO文件,

    http://topic.csdn.net/u/20110325/16/0e6c0423-fdde-4206-aed5-08637971e146.html?seed=810599011&r=73037956#r_73037956

    但启动时,还是会报服务器错误。 后面又看了这篇文章,但说的内容还是和上面的一样。

    http://wenku.baidu.com/view/330eca36ee06eff9aef807cc.html

    但是一定要看安装说明,由于全是英文的,看起来有些吃力,所以就没有认真看。碰到问题就还是的坚持去看。里面的内容也大致和网上的说的差不多,后面我再分析下。看到提供的有论坛地址,我就在想是不是别人也碰到过相同的问题。我想应该会找到答案。就试着用如Start server等字样搜索。找到了许多的文章。在如下地址里找到了 apachectl start字样的,是不是里面还有Apache没有启动。把这命令一执行,服务就启动了。后面的事情就比较顺利了。

    http://subversion.open.collab.net/ds/viewMessage.do?dsForumId=3&dsMessageId=410685


    下面看下一些重要的步骤(建议安装程序前一定要认真看里面的内容)
    CollabNet Subversion Edge - Linux 32/64-bit
    Version 1.3.2
    Release Date: March 3, 2011

    Contents

       1. Overview
       2. Platform and configuration
       3. Requirements
       4. Installation notes
       5. Updates
       6. Documentation
       7. Known issues
       8. Support for CollabNet Subversion Edge
       9. About Subversion and CollabNet
       
    1. Overview(概述)

       CollabNet Subversion Edge includes everything you need to install, manage
       and operate a Subversion server.  It includes all of the Subversion and
       Apache binaries needed to run a Subversion server.  It also integrates the
       popular ViewVC repository browsing tool so that users can view repository
       history from a web browser.

       CollabNet Subversion Edge also includes a powerful web-based management
       console that makes it easy to configure and manage your Apache server and
       Subversion repositories.  You can easily setup the server to use SSL
       connections and even connect the server to a corporate LDAP repository,
       including Microsoft Active Directory.

       CollabNet Subversion Edge only supports serving Subversion repositories via
       Apache httpd and it only supports the Subversion fsfs repository format.
      
    2. Platform and configuration(需要的平台和配置)

       Product: CollabNet Subversion Edge
       License: GNU Affero General Public License 3.0 (AGPLv3)
       Certified platforms: Red Hat Enterprise Linux 5.x
                            CentOS 5.x
                            SuSE Linux Enterprise 11.x

       
       NOTE: These are the platforms we formally certify when testing.  CollabNet
       Subversion Edge is known to work on virtually all Linux distributions and is
       informally tested on others such as Ubuntu and Fedora.
       
       There are separate downloads for 32-bit and 64-bit Linux.  Download the 
       appropriate version for your distribution and kernel.
       
    3. Requirements(所需运行换进环境)
       
       * Java 1.6 JRE/JDK must be installed. We recommend the JRE provided by
         Sun/Oracle.  When testing on 64-bit Linux we have used the 64-bit JVM.(JAVA环境1.6及以上)

       
       * Python 2.4 to 2.6 must be installed.(Python2.4到2.6,看了一下后台好像也支持2.7,但没有试过。Centos5.6默认会安装Python2.4,不必重新安装。)
     
    4. Installation Notes(安装说明)

      IMPORTANT: Do not untar CollabNet Subversion Edge using root or sudo.(不要使用ROOT和SUDO进行解压,也就是说不要在ROOT用户下安装运行。)  This  will cause the UID/GID on the files to carry the values from our build
       system instead of being reset.
       
       1. Set the JAVA_HOME environment variable, and point it to your Java 6 JRE(配置JAVA运行环境,使用JAVA  -Version,如果看倒输出的)
          home.  For example:

          export JAVA_HOME=/usr/java/default
       
          Test the variable:
       
          $ $JAVA_HOME/bin/java -version
          java version "1.6.0_20"
          Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
          Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
       
       2. Switch to the folder where you want to install CollabNet Subversion
          Edge.  You must have write permissions to this folder.
          
          $ cd /opt   (转到SVN所以的目录)
          
       3. Untar the file you downloaded from CollabNet.
       
          $ tar zxf CollabNetSubversionEdge-x.y.z_linux-x86.tar.gz  (解压下载文件)
          
          This will create a folder named "csvn" in the current directory. You can
          rename this folder if desired.(产生一个叫CSVN的文件夹)
          
       4. Optional. Install the application so that it will start automatically
          when the server restarts.  This command generally requires root/sudo to
          execute.
          
          $ cd csvn  
          $ sudo -E bin/csvn install   (使用SUDO命令进行安装,目的是自动配置运行环境。如JAVA环境等。)
          
          In addition to configuring your system so that the server is started
          with the system, it will also write the current JAVA_HOME and the
          current username in to the file data/conf/csvn.conf.  You can edit this
          file if needed as it controls the startup settings for the application.
          By setting the JAVA_HOME and RUN_AS_USER variables in this file, it
          ensures they are set correctly when the application is run.
          
       5. Optional. Configure proxy settings.  CollabNet Subversion Edge need
          access to the internet to check for and install updates.  If you need to
          go through a proxy to access the internet, then you can configure the
          proxy by editing the data/conf/csvn.conf file which was created by the
          previous step.  Uncomment and edit the HTTP_PROXY variable to configure
          your proxy server.
          
       6. Start the server. Be sure that you are logged in as your own userid and
          not running as root.运行如下命令时不要在ROOT用户运行。

          
          $ bin/csvn start   (在CSVN目录下使用非ROOT用户运行程序。)
          
          This will take a few minutes and the script will loop until it sees that
          the server is running.  If the server does not start, then try starting
          the server with this command:
          
          $ bin/csvn console    ( 如果启动不成功,使用这个命令进行重新配置)
          
          This will start the server but output the initial startup messages to
          the console.

      You must login to the CollabNet Subversion Edge browser-based management
       console and configure the Apache server before it can be run for the first
       time.  The UI of the management console writes the needed Apache
       configuration files based on the information you provide.

       The default administrator login is:
    可以使用如下 地址进行登录
       Address: http://localhost:3343/csvn
       Username: admin
       Password: admin
       
       Subversion Edge also starts an SSL-protected version using a self-signed SSL
       certificate.  You can access the SSL version on this URL:
       
       Address: https://localhost:4434/csvn
     
       You can force users to use SSL from the Server configuration.  This will cause
       attempts to access the site via plain HTTP on port 3343 to be redirected to the
       secure port on 4434.

    5. Updates

       CollabNet Subversion Edge includes a built-in mechanism for discovering and 
       installing updates.  You must use this facility to install updates.  Do not
       download and run a new version of the application installer.

       The update mechanism will require you to restart the servers at the end of
       the process, but it will do it for you.

    6. Documentation(相关文档)
       
       Documentation for CollabNet Subversion Edge is available here:

       http://help.collab.net/
       
       Context-sensitive help is also linked to this location from within the
       application.
      

    7. Known issues

       - For the latest FAQ, visit the project home page here:(常见问题)
       
         https://ctf.open.collab.net/sf/projects/svnedge

       - If you try to access an existing BDB (Berkeley DB) based repository
         through CollabNet Subversion Edge, then you will receive an alert "Failed
         to load module for FS type 'bdb'." This is because CollabNet Subversion
         Edge does not support BDB.  CollabNet recommends FSFS over BDB for ease
         of maintenance and supportability.
    如果不能访问看下你的防火墙
        - You can access the application from localhost, but not other computers
        on your LAN.  This usually means that you need to configure Firewall rules
        for you server to open the firewall for port 3343:
        
        edit /etc/sysconfig/iptables
        edit /etc/sysconfig/ip6tables
            
        Add the following line to the above files, it line be will the line before
        the last 2 lines.
            
        -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3343 -j ACCEPT

        /etc/init.d/iptables restart
        /etc/init.d/ip6tables restart

    8. Support for CollabNet Subversion Edge(相关支持)

       Ask questions and get assistance with using CollabNet Subversion Edge via
       the community forums on openCollabNet.  The forum for CollabNet Subversion
       Edge questions is available here:(问题解答区)

       http://subversion.open.collab.net/ds/viewForumSummary.do?dsForumId=3

       Find out about CollabNet Technical Support at (技术支持区)
       http://www.open.collab.net/support/
       
       Information about CollabNet Training, Consulting, and Migration(相关信息、资讯、迁移)
       services is at http://www.open.collab.net/training/
       
       Join openCollabNet for community support: http://open.collab.net

    9. About Subversion and CollabNet

       CollabNet launched the Subversion project in 2000 in response to the demand 
       for an open standard for Web-based software configuration management that 
       could support distributed development. CollabNet continues to be strongly 
       involved with the Subversion project and offers CollabNet Subversion
       Support, Training, and Consulting services. 
       
       CollabNet also provides the most widely used collaborative development 
       environment in the world. More than 1,400,000 developers and IT projects 
       managers collaborate online through CollabNet. The company is transforming 
       the way software is developed by enabling organizations to leverage global 
       development talents to deliver better products and innovate faster. 
       
       Visit CollabNet at http://www.collab.net for more information.
       
       Subversion is a registered trademark of the Apache Software Foundation.
       http://subversion.apache.org/

  • 相关阅读:
    mysql find_int_set
    PHPSTROM8.0 注册码(7.1也可用)
    gym 101657 D
    gym101657 C
    poj 3525
    poj1279
    poj3335
    poj 1228
    poj 1873
    poj 2074
  • 原文地址:https://www.cnblogs.com/dracula/p/2948083.html
Copyright © 2011-2022 走看看