centos6.5安装git

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos6.5安装git相关的知识,希望对你有一定的参考价值。

安装必须文件

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker

下载git源代码

wget --no-check-certificate https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz

解压并安装

tar xzf git-2.1.2.tar.gz
cd git-2.1.2
make prefix=/usr/local/git all
make prefix=/usr/local/git install

设置环境变量

echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc

测试

git --version

以上是关于centos6.5安装git的主要内容,如果未能解决你的问题,请参考以下文章

Centos6.5安装MySql

(转)centos6.5安装VNC

centos6.5 安装python3.5

CentOS6.5 安装Storm集群

CENTOS6.5安装ocserv

Centos6.5 安装配置docker