Install git under CentOS

Source: Internet
Author: User
Tags vps

CentOS Install git

Directory

    • CentOS Install git
        • Premise
        • Objective
        • Begin
          • System state before Start
          • Select the compilation script mode
          • Install dependent packages
          • Download git
          • Extract
          • Execute GIT program installation successful
          • Test whether the installation was successful

Premise:
    • Bandwagonhost Purchase of VPS
    • A git account
Objective

Because the VPS on the moving bricklayer is said to be installed only under CentOS, so the landlord chose to build a remote git repository CentOS.

System state before starting start

Force Delete File command (because the landlord before the installation of Git error, so that the system has residue)

[root /]# rm -r -f git-1.9.0.tar.gz.1

View the current file list

[root /]# ls
Select the compilation script mode

The landlord began to use basic found a lot of commands are not OK. such as Vi,vim and so on. It is therefore necessary to use the third root shell-interactive mode for command line editing. This mode is also closer to the Linux model. such as the tab prompt and other functions

Install dependent packages
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel

Yum install is the installation command for CentOS. No download required. Enter Y (OK). The prompt for installation is complete! or the prompt has been installed.

Download git
wget http://git-core.googlecode.com/files/git-1.9.0.tar.gz

1.9.0 version is used here. is automatically downloaded

Extract
tar zxvf git-1.9.0.tar.gz

ZXVF is the decompression parameter

Execute git program, install successful
make prefix=/usr/localall#make prefix=/usr/local install

Attention! This make command, if your compilation mode is not the third choice, then an error occurs. Because of the first compilation mode, the y/n is not queried when the previous installation of the dependency package. Will cause the dependency package to remain installed. So be sure to choose the third mode Root shell-interactive

Test whether the installation was successful
git--version

Query the version number of the currently installed git. This should be 1.9.0.

To see the following git actions, please click

Install git under CentOS

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.