centos7 git安装
生活随笔
收集整理的這篇文章主要介紹了
centos7 git安装
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
? ? 由于centos中的源倉庫中git不是最新版本,需要進行源碼安裝。
1、查看yum倉庫git信息
[root@iZm5e3d4r5i5ml889vh6esZ zh]# yum info git Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Installed Packages Name : git Arch : x86_64 Version : 1.8.3.1 Release : 13.el7 Size : 22 M Repo : installed From repo : base Summary : Fast Version Control System URL : http://git-scm.com/ License : GPLv2 Description : Git is a fast, scalable, distributed revision control system with an: unusually rich command set that provides both high-level operations: and full access to internals.: : The git rpm installs the core tools with minimal dependencies. To: install all git packages, including tools for integrating with other: SCMs, install the git-all meta-package.2、依賴倉庫安裝
[root@iZm5e3d4r5i5ml889vh6esZ zh]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel [root@iZm5e3d4r5i5ml889vh6esZ zh]# yum install gcc perl-ExtUtils-MakeMaker3、卸載已安裝的git
[root@iZm5e3d4r5i5ml889vh6esZ zh]# yum remove git4、下載git最新源碼
????下載地址:https://github.com/git/git/releases
wget https://github.com/git/git/archive/v2.17.1.tar.gz5、安裝
? ? 解壓、安裝
[root@iZm5e3d4r5i5ml889vh6esZ git]# tar zxvf v2.17.1.tar.gz [root@iZm5e3d4r5i5ml889vh6esZ git]# cd git-2.17.1/ [root@iZm5e3d4r5i5ml889vh6esZ git]# make prefix=/usr/local/git all [root@iZm5e3d4r5i5ml889vh6esZ git]# make prefix=/usr/local/git install6、添加到環境變量
[root@iZm5e3d4r5i5ml889vh6esZ git]# vim /etc/profile export GIT_HOME=/usr/local/gitexport PATH=$GIT_HOME/bin:$PATH [root@iZm5e3d4r5i5ml889vh6esZ git]# source /etc/profile7、查看當前版本號
[root@iZm5e3d4r5i5ml889vh6esZ git]# git --version git version 2.17.1?
轉載于:https://my.oschina.net/u/182501/blog/1832687
總結
以上是生活随笔為你收集整理的centos7 git安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python nose测试框架全面介绍十
- 下一篇: 主成分分析PCA(principal c