How to install Git on Centos Linux


Step 1:

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

result:

[root@tutorialspots etc]# yum install curl-devel expat-devel gettext-devel openssl-de
vel zlib-devel
Loaded plugins: fastestmirror, protectbase, replace
Loading mirror speeds from cached hostfile
 * addons: mirror.netdepot.com
 * base: centos.mirror.constant.com
 * extras: mirror.vcu.edu
 * updates: mirrors.tripadvisor.com
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package curl-devel.i386 0:7.15.5-17.el5_9 set to be updated
--> Processing Dependency: libidn-devel for package: curl-devel
---> Package expat-devel.i386 0:1.95.8-11.el5_8 set to be updated
---> Package gettext-devel.i386 0:0.17-1.el5 set to be updated
---> Package openssl-devel.i386 0:0.9.8e-39.el5_11 set to be updated
--> Processing Dependency: krb5-devel for package: openssl-devel
---> Package zlib-devel.i386 0:1.2.3-7.el5 set to be updated
--> Running transaction check
---> Package krb5-devel.i386 0:1.6.1-80.el5_11 set to be updated
--> Processing Dependency: libselinux-devel for package: krb5-devel
--> Processing Dependency: e2fsprogs-devel for package: krb5-devel
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel
---> Package libidn-devel.i386 0:0.6.5-1.1 set to be updated
--> Running transaction check
---> Package e2fsprogs-devel.i386 0:1.39-37.el5 set to be updated
---> Package keyutils-libs-devel.i386 0:1.2-1.el5 set to be updated
---> Package libselinux-devel.i386 0:1.33.4-5.7.el5 set to be updated
--> Processing Dependency: libsepol-devel >= 1.15.2-1 for package: libselinux-de
vel
--> Running transaction check
---> Package libsepol-devel.i386 0:1.15.2-3.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                  Arch      Version                  Repository    Size
================================================================================
Installing:
 curl-devel               i386      7.15.5-17.el5_9          base         310 k
 expat-devel              i386      1.95.8-11.el5_8          base         132 k
 gettext-devel            i386      0.17-1.el5               base         364 k
 openssl-devel            i386      0.9.8e-39.el5_11         updates      1.9 M
 zlib-devel               i386      1.2.3-7.el5              base         102 k
Installing for dependencies:
 e2fsprogs-devel          i386      1.39-37.el5              base         575 k
 keyutils-libs-devel      i386      1.2-1.el5                base          27 k
 krb5-devel               i386      1.6.1-80.el5_11          updates      1.9 M
 libidn-devel             i386      0.6.5-1.1                base         239 k
 libselinux-devel         i386      1.33.4-5.7.el5           base         144 k
 libsepol-devel           i386      1.15.2-3.el5             base         187 k

Transaction Summary
================================================================================
Install      11 Package(s)
Upgrade       0 Package(s)

Total download size: 5.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/11): keyutils-libs-devel-1.2-1.el5.i386.rpm           |  27 kB     00:00
(2/11): zlib-devel-1.2.3-7.el5.i386.rpm                  | 102 kB     00:00
(3/11): expat-devel-1.95.8-11.el5_8.i386.rpm             | 132 kB     00:00
(4/11): libselinux-devel-1.33.4-5.7.el5.i386.rpm         | 144 kB     00:00
(5/11): libsepol-devel-1.15.2-3.el5.i386.rpm             | 187 kB     00:00
(6/11): libidn-devel-0.6.5-1.1.i386.rpm                  | 239 kB     00:00
(7/11): curl-devel-7.15.5-17.el5_9.i386.rpm              | 310 kB     00:00
(8/11): gettext-devel-0.17-1.el5.i386.rpm                | 364 kB     00:00
(9/11): e2fsprogs-devel-1.39-37.el5.i386.rpm             | 575 kB     00:00
(10/11): krb5-devel-1.6.1-80.el5_11.i386.rpm             | 1.9 MB     00:00
(11/11): openssl-devel-0.9.8e-39.el5_11.i386.rpm         | 1.9 MB     00:00
--------------------------------------------------------------------------------
Total                                           5.4 MB/s | 5.8 MB     00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : keyutils-libs-devel                                     1/11
  Installing     : zlib-devel                                              2/11
  Installing     : e2fsprogs-devel                                         3/11
  Installing     : libidn-devel                                            4/11
  Installing     : libsepol-devel                                          5/11
  Installing     : libselinux-devel                                        6/11
  Installing     : expat-devel                                             7/11
  Installing     : krb5-devel                                              8/11
  Installing     : gettext-devel                                           9/11
  Installing     : openssl-devel                                          10/11
  Installing     : curl-devel                                             11/11

Installed:
  curl-devel.i386 0:7.15.5-17.el5_9    expat-devel.i386 0:1.95.8-11.el5_8
  gettext-devel.i386 0:0.17-1.el5      openssl-devel.i386 0:0.9.8e-39.el5_11
  zlib-devel.i386 0:1.2.3-7.el5

Dependency Installed:
  e2fsprogs-devel.i386 0:1.39-37.el5      keyutils-libs-devel.i386 0:1.2-1.el5
  krb5-devel.i386 0:1.6.1-80.el5_11       libidn-devel.i386 0:0.6.5-1.1
  libselinux-devel.i386 0:1.33.4-5.7.el5  libsepol-devel.i386 0:1.15.2-3.el5

Complete!

Step 2: Install perl-ExtUtils-MakeMaker: depend on your version of Centos. For Centos 5.x 32bits:

How to Install perl-ExtUtils-MakeMaker on Centos

Step 2.1

wget http://flexbox.sourceforge.net/centos/5/i386/flexbox-release-1-4.3.noarch.rpm

Result:

[root@tutorialspots ~]# wget http://flexbox.sourceforge.net/centos/5/i386/flexbox-rel
ease-1-4.3.noarch.rpm
--2016-05-06 04:17:35--  http://flexbox.sourceforge.net/centos/5/i386/flexbox-re
lease-1-4.3.noarch.rpm
Resolving flexbox.sourceforge.net... 216.34.181.96
Connecting to flexbox.sourceforge.net|216.34.181.96|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3934 (3.8K) [application/x-rpm]
Saving to: `flexbox-release-1-4.3.noarch.rpm'

100%[======================================>] 3,934       --.-K/s   in 0s

2016-05-06 04:17:35 (277 MB/s) - `flexbox-release-1-4.3.noarch.rpm' saved [3934/
3934]

Step 2.2:

rpm -Uvh flexbox-release-1-4.3.noarch.rpm

Result:

[root@tutorialspots ~]# rpm -Uvh flexbox-release-1-4.3.noarch.rpm
warning: flexbox-release-1-4.3.noarch.rpm: Header V3 DSA signature: NOKEY, key I
D 4026433f
Preparing...                ########################################### [100%]
   1:flexbox-release        ########################################### [100%]

Step 2.3:

yum install perl-ExtUtils-MakeMaker

Result:

[root@downappz ~]# rpm -Uvh flexbox-release-1-4.3.noarch.rpm
warning: flexbox-release-1-4.3.noarch.rpm: Header V3 DSA signature: NOKEY, key I
D 4026433f
Preparing...                ########################################### [100%]
   1:flexbox-release        ########################################### [100%]
[root@downappz ~]# yum install perl-ExtUtils-MakeMaker
Loaded plugins: fastestmirror, protectbase, replace
Loading mirror speeds from cached hostfile
 * addons: mirror.netdepot.com
 * base: centos.mirror.constant.com
 * extras: mirror.vcu.edu
 * updates: mirrors.tripadvisor.com
flexbox                                                  | 1.9 kB     00:00
flexbox/primary_db                                       | 508 kB     00:00
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-ExtUtils-MakeMaker.noarch 1:6.56-5.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                      Arch        Version            Repository    Size
================================================================================
Installing:
 perl-ExtUtils-MakeMaker      noarch      1:6.56-5.el5       flexbox      164 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 164 k
Is this ok [y/N]: y
Downloading Packages:
perl-ExtUtils-MakeMaker-6.56-5.el5.noarch.rpm            | 164 kB     00:00
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 4026433f
flexbox/gpgkey                                           | 1.7 kB     00:00
Importing GPG key 0x4026433F "Fernando Hallberg (Flex Box Repository Key) <ferna
ndo@flexdigital.com.br>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-FLEXBOX
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-ExtUtils-MakeMaker                                  1/1

Installed:
  perl-ExtUtils-MakeMaker.noarch 1:6.56-5.el5

Complete!

install perl-ExtUtils-MakeMaker

Step 3: Install GCC

yum install gcc

Step 4: Remove old Git (if exists)

yum remove git

Step 5:

cd /usr/src
wget https://www.kernel.org/pub/software/scm/git/git-2.5.3.tar.gz
tar xzf git-2.5.3.tar.gz
cd git-2.5.3
[root@tutorialspots ~]# cd /usr/src
[root@tutorialspots src]# wget https://www.kernel.org/pub/software/scm/git/git-2.5.3.
tar.gz
--2016-05-06 04:26:36--  https://www.kernel.org/pub/software/scm/git/git-2.5.3.t
ar.gz
Resolving www.kernel.org... 149.20.4.69, 199.204.44.194, 198.145.20.140, ...
Connecting to www.kernel.org|149.20.4.69|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5430330 (5.2M) [application/x-gzip]
Saving to: `git-2.5.3.tar.gz'

100%[======================================>] 5,430,330   4.35M/s   in 1.2s

2016-05-06 04:26:37 (4.35 MB/s) - `git-2.5.3.tar.gz' saved [5430330/5430330]

[root@tutorialspots src]# tar xzf git-2.5.3.tar.gz
[root@tutorialspots src]# cd git-2.5.3
[root@tutorialspots git-2.5.3]#

Step 6:

make prefix=/usr/local/git all

Result:

...
    BUILTIN git-bisect--helper
    BUILTIN git-blame
    BUILTIN git-branch
    BUILTIN git-bundle
    BUILTIN git-cat-file
    BUILTIN git-check-attr
    BUILTIN git-check-ignore
    BUILTIN git-check-mailmap
    BUILTIN git-check-ref-format
    BUILTIN git-checkout-index
    BUILTIN git-checkout
    BUILTIN git-clean
    BUILTIN git-clone
    BUILTIN git-column
    BUILTIN git-commit-tree
    BUILTIN git-commit
    BUILTIN git-config
    BUILTIN git-count-objects
    BUILTIN git-credential
    BUILTIN git-describe
    BUILTIN git-diff-files
    BUILTIN git-diff-index
    BUILTIN git-diff-tree
    BUILTIN git-diff
    BUILTIN git-fast-export
    BUILTIN git-fetch-pack
    BUILTIN git-fetch
    BUILTIN git-fmt-merge-msg
    BUILTIN git-for-each-ref
    BUILTIN git-fsck
    BUILTIN git-gc
    BUILTIN git-get-tar-commit-id
    BUILTIN git-grep
    BUILTIN git-hash-object
    BUILTIN git-help
    BUILTIN git-index-pack
    BUILTIN git-init-db
    BUILTIN git-interpret-trailers
    BUILTIN git-log
    BUILTIN git-ls-files
    BUILTIN git-ls-remote
    BUILTIN git-ls-tree
    BUILTIN git-mailinfo
    BUILTIN git-mailsplit
    BUILTIN git-merge
    BUILTIN git-merge-base
    BUILTIN git-merge-file
    BUILTIN git-merge-index
    BUILTIN git-merge-ours
    BUILTIN git-merge-recursive
    BUILTIN git-merge-tree
    BUILTIN git-mktag
    BUILTIN git-mktree
    BUILTIN git-mv
    BUILTIN git-name-rev
    BUILTIN git-notes
    BUILTIN git-pack-objects
    BUILTIN git-pack-redundant
    BUILTIN git-pack-refs
    BUILTIN git-patch-id
    BUILTIN git-prune-packed
    BUILTIN git-prune
    BUILTIN git-push
    BUILTIN git-read-tree
    BUILTIN git-receive-pack
    BUILTIN git-reflog
    BUILTIN git-remote
    BUILTIN git-remote-ext
    BUILTIN git-remote-fd
    BUILTIN git-repack
    BUILTIN git-replace
    BUILTIN git-rerere
    BUILTIN git-reset
    BUILTIN git-rev-list
    BUILTIN git-rev-parse
    BUILTIN git-revert
    BUILTIN git-rm
    BUILTIN git-send-pack
    BUILTIN git-shortlog
    BUILTIN git-show-branch
    BUILTIN git-show-ref
    BUILTIN git-stripspace
    BUILTIN git-symbolic-ref
    BUILTIN git-tag
    BUILTIN git-unpack-file
    BUILTIN git-unpack-objects
    BUILTIN git-update-index
    BUILTIN git-update-ref
    BUILTIN git-update-server-info
    BUILTIN git-upload-archive
    BUILTIN git-var
    BUILTIN git-verify-commit
    BUILTIN git-verify-pack
    BUILTIN git-verify-tag
    BUILTIN git-worktree
    BUILTIN git-write-tree
    BUILTIN git-cherry
    BUILTIN git-cherry-pick
    BUILTIN git-format-patch
    BUILTIN git-fsck-objects
    BUILTIN git-init
    BUILTIN git-merge-subtree
    BUILTIN git-show
    BUILTIN git-stage
    BUILTIN git-status
    BUILTIN git-whatchanged
    SUBDIR git-gui
GITGUI_VERSION = 0.19.0.18.g4498b
    * new locations or Tcl/Tk interpreter
    GEN git-gui
    INDEX lib/
    MSGFMT    po/bg.msg 547 translated.
    MSGFMT    po/de.msg 520 translated.
    MSGFMT    po/el.msg 381 translated, 4 fuzzy, 6 untranslated.
    MSGFMT    po/fr.msg 520 translated.
    MSGFMT    po/hu.msg 514 translated.
    MSGFMT    po/it.msg 519 translated, 1 untranslated.
    MSGFMT    po/ja.msg 520 translated.
    MSGFMT    po/nb.msg 474 translated, 39 untranslated.
    MSGFMT po/pt_br.msg 520 translated.
    MSGFMT    po/ru.msg 516 translated, 4 untranslated.
    MSGFMT    po/sv.msg 547 translated.
    MSGFMT    po/vi.msg 543 translated.
    MSGFMT po/zh_cn.msg 366 translated, 7 fuzzy, 17 untranslated.
    SUBDIR gitk-git
    * new Tcl/Tk interpreter location
    GEN gitk-wish
Generating catalog po/bg.msg
msgfmt --statistics --tcl po/bg.po -l bg -d po/
302 translated messages, 1 fuzzy translation, 1 untranslated message.
Generating catalog po/ca.msg
msgfmt --statistics --tcl po/ca.po -l ca -d po/
303 translated messages, 1 fuzzy translation.
Generating catalog po/de.msg
msgfmt --statistics --tcl po/de.po -l de -d po/
279 translated messages, 16 fuzzy translations, 9 untranslated messages.
Generating catalog po/es.msg
msgfmt --statistics --tcl po/es.po -l es -d po/
183 translated messages, 45 fuzzy translations, 76 untranslated messages.
Generating catalog po/fr.msg
msgfmt --statistics --tcl po/fr.po -l fr -d po/
262 translated messages, 26 fuzzy translations, 16 untranslated messages.
Generating catalog po/hu.msg
msgfmt --statistics --tcl po/hu.po -l hu -d po/
277 translated messages, 17 fuzzy translations, 10 untranslated messages.
Generating catalog po/it.msg
msgfmt --statistics --tcl po/it.po -l it -d po/
274 translated messages, 16 fuzzy translations, 14 untranslated messages.
Generating catalog po/ja.msg
msgfmt --statistics --tcl po/ja.po -l ja -d po/
272 translated messages, 19 fuzzy translations, 13 untranslated messages.
Generating catalog po/pt_br.msg
msgfmt --statistics --tcl po/pt_br.po -l pt_br -d po/
280 translated messages, 15 fuzzy translations, 9 untranslated messages.
Generating catalog po/ru.msg
msgfmt --statistics --tcl po/ru.po -l ru -d po/
225 translated messages, 33 fuzzy translations, 46 untranslated messages.
Generating catalog po/sv.msg
msgfmt --statistics --tcl po/sv.po -l sv -d po/
301 translated messages, 2 fuzzy translations, 1 untranslated message.
Generating catalog po/vi.msg
msgfmt --statistics --tcl po/vi.po -l vi -d po/
301 translated messages, 2 fuzzy translations, 1 untranslated message.
    SUBDIR perl
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <private-E
rror.pm >blib/lib/Error.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/E
ditor.pm >blib/lib/Git/SVN/Editor.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/M
igration.pm >blib/lib/Git/SVN/Migration.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/L
og.pm >blib/lib/Git/SVN/Log.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN.p
m >blib/lib/Git/SVN.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/M
emoize/YAML.pm >blib/lib/Git/SVN/Memoize/YAML.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/I18N.
pm >blib/lib/Git/I18N.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/R
a.pm >blib/lib/Git/SVN/Ra.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/P
rompt.pm >blib/lib/Git/SVN/Prompt.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/G
lobSpec.pm >blib/lib/Git/SVN/GlobSpec.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/F
etcher.pm >blib/lib/Git/SVN/Fetcher.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/Index
Info.pm >blib/lib/Git/IndexInfo.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/U
tils.pm >blib/lib/Git/SVN/Utils.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git.pm >b
lib/lib/Git.pm
Manifying blib/man3/private-Error.3pm
Manifying blib/man3/Git::SVN::Editor.3pm
Manifying blib/man3/Git::SVN::Memoize::YAML.3pm
Manifying blib/man3/Git::I18N.3pm
Manifying blib/man3/Git::SVN::Ra.3pm
Manifying blib/man3/Git::SVN::Prompt.3pm
Manifying blib/man3/Git::SVN::Fetcher.3pm
Manifying blib/man3/Git::SVN::Utils.3pm
Manifying blib/man3/Git.3pm
    SUBDIR templates
    MSGFMT po/build/locale/bg/LC_MESSAGES/git.mo
2359 translated messages.
    MSGFMT po/build/locale/ca/LC_MESSAGES/git.mo
2359 translated messages.
    MSGFMT po/build/locale/de/LC_MESSAGES/git.mo
2359 translated messages.
    MSGFMT po/build/locale/fr/LC_MESSAGES/git.mo
2359 translated messages.
    MSGFMT po/build/locale/is/LC_MESSAGES/git.mo
14 translated messages.
    MSGFMT po/build/locale/it/LC_MESSAGES/git.mo
716 translated messages, 350 untranslated messages.
    MSGFMT po/build/locale/pt_PT/LC_MESSAGES/git.mo
306 translated messages, 687 untranslated messages.
    MSGFMT po/build/locale/ru/LC_MESSAGES/git.mo
2359 translated messages.
    MSGFMT po/build/locale/sv/LC_MESSAGES/git.mo
2359 translated messages.
    MSGFMT po/build/locale/vi/LC_MESSAGES/git.mo
2359 translated messages.
    MSGFMT po/build/locale/zh_CN/LC_MESSAGES/git.mo
2359 translated messages.
    CC test-chmtime.o
    LINK test-chmtime
    CC test-ctype.o
    LINK test-ctype
    CC test-config.o
    LINK test-config
    CC test-date.o
    LINK test-date
    CC test-delta.o
    LINK test-delta
    CC test-dump-cache-tree.o
    LINK test-dump-cache-tree
    CC test-dump-split-index.o
    LINK test-dump-split-index
    CC test-dump-untracked-cache.o
    LINK test-dump-untracked-cache
    CC test-genrandom.o
    LINK test-genrandom
    CC test-hashmap.o
    LINK test-hashmap
    CC test-index-version.o
    LINK test-index-version
    CC test-line-buffer.o
    LINK test-line-buffer
    CC test-match-trees.o
    LINK test-match-trees
    CC test-mergesort.o
    LINK test-mergesort
    CC test-mktemp.o
    LINK test-mktemp
    CC test-parse-options.o
    LINK test-parse-options
    CC test-path-utils.o
    LINK test-path-utils
    CC test-prio-queue.o
    LINK test-prio-queue
    CC test-read-cache.o
    LINK test-read-cache
    CC test-regex.o
    LINK test-regex
    CC test-revision-walking.o
    LINK test-revision-walking
    CC test-run-command.o
    LINK test-run-command
    CC test-scrap-cache-tree.o
    LINK test-scrap-cache-tree
    CC test-sha1.o
    LINK test-sha1
    CC test-sha1-array.o
    LINK test-sha1-array
    CC test-sigchain.o
    LINK test-sigchain
    CC test-string-list.o
    LINK test-string-list
    CC test-subprocess.o
    LINK test-subprocess
    CC test-svn-fe.o
    LINK test-svn-fe
    CC test-urlmatch-normalization.o
    LINK test-urlmatch-normalization
    CC test-wildmatch.o
    LINK test-wildmatch
    GEN bin-wrappers/git
    GEN bin-wrappers/git-upload-pack
    GEN bin-wrappers/git-receive-pack
    GEN bin-wrappers/git-upload-archive
    GEN bin-wrappers/git-shell
    GEN bin-wrappers/git-cvsserver
    GEN bin-wrappers/test-chmtime
    GEN bin-wrappers/test-ctype
    GEN bin-wrappers/test-config
    GEN bin-wrappers/test-date
    GEN bin-wrappers/test-delta
    GEN bin-wrappers/test-dump-cache-tree
    GEN bin-wrappers/test-dump-split-index
    GEN bin-wrappers/test-dump-untracked-cache
    GEN bin-wrappers/test-genrandom
    GEN bin-wrappers/test-hashmap
    GEN bin-wrappers/test-index-version
    GEN bin-wrappers/test-line-buffer
    GEN bin-wrappers/test-match-trees
    GEN bin-wrappers/test-mergesort
    GEN bin-wrappers/test-mktemp
    GEN bin-wrappers/test-parse-options
    GEN bin-wrappers/test-path-utils
    GEN bin-wrappers/test-prio-queue
    GEN bin-wrappers/test-read-cache
    GEN bin-wrappers/test-regex
    GEN bin-wrappers/test-revision-walking
    GEN bin-wrappers/test-run-command
    GEN bin-wrappers/test-scrap-cache-tree
    GEN bin-wrappers/test-sha1
    GEN bin-wrappers/test-sha1-array
    GEN bin-wrappers/test-sigchain
    GEN bin-wrappers/test-string-list
    GEN bin-wrappers/test-subprocess
    GEN bin-wrappers/test-svn-fe
    GEN bin-wrappers/test-urlmatch-normalization
    GEN bin-wrappers/test-wildmatch
    GEN git-remote-testgit

install git

Step 7:

make prefix=/usr/local/git install
[root@tutorialspots git-2.5.3]# make prefix=/usr/local/git install
    SUBDIR perl
/usr/bin/perl Makefile.PL PREFIX='/usr/local/git' INSTALL_BASE='' --localedir='/
usr/local/git/share/locale'
Writing perl.mak for Git
    GEN git-add--interactive
    GEN git-difftool
    GEN git-archimport
    GEN git-cvsexportcommit
    GEN git-cvsimport
    GEN git-cvsserver
    GEN git-relink
    GEN git-send-email
    GEN git-svn
    SUBDIR git-gui
    SUBDIR gitk-git
    SUBDIR perl
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <private-E
rror.pm >blib/lib/Error.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/E
ditor.pm >blib/lib/Git/SVN/Editor.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/M
igration.pm >blib/lib/Git/SVN/Migration.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/L
og.pm >blib/lib/Git/SVN/Log.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN.p
m >blib/lib/Git/SVN.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/M
emoize/YAML.pm >blib/lib/Git/SVN/Memoize/YAML.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/I18N.
pm >blib/lib/Git/I18N.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/R
a.pm >blib/lib/Git/SVN/Ra.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/P
rompt.pm >blib/lib/Git/SVN/Prompt.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/G
lobSpec.pm >blib/lib/Git/SVN/GlobSpec.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/F
etcher.pm >blib/lib/Git/SVN/Fetcher.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/Index
Info.pm >blib/lib/Git/IndexInfo.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git/SVN/U
tils.pm >blib/lib/Git/SVN/Utils.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/local/git/share/locale>" <Git.pm >b
lib/lib/Git.pm
    SUBDIR templates
install -d -m 755 '/usr/local/git/bin'
install -d -m 755 '/usr/local/git/libexec/git-core'
install   git-credential-store git-daemon git-fast-import git-http-backend git-i
map-send git-sh-i18n--envsubst git-shell git-show-index git-upload-pack git-remo
te-testsvn git-http-fetch git-http-push git-credential-cache git-credential-cach
e--daemon git-remote-http git-remote-https git-remote-ftp git-remote-ftps git-am
 git-bisect git-difftool--helper git-filter-branch git-merge-octopus git-merge-o
ne-file git-merge-resolve git-mergetool git-pull git-quiltimport git-rebase git-
request-pull git-stash git-submodule git-web--browse git-add--interactive git-di
fftool git-archimport git-cvsexportcommit git-cvsimport git-cvsserver git-relink
 git-send-email git-svn git-p4 git-instaweb '/usr/local/git/libexec/git-core'
install -m 644  git-mergetool--lib git-parse-remote git-rebase--am git-rebase--i
nteractive git-rebase--merge git-sh-setup git-sh-i18n '/usr/local/git/libexec/gi
t-core'
install git git-upload-pack git-receive-pack git-upload-archive git-shell git-cv
sserver '/usr/local/git/bin'
make -C templates DESTDIR='' install
make[1]: Entering directory `/usr/src/git-2.5.3/templates'
install -d -m 755 '/usr/local/git/share/git-core/templates'
(cd blt && tar cf - .) | \
        (cd '/usr/local/git/share/git-core/templates' && umask 022 && tar xof -)
make[1]: Leaving directory `/usr/src/git-2.5.3/templates'
install -d -m 755 '/usr/local/git/libexec/git-core/mergetools'
install -m 644 mergetools/* '/usr/local/git/libexec/git-core/mergetools'
install -d -m 755 '/usr/local/git/share/locale'
(cd po/build/locale && tar cf - .) | \
        (cd '/usr/local/git/share/locale' && umask 022 && tar xof -)
make -C perl prefix='/usr/local/git' DESTDIR='' install
make[1]: Entering directory `/usr/src/git-2.5.3/perl'
make[2]: Entering directory `/usr/src/git-2.5.3/perl'
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Error.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/I18N.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/SVN.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/IndexInfo.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/SVN/GlobSpec.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/SVN/Editor.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/SVN/Log.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/SVN/Prompt.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/SVN/Ra.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/SVN/Fetcher.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/SVN/Utils.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/SVN/Migration.pm
Installing /usr/local/git/lib/perl5/site_perl/5.8.8/Git/SVN/Memoize/YAML.pm
Installing /usr/local/git/share/man/man3/Git::SVN::Fetcher.3pm
Installing /usr/local/git/share/man/man3/Git::SVN::Utils.3pm
Installing /usr/local/git/share/man/man3/Git::SVN::Prompt.3pm
Installing /usr/local/git/share/man/man3/private-Error.3pm
Installing /usr/local/git/share/man/man3/Git::SVN::Memoize::YAML.3pm
Installing /usr/local/git/share/man/man3/Git.3pm
Installing /usr/local/git/share/man/man3/Git::SVN::Ra.3pm
Installing /usr/local/git/share/man/man3/Git::SVN::Editor.3pm
Installing /usr/local/git/share/man/man3/Git::I18N.3pm
Appending installation info to /usr/local/git/lib/perl5/5.8.8/i386-linux-thread-
multi/perllocal.pod
make[2]: Leaving directory `/usr/src/git-2.5.3/perl'
make[1]: Leaving directory `/usr/src/git-2.5.3/perl'
make -C gitweb install
make[1]: Entering directory `/usr/src/git-2.5.3/gitweb'
make[2]: Entering directory `/usr/src/git-2.5.3'
make[2]: `GIT-VERSION-FILE' is up to date.
make[2]: Leaving directory `/usr/src/git-2.5.3'
    GEN gitweb.cgi
    GEN static/gitweb.js
install -d -m 755 '/usr/local/git/share/gitweb'
install -m 755 gitweb.cgi '/usr/local/git/share/gitweb'
install -d -m 755 '/usr/local/git/share/gitweb/static'
install -m 644 static/gitweb.js static/gitweb.css static/git-logo.png static/git
-favicon.png '/usr/local/git/share/gitweb/static'
make[1]: Leaving directory `/usr/src/git-2.5.3/gitweb'
make -C gitk-git install
make[1]: Entering directory `/usr/src/git-2.5.3/gitk-git'
install -m 755 gitk-wish '/usr/local/git/bin'/gitk
install -d -m 755 '/usr/local/git/share/gitk/lib/msgs'
install -m 644 po/bg.msg '/usr/local/git/share/gitk/lib/msgs' &&  install -m 644
 po/ca.msg '/usr/local/git/share/gitk/lib/msgs' &&  install -m 644 po/de.msg '/u
sr/local/git/share/gitk/lib/msgs' &&  install -m 644 po/es.msg '/usr/local/git/s
hare/gitk/lib/msgs' &&  install -m 644 po/fr.msg '/usr/local/git/share/gitk/lib/
msgs' &&  install -m 644 po/hu.msg '/usr/local/git/share/gitk/lib/msgs' &&  inst
all -m 644 po/it.msg '/usr/local/git/share/gitk/lib/msgs' &&  install -m 644 po/
ja.msg '/usr/local/git/share/gitk/lib/msgs' &&  install -m 644 po/pt_br.msg '/us
r/local/git/share/gitk/lib/msgs' &&  install -m 644 po/ru.msg '/usr/local/git/sh
are/gitk/lib/msgs' &&  install -m 644 po/sv.msg '/usr/local/git/share/gitk/lib/m
sgs' &&  install -m 644 po/vi.msg '/usr/local/git/share/gitk/lib/msgs' && true
make[1]: Leaving directory `/usr/src/git-2.5.3/gitk-git'
make -C git-gui gitexecdir='/usr/local/git/libexec/git-core' install
make[1]: Entering directory `/usr/src/git-2.5.3/git-gui'
  DEST /usr/local/git/libexec/git-core
    INSTALL 755 git-gui
    INSTALL 755 git-gui--askpass
    LINK        git-citool -> git-gui
  DEST /usr/local/git/share/git-gui/lib
    INSTALL 644 tclIndex
    INSTALL 644 about.tcl
    INSTALL 644 blame.tcl
    INSTALL 644 branch.tcl
    INSTALL 644 branch_checkout.tcl
    INSTALL 644 branch_create.tcl
    INSTALL 644 branch_delete.tcl
    INSTALL 644 branch_rename.tcl
    INSTALL 644 browser.tcl
    INSTALL 644 checkout_op.tcl
    INSTALL 644 choose_font.tcl
    INSTALL 644 choose_repository.tcl
    INSTALL 644 choose_rev.tcl
    INSTALL 644 class.tcl
    INSTALL 644 commit.tcl
    INSTALL 644 console.tcl
    INSTALL 644 database.tcl
    INSTALL 644 date.tcl
    INSTALL 644 diff.tcl
    INSTALL 644 encoding.tcl
    INSTALL 644 error.tcl
    INSTALL 644 index.tcl
    INSTALL 644 line.tcl
    INSTALL 644 logo.tcl
    INSTALL 644 merge.tcl
    INSTALL 644 mergetool.tcl
    INSTALL 644 option.tcl
    INSTALL 644 remote.tcl
    INSTALL 644 remote_add.tcl
    INSTALL 644 remote_branch_delete.tcl
    INSTALL 644 search.tcl
    INSTALL 644 shortcut.tcl
    INSTALL 644 spellcheck.tcl
    INSTALL 644 sshkey.tcl
    INSTALL 644 status_bar.tcl
    INSTALL 644 themed.tcl
    INSTALL 644 tools.tcl
    INSTALL 644 tools_dlg.tcl
    INSTALL 644 transport.tcl
    INSTALL 644 win32.tcl
    INSTALL 644 git-gui.ico
    INSTALL 644 win32_shortcut.js
  DEST /usr/local/git/share/git-gui/lib/msgs
    INSTALL 644 bg.msg
    INSTALL 644 de.msg
    INSTALL 644 el.msg
    INSTALL 644 fr.msg
    INSTALL 644 hu.msg
    INSTALL 644 it.msg
    INSTALL 644 ja.msg
    INSTALL 644 nb.msg
    INSTALL 644 pt_br.msg
    INSTALL 644 ru.msg
    INSTALL 644 sv.msg
    INSTALL 644 vi.msg
    INSTALL 644 zh_cn.msg
make[1]: Leaving directory `/usr/src/git-2.5.3/git-gui'
bindir=$(cd '/usr/local/git/bin' && pwd) && \
        execdir=$(cd '/usr/local/git/libexec/git-core' && pwd) && \
        { test "$bindir/" = "$execdir/" || \
          for p in git git-shell git-upload-pack git-cvsserver; do \
                rm -f "$execdir/$p" && \
                test -z "" && \
                ln "$bindir/$p" "$execdir/$p" 2>/dev/null || \
                cp "$bindir/$p" "$execdir/$p" || exit; \
          done; \
        } && \
        for p in git-receive-pack git-upload-archive; do \
                rm -f "$bindir/$p" && \
                test -z "" && \
                ln "$bindir/git" "$bindir/$p" 2>/dev/null || \
                ln -s "git" "$bindir/$p" 2>/dev/null || \
                cp "$bindir/git" "$bindir/$p" || exit; \
        done && \
        for p in  git-add git-annotate git-apply git-archive git-bisect--helper
git-blame git-branch git-bundle git-cat-file git-check-attr git-check-ignore git
-check-mailmap git-check-ref-format git-checkout-index git-checkout git-clean gi
t-clone git-column git-commit-tree git-commit git-config git-count-objects git-c
redential git-describe git-diff-files git-diff-index git-diff-tree git-diff git-
fast-export git-fetch-pack git-fetch git-fmt-merge-msg git-for-each-ref git-fsck
 git-gc git-get-tar-commit-id git-grep git-hash-object git-help git-index-pack g
it-init-db git-interpret-trailers git-log git-ls-files git-ls-remote git-ls-tree
 git-mailinfo git-mailsplit git-merge git-merge-base git-merge-file git-merge-in
dex git-merge-ours git-merge-recursive git-merge-tree git-mktag git-mktree git-m
v git-name-rev git-notes git-pack-objects git-pack-redundant git-pack-refs git-p
atch-id git-prune-packed git-prune git-push git-read-tree git-receive-pack git-r
eflog git-remote git-remote-ext git-remote-fd git-repack git-replace git-rerere
git-reset git-rev-list git-rev-parse git-revert git-rm git-send-pack git-shortlo
g git-show-branch git-show-ref git-stripspace git-symbolic-ref git-tag git-unpac
k-file git-unpack-objects git-update-index git-update-ref git-update-server-info
 git-upload-archive git-var git-verify-commit git-verify-pack git-verify-tag git
-worktree git-write-tree git-cherry git-cherry-pick git-format-patch git-fsck-ob
jects git-init git-merge-subtree git-show git-stage git-status git-whatchanged;
do \
                rm -f "$execdir/$p" && \
                test -z "" && \
                ln "$execdir/git" "$execdir/$p" 2>/dev/null || \
                ln -s "git" "$execdir/$p" 2>/dev/null || \
                cp "$execdir/git" "$execdir/$p" || exit; \
        done && \
        remote_curl_aliases="git-remote-https git-remote-ftp git-remote-ftps" &&
 \
        for p in $remote_curl_aliases; do \
                rm -f "$execdir/$p" && \
                test -z "" && \
                ln "$execdir/git-remote-http" "$execdir/$p" 2>/dev/null || \
                ln -s "git-remote-http" "$execdir/$p" 2>/dev/null || \
                cp "$execdir/git-remote-http" "$execdir/$p" || exit; \
        done && \
        ./check_bindir "z$bindir" "z$execdir" "$bindir/git-add"

Step 8:

echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc

Done!, now you can use git.

Related Post

, ,

Trackbacks/Pingbacks

  1. How to use SSL certificate free of Let’s Encrypt on Linux | Free Online Tutorials - May 7, 2016

    […] Read: How to install Git on Centos Linux […]

  2. How to install bmon – Bandwidth Monitor on CentOS | Free Online Tutorials - October 3, 2017

    […] If your server hasn’t git, follow guide: How to install Git on Centos Linux […]

Leave a Reply