CentOS6.x 源码编译安装Git
时间:2016-09-29 15:54 来源:linux.it.net.cn 作者:IT
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 http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
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
(责任编辑:IT)
CentOS自带的Git版本比较老,经常不能满足功能需要。 最新的版本只能源码安装。记录下, 以免忘记:
|