Installing git was quite some pain today 😦 Was trying to find the RPM but couldn’t. Tried using the YUM, but no success once again 😦 So I went for the manual install of (g)it 😉
Below are the steps I followed.
- Download git tarball & its signature file from this link.
- Place this tarball inside /usr/src.
- Run tar xzf git-1.9.0.tar.gz
- cd git-1.9.0
- make prefix=/usr/bin/git
- make prefix=/usr/bin/git install
- echo “export PATH=$PATH:/usr/bin/git/bin” >> /etc/bashrc
- source /etc/bashrc
- Restart your session or open a new session.
- Verify by issuing git –version
[root@server git-1.9.0]# git –version
git version 1.9.0
[root@server git-1.9.0]# which git
P.S. You may receive below errors while installing git. So, make sure you have installed these packages before trying to install git :-
* new build flags cc credential-store.o in file included from credential-store.c:1: cache.h:19:18: warning: zlib.h: no such file or directory in file included from credential-store.c:1: cache.h:21: error: expected specifier-qualifier-list before ‘z_stream’ make: *** [credential-store.o] error 1
http.c:1578: error: ‘struct http_object_request’ has no member named ‘slot’
P.P.S. – If somehow, above steps fail. Try below steps : –
- cd /usr/src/git-1.9.0
- make install
- which git
- Then export the path using the same method as described above, just change that to /usr/local/bin/git
This is the default setting 😉