CentOS 7.4 系统安装 git
CentOS 7.4 系统安装 git
一、使用 yum 安装
1、查看系统是否已经安装 git
[root@localhost ~]# git --version
2、yum 安装 git
[root@localhost ~]# yum install git
3、安装成功
[root@localhost ~]# git version
git version 1.7.1
[root@localhost ~]# git --version
git version 1.7.1
4、卸载 git
[root@localhost ~]# yum remove git
二、源代码安装
在 Linux 下安装 git
git 是一个开源的分布式版本控制系统,可以有效、高速的处理从很小到非常大的项目版本管理。而国外的 GitHub 和国内的 Coding 都是项目的托管平台,但是在使用 git 工具的时候,第一步要学会如何安装 git,本教程就手把手教大家如何手动编译安装 git。
1、介绍
使用 Coding 管理项目,上面要求使用的 git 版本为 1.8.0 以上,而很多 yum 源上自动安装的 git 版本为 1.7,所以需要掌握手动编译安装 git 方法。
2、安装 git 依赖包
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
3、删除已有的 git
yum remove git
4、下载 git 源码
4.1、切换到你的包文件存放目录下
cd /usr/src
4.2、下载 git 安装包
wget https://www.kernel.org/pub/software/scm/git/git-2.8.3.tar.gz --no-check-certificate
4.3、解压 git 安装包
tar -zxvf git-2.8.3.tar.gz
cd git-2.8.3
4.4、配置 git 安装路径
./configure prefix=/usr/local/git/
4.5、编译并且安装
make && make install
5、将 git 指令添加到 bash 中
vi /etc/profile
在最后一行加入
export PATH=$PATH:/usr/local/git/bin

让该配置文件立即生效
source /etc/profile
6、查看 git 版本号
git --version
[root@localhost ~]# git version
git version 2.8.3
git 已经安装完毕
参考资料
CentOS 7.4 系统安装 git的更多相关文章
- CentOS 6.4 搭建git 服务器
CentOS 6.4 搭建git 服务器 (2013-11-22 19:04:09)转载▼ 标签: it 分类: Linux 此文件是依据markdown所编写,更好效果参见本人github的文档ht ...
- CentOS 6.5系统安装配置图解教程
说明: 截止目前CentOS 6.x最新版本为CentOS 6.5,下面介绍CentOS 6.5的具体安装配置过程 服务器相关设置如下: 操作系统:CentOS 6.5 64位 IP地址:192.16 ...
- CentOS 7.0系统安装配置图解教程
转自:http://www.osyunwei.com/archives/7829.html 操作系统:CentOS 7.0 64位 IP地址:192.168.21.128 网关:192.168.21. ...
- 【转】CentOS 7.X 系统安装及优化
[转]CentOS 7.X 系统安装及优化 centos的演变 启动流程sysvinit 串行启动:一次一个,一个一个启动 并行启动:全部的一起启动 init优点 运行非常良好.主要依赖于shell脚 ...
- windows 系统安装git的方法
windows 系统安装git的方法 msysgit是Windows版的Git,从https://git-for-windows.github.io下载 安装默认步骤,一步步安装即可 安装完成后,在开 ...
- Centos 6.4搭建git服务器【转】
前阵子公司需要,让我搭个Git服务器,把之前用的SVN上代码迁移到git上去,所以就在阿里云主机上搭了一个,记录了下安装过程,留存文档以备查阅.本篇本章只涉及搭建部分的操作,更多git的使用可以参考文 ...
- Centos 7 安装配置git
Centos 7 安装配置git 1.安装git yum install git 2.验证git git -version 3.配置基本信息
- GIT-Linux(CentOS7)系统安装Git
GIT-Linux(CentOS7)系统安装Git 未成功 查看是否已安装了Git 发现Git版本已存在,说明已安装了Git [root@localhost ~]# rpm -qa|grep git ...
- CentOS 7.2系统安装步骤
CentOS 7.2系统安装步骤 1.把系统U盘插到服务器上,然后启动服务器进入BIOS界面选择U盘启动. 根据服务器的不同,进入BIOS界面的按钮也不一样,主流的有F10.F11.F12.F2.ES ...
随机推荐
- springboot中radis配置和使用【进阶二】
1.yml文件配置 #redis哨兵模式配置 redis: namespace: xxx:xxx:redis connection: cacheRedis: database: 0 timeout: ...
- bug5 Debug:This kind of launch is configured to openthe debug perspective when it解决办法
启动tomcat时,myeclipse报错: This kind of launch is configured to openthe debug perspective when itsuspend ...
- C# 基于MySQL的数据层基类(MySQLHelper)
这里介绍下比较简单的方式,引用MySql.Data.dll然后添加一个MySqlHelper类来对MySql数据库进行访问和操作. 1.将MySql.Data.dll引用到你的项目中 下载地址:MyS ...
- String的用法------程序猿的双十一
小感慨:我就静静的写着代码玩,度过一年一度的双十一,今晚就更新进度,整理笔记. package com.mon11.day10; import static org.junit.Assert.*; i ...
- C语言复习---杨辉三角打印
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <math ...
- Codeforces 314 E. Sereja and Squares
http://codeforces.com/contest/314/problem/E 题意: 原本有一个合法的括号序列 擦去了所有的右括号和部分左括号 问有多少种填括号的方式使他仍然是合法的括号序列 ...
- [整理]WebAPP开发的框架
http://www.zhihu.com/question/27210335 http://ionicframework.com/getting-started/ http://cordova.apa ...
- Repeater控件的分页实现
本文讲解Repeater控件与PagedDataSource相结合实现其分页功能.PagedDataSource 类封装那些允许数据源控件(如 DataGrid.GridView)执行分页操作的属性. ...
- Guava HashMultiset(MultiSet)
multiset:多重集合,和set唯一的不同是 set 集合中一个值只能出现一次,而multiset多重集合中一个值可以出现多次.一个典型的应用就是统计单词出现次数 举例: public class ...
- mysql 1045 access denied for user 解决方法
提示:1045 access denied for user 'root'@'localhost' using password yes方法一: # /etc/init.d/mysql stop # ...