back to listing index

Build git from source code on CentOS 7

[web search]
Original source (gist.github.com)
Tags: git howto centos oracle-enterprise-linux-7 oel7 redhat rhel
Clipped on: 2020-03-03

Skip to content
Build git from source code on CentOS 7

Build git from source code

1) Go to https://git-scm.com/ and check out the latest version of Git

Currently, the latest version is 2.18.0. Download and extract it and go to the folder of the source code:

wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz
tar xf git-2.18.0.tar.gz
cd git-2.18.0/

2) Install the dependencies

yum groupinstall 'Development Tools'
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-CPAN perl-devel

3) Configure

make configure
./configure --prefix=/usr/local

4) Compile

make all

5) Install

make install
Image (Asset 2/3) alt= Add header text Add bold text <ctrl+b> Add italic text <ctrl+i>
Insert a quote Insert code Add a link <ctrl+k>
Add a bulleted list Add a numbered list Add a task list
Directly mention a user or team Reference an issue or pull request
Attach files by dragging & dropping, selecting or pasting them. Styling with Markdown is supported