This article mainly introduces how to install git online in centos. if you need it, refer to the following tag: CentOS
Before installing Git, you need to install some dependent packages. before installing the dependent packages, you can check whether the packages have been installed.
The shell command is as follows:
Copy codeThe code is as follows:
# Rpm-qa | grep zlib-devel
If no dependency package is installed, install the following dependency packages:
Copy codeThe code is as follows:
# Yum-y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel
# Yum install curl-devel
# Yum install autoconf
# Wget # chmod + x git-1.8.3.2.tar.gz
# Tar xzvf git-1.8.3.2.tar.gz
# Cd git-1.8.3.2
# Autoconf
#./Configure -- with-curl =/opt/git
# Make
# Make install
Now git has been installed successfully. let's verify it:
Copy codeThe code is as follows:
# Git -- version
[Root @ AY140331154108013a0bZ git-1.8.3.2] # git version
Git version 1.8.3.2