Add git under CentOS

Source: Internet
Author: User
Tags install openssl install perl

There is no git in Yum in CentOS and requires manual installation.

First you need to install a git dependency package

Shell Code
    1. Yum Install Curl
    2. Yum Install Curl-devel
    3. Yum Install Zlib-devel
    4. Yum Install Openssl-devel
    5. Yum Install Perl
    6. Yum Install Cpio
    7. Yum Install Expat-devel
    8. Yum Install Gettext-devel

Download the latest Git package

Shell Code
    1. wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
    2. Tar xzvf git-latest.tar.gz
    3. #进入git源码目录, the last version date is different so use XXXX-XX-XX to indicate
    4. #可以使用 "Ll-a" Look at the directory name and change it to the corresponding directory name (the date is different)
    5. CD GIT-XXXX-XX-XX
    6. Autoconf
    7. ./configure
    8. Make
    9. Make install

To verify that the installation was successful: Check the installed version

Shell Code
    1. Git--version

Add User git

Shell Code
    1. sudo useradd-r-s/bin/sh-c ' git version control '-d/home/git git

Set permissions

Shell Code
    1. Mkdir-p/home/git
    2. Chown Git:git/home/git

Add 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.