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




相关文章

有时候CentOS工作在无互联网的环境下,需要在离线环境下安装一些组件,这次实现的是模拟在离线环境下安...
首先参照https://www.cnblogs.com/wdw984/p/13330074.html,来进行如何安装Centos和离线下载rpm包。 离...
有两个.NET CORE3.1网站部署在CentOS7上(内网IP是192.168.2.32),现在想实现访问http://192.168.2.32...
1、yum -y install vsftpd 安装vsftpd 2、配置vsftpd的配置文件(/etc/vsftpd/vsftpd.conf)主要修改以...
首先去mysql官网下载mysql的离线rpm安装包(https://downloads.mysql.com/archives/community/) Mysql...
第一步下载erlang环境并安装: wget https://packages.erlang-solutions.com/erlang/rpm/centos/7/x86_...