在CentOS 6.x/7.x上安装git
方式一、yum安装
# yum info git
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Available Packages
Name : git
Arch : x86_64
Version : 1.8.3.1 <--- 说明:当前系统是 CentOS7.x,在 6.x 上是 1.7.1
Release : 12.el7_4
Size : 4.4 M
Repo : updates/7/x86_64
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.
# yum install -y git
方式二、源码包安装
步骤1. 安装依赖包
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install gcc perl-ExtUtils-MakeMaker
步骤2. 卸载旧的git版本(如果之前有安装rpm包)
# yum remove git
步骤3. 下载&解压
源码文件(当前最新版本 **v2.16.1** @ **2018年2月9日**)
- 地址1:https://www.kernel.org/pub/software/scm/git/
- 地址2:https://github.com/git/git/release
# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.5.0.tar.gz
# tar -zxvf git-2.5.0.tar.gz
步骤4. 编译安装
# cd git-2.5.0
# 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
步骤5. 检查git版本
# git --version
git version 2.5.0
在CentOS 6.x/7.x上安装git的更多相关文章
- CentOS 6.x/7.x上安装git
yum安装 # yum info git # yum install -y git 可以通过下面的命令来检查是否安装了git环境 git --version 参考:如何在CentOS 6.x/7.x上 ...
- Git学习系列之Windows上安装Git详细步骤(图文详解)
前言 最初,Git是用于Linux下的内核代码管理.因为其非常好用,目前,已经被成功移植到Mac和Windows操作系统下. 鉴于大部分使用者使用的是Windows操作系统,故,这里详细讲解Windo ...
- Eclipse上安装GIT插件EGit及使用
一.Eclipse上安装GIT插件EGit Eclipse的版本eclipse-java-helios-SR2-win32.zip(在Eclipse3.3版本找不到对应的 EGit插件,无法安装) E ...
- Eclipse上安装GIT插件EGit
一.Eclipse上安装GIT插件EGit Eclipse的版本eclipse-java-helios-SR2-win32.zip(在Eclipse3.3版本找不到对应的 EGit插件,无法安装) E ...
- 【转】Eclipse上安装GIT插件EGit及使用
http://yufenfei.iteye.com/blog/1750124 一.Eclipse上安装GIT插件EGit Eclipse的版本eclipse-java-helios-SR2-win32 ...
- 关于如何在mac系统上安装Git并在码市上建立项目
对Git一窍不通,为了在mac系统上安装Git,查了很多资料,走了很多弯路,一切搞定后发现其实很简单. 1.在https://brew.sh上按要求安装Homebrew. 2.在电脑终端键入brew ...
- Git学习系列之Windows上安装Git之后的一些配置(图文详解)
不多说,直接上干货! 前面博客 Git学习系列之Windows上安装Git详细步骤(图文详解) 第一次使用Git时,需要对Git进行一些配置,以方便使用Git. 不过,这种配置工作只需要进行一次便可, ...
- 转:Eclipse上安装GIT插件EGit及使用
一.Eclipse上安装GIT插件EGit Eclipse的版本eclipse-java-helios-SR2-win32.zip(在Eclipse3.3版本找不到对应的 EGit插件,无法安装) E ...
- Linux上安装git
Linux上安装git Git是一个开源的分布式版本控制系统,可以有效.高速的处理从很小到非常大的项目版本管理. 而国外的GitHub和国内的Coding都是项目的托管平台.但是在使用Git工具的时候 ...
随机推荐
- DP转LVDS方案 瑞奇达CS5211替代PS8625方案 CS5211芯片
PS8625将作为DP或eDP接收器设备出现在视频源中,并将作为LVDS显示面板的LVDS源设备.该设备是一个完全集成的解决方案,不需要外部CPU.内存.时钟基准或电压调节器.PS8625可配置为从显 ...
- 探索 dotnet core 为何在 Windows7 系统需要补丁的原因
在一些 Windows 7 系统上,根据 dotnet 官方文档,需要安装上 KB2533623 补丁,才能运行 dotnet core 或 .NET 5 等应用.尽管非所有的设备都需要安装此,但这也 ...
- 关于MySQL导入数据到elasticsearch的小工具logstash
logstash核心配置文件pipelines.yml #注:此处的 - 必须顶格写必须!!! - pipeline.id: invitation #下面路径配置的是你同步数据是的字段映射关系 pat ...
- 初识python:高阶函数(附-高阶函数)
定义: 变量可以指向函数,函数的参数能接收变量,那么,一个函数可以接收另一个函数作为参数,这种函数就称之为高阶函数. 简单说就是:把函数当作参数传递的函数就是高阶函数 特性 1.把一个函数名当作实参传 ...
- 在 CentOS 7 上安装 GitLab
1. 安装和配置必要的依赖库 sudo yum install -y curl policycoreutils-python openssh-server # the commands below w ...
- springMVC+redis+redis自定义工具类 的配置
1. maven项目,加入这一个依赖包即可, <dependency> <groupId>redis.clients</groupId> <artifactI ...
- 拓展 Array 方法
为 Array 对象扩展了一个迭代器之后,就可以利用这个法代器进一步拓展 Array 的方法,使其能够完成更多的实用功能. Array.prototype.each = function( f ) { ...
- docker 环境安装 jenkins
下载镜像运行 jenkins 默认服务器已经安装好了 docker 环境: 拉取 jenkins 镜像 docker pull jenkins/jenkins:lts 镜像的详细信息可以查看:http ...
- Python多环境管理神器(Anaconda)
为了解决python多版本共存,解决不同版本之间的依赖冲突,虚拟环境隔离等问题,我们前面介绍了venv.virtualenv.virtualenvwrapper.pyenv.pipenv等众多工具.下 ...
- Java中生成一个唯一值的方式
现总结几种生成一个唯一值的方式 第一种:采用nanoTime() // 理论上存在重复的可能,可以在后面再加上一个随机字符串 Random r = new Random(); for (int i = ...