Steps for Installing Git in CentOS 6 (64-bit)

Source: Internet
Author: User
Tags centos vps
Sometimes we need to debug the project, and there may be some problems when using the Git environment built in the local Windows environment, so I directly set up the Git tool environment in the VPS environment. Although the git source is included in the Linux system environment, we can directly install yum or apt-get. However, if the source is not the latest version, an error occurs when the installed git environment submits the version, therefore, you must manually install git to ensure that the tool is used properly.

 

Yesterday in the Q group, I saw some netizens mentioned the problem of Installing git in the Centos environment. So I collected information this morning, share The git installation method based on the centos 6 64-bit environment.

 

1. Install the compiling environment

 

The code is as follows: Copy code

Yum-y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel curl

 

Run the above script to install some basic environment dependency packages necessary for the git environment.

 

2. Download and install the git version

 

Log on to SSH on the current VPS host and run the following command.

 

The code is as follows: Copy code

Http://soft.laozuo.org/git/git-2.4.5.tar.gz
Tar-zxvf git-2.4.5.tar.gz
Cd git-2.4.5
Autoconf
./Configure
Make
Make install

 

Through the above steps, we download the current newer version of the git-2.4.5, and then compile the installation.

 

 

Finally, we can use the git -- version command to view the current GIT version. In this way, you can install it in the GIT tool environment with a higher version. By default, version 1.7 of the environment package is too low to submit the version.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.