CentOS upgrade Git
CentOS6.5升级Git[编译方式]
卸载旧版git
1 | git --version |
下载/解压源码
1 | wget https://github.com/git/git/archive/v2.9.2.tar.gz |
编译、安装
1 | make configure |
make configure
产生Makefile文件并进行编译
./configure --prefix=/usr/local/git
通过configure命令对安装进行控制,将git安装到/usr/local/git
目录下。
make all doc
编译生成doc文件
sudo make install install-doc install-html
安装程序文件
环境变量配置
1 | sudo vim /etc/profile |
1 | git --version |
如果机器部署了其它需要依赖Git的服务(比如:GitLab、git、gogs等),升级后,需要重启下服务。本机安装的gogs在升级git后未重启服务进入项目就会提示
An error has occurred : exec: "git": executable file not found in $PATH
错误信息.
版权声明:
本文由Lomo创作和发表,采用署名(BY)-非商业性使用(NC)-相同方式共享(SA)国际许可协议进行许可,
转载请注明作者及出处,本文作者为Lomo,本文标题为CentOS upgrade Git.