Sunday, October 08, 2017

Build Git From Source Code on Red Hat Enterprise Linux Server

Redhat Enterprise Linux provides Redhat Developer Toolset, which allows you to install Git. However, it is usually an older version. If you want the latest version of Git on your Server, then building Git from sources is the easiest way. Follow these steps to install Git from sources on Red Hat Enterprise Linux Server release 7.3. On our server, the following commands were run by the root user.
  1. To install Git from source code, you must need to have the following libraries and tools that Git depends on: gcc, perl-ExtUtils-MakeMaker, autotools, curl, zlib, openssl, expat, and libiconv. Run the following commands to install these requirements
    yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
    yum install gcc perl-ExtUtils-MakeMaker
  2. Download the latest Git sources from https://www.kernel.org/pub/software/scm/git/
  3. Extract the source code into /usr/src
    cp git-2.9.4.tar.gz /usr/src/
    
    cd /usr/src/
     
    tar xzf git-2.9.4.tar.gz
  4. Run the following commands to install git
    cd git-2.9.4
      
    make prefix=/usr/local/git all
       
    make prefix=/usr/local/git install
Once you are done with these steps, you should be able to run git commands normally as shown below
git clone git://git.kernel.org/pub/scm/git/git.git

2 comments:

  1. Awesome article I really impress it’s very informative and useful.Thanks

    Custom Software Development Sydney

    ReplyDelete
  2. Awesome article I really impress it’s very informative and useful.Thanks

    Custom Software Development Sydney

    ReplyDelete

Popular Posts