Differences
This shows you the differences between two versions of the page.
— |
centos6:build-git-from-source [2018-08-24 20:25:41] (current) shaun.reitan created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Build and Install git from source on CentOS 6 ====== | ||
+ | |||
+ | CentOS 6 comes with a packaged version of git that can easily be installed using ```yum install git``` however it's a bit old and you may run into issues with newer repo's where you | ||
+ | see this error | ||
+ | <code console> | ||
+ | </ | ||
+ | |||
+ | If this happens you most likely need a newer version of git. | ||
+ | |||
+ | ===== Installing git from source ===== | ||
+ | |||
+ | The following instructions will help you build and install a newer version of git. In this article we will be building version 2.9.5 and will be installing it into /opt/git | ||
+ | |||
+ | <code console> | ||
+ | yum -y install gcc zlib-devel gettext curl libcurl libcurl-devel perl-ExtUtils-MakeMaker | ||
+ | cd /usr/src | ||
+ | wget https:// | ||
+ | tar xvf git-2.9.5.tar.xz | ||
+ | cd git-2.9.5 | ||
+ | ./configure --prefix=/ | ||
+ | </ | ||
+ | |||
+ | ===== Using the new version of git ===== | ||
+ | Since we installed git in /opt/git you will need to call it directly at / | ||