zoukankan      html  css  js  c++  java
  • CentOS 6.5下Git服务器搭建

    1 . Git服务器搭建


    1. 环境部署

    系统环境:服务器端:CentOS 6.5 ,ip:192.168.56.1

                   客户端:CentOS 6.5 ,ip:192.168.56.101

    软件版本:服务器端:源码编译安装,git-1.9.0.tar.gz

                   客户端:yum在线安装机制

    2. 安装

    2.1 服务器端:

    #yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
    
    #wget http://git-core.googlecode.com/files/git-1.9.0.tar.gz
    
    #tar zxvf git-1.9.0.tar.gz
    
    #cd git-1.9.0
    
    #make prefix=/usr/local/git all
    
    #make prefix=/usr/local/git install  #root用户运行

    ———————————————————
    如果编译时提示错误:

    LINK git-credential-store
    libgit.a(utf8.o): In function `reencode_string_iconv’:
    /opt/git-master/utf8.c:530: undefined reference to `libiconv’
    libgit.a(utf8.o): In function `reencode_string_len’:
    /opt/git-master/utf8.c:569: undefined reference to `libiconv_open’
    /opt/git-master/utf8.c:588: undefined reference to `libiconv_close’
    /opt/git-master/utf8.c:582: undefined reference to `libiconv_open’
    collect2: ld 返回 1
    make: *** [git-credential-store] 错误 1

    解决办法:

    cd /usr/local/src/
    wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
    tar -zxvf libiconv-1.14.tar.gz
    cd libiconv-1.14
    ./configure --prefix=/usr/local/libiconv  &&  make  && make install

    然后回到git继续编译:

    cd /usr/local/src/git-1.9.0
    make configure
    ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
    make
    make install

    查看版本号:git --version

    git version 1.7.1

    转自 : http://www.centoscn.com/CentosServer/ftp/2014/0414/2789.html

  • 相关阅读:
    ASP.NET MVC学习之模型绑定(2)
    ASP.NET MVC学习之模型绑定(1)
    ASP.NET MVC学习之模型模板篇
    ASP.NET MVC学习之视图篇(2)
    ASP.NET MVC学习之视图篇(1)
    C++迭代器的使用和操作总结
    C++ 11 线程调用类的成员函数解决办法
    详解 C++11 lambda表达式
    C++11 学习笔记 std::function和bind绑定器
    C++11中的std::bind
  • 原文地址:https://www.cnblogs.com/mjorcen/p/4414163.html
Copyright © 2011-2022 走看看