centos 升级Git版本
1.源码编译
yum remove -y git #卸载旧版本Git yum install -y tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel asciidoc xmlto autoconf #安装依赖,否则一路报错.... wget https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz tar xf v2.2.1.tar.gz cd git-2.2.1 make configure ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv #添加 iconv 支持 make all doc #编译并生成帮助文档 make install install-doc install-html #安装程序 echo "export PATH=$PATH:/usr/local/git/bin" >> ~/.bash_profile echo "export GIT_SSL_NO_VERIFY=1" > ~/.bash_profile (如果不加入这句会出现fatal Peer certificate cannot be authenticated with known CA certificate) source ~/.bash_profile git --version
Git 项目地址:https://github.com/git/git
2.yum安装
Git文档:https://git-scm.com/download/linux
仓库文档:https://ius.io/setup
安装repo
1 2 3 | yum install \ https: //repo.ius.io/ius-release-el7.rpm \ https: //dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm |
安装指定版本
版本参考:https://github.com/iusrepo?q=git&type=all&language=&sort=
安装2.36
1 2 | yum install git236 git version |
"一劳永逸" 的话,有是有的,而 "一劳永逸" 的事却极少
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· winform 绘制太阳,地球,月球 运作规律
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· Manus的开源复刻OpenManus初探
· 写一个简单的SQL生成工具