linux 安装git
来源:互联网 发布:java类加载机制面试题 编辑:程序博客网 时间:2024/06/06 23:55
我的gentos 用的6.5
在Gentos5里yum没有git依赖包,到了6时yum源中已经有了git ,但是版本是1.7.X的,有些老。
sudo yum install git //安装
这时git --version //好像是1.7.1
用git clone 时会报错,需要升级版本。
源码安装:
1、sudo yum update 更新系统
2、
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker安装依赖包
3、下载git 源码包并压缩
wget https://github.com/git/git/archive/v2.3.0.zipunzip v2.3.0.zipcd git-2.3.04、编译安装
将其安装在“/usr/local/git”目录下。
make prefix=/usr/local/git allsudo make prefix=/usr/local/git install
5、查看版本
git --version 这时是旧版本,因为它默认使用了/usr/bin下的git,
whereis git //查看 git 路径
6、修改路径
sudo vim /etc/profile
按i 进入编辑,到最后一行,插入export PATH=/usr/local/git/bin:$PATH"Esc" 输入 :wq 保存退出
source /ect/profile 应用修改。
这时git --version //2.3.0
7、设置git
git config --global user.name
git config --global user.email
这时用git clone 就可以了。
2、
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
0 0
- linux 安装git--fedora
- Linux git 安装
- linux安装git
- linux下安装git
- linux git安装
- Linux 下安装 git
- linux---git---安装
- Linux下安装git
- linux git的安装
- Linux 下安装 GIT
- linux yum git 安装
- Linux 安装Git Server
- linux 安装git
- linux安装git
- linux git 安装
- linux git 安装
- Linux下安装Git
- Linux下安装Git
- isNaN,NaN详细解释
- 云端卫士实战录 React + Redux 前端项目实践
- git(3) -- git fork
- 自定义组合控件实现布局重用
- 【zzulioj 1902 985的因子对难题】
- linux 安装git
- iOS 弹出的键盘被window遮挡住了
- ZZULI 1904: 小火山的股票交易
- SSM框架运行原理
- trigger抛出异常ORA-04091:table ...... is mutating, trigger/function may not see it
- 程序猿需要了解的CPU Cache
- Myeclipse下部署项目以及JSP的连接
- Html控件和Web控件的比较分析
- iOS 手势笔记