CentOS6.x 源码编译安装Git

前端之家收集整理的这篇文章主要介绍了CentOS6.x 源码编译安装Git前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

CentOS自带的git版本比较老,经常不能满足功能需要。

最新的版本只能源码安装。记录下,以免忘记:


0) 安装epel源

32位系统选择:
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

64位系统选择:
rpm -ivh @L_502_2@
rpm -ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

导入key:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5

别忘了安装
yum install yum-priorities

1) 安装依赖

sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
sudo yum install openssl-devel gettext asciidoc xmlto docbook2x

ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi

2) 源码编译安装git

git clone https://github.com/git/git
cd git
make configure
./configure --prefix=/usr (或者./configure --prefix=/usr --with-curl --with-expat)
make all doc
make install install-doc install-html




猜你在找的CentOS相关文章