安装git
yum install git
检查git版本
git –version
发现不是较新的版本或者是我们想要的版本
移除该版本git
yum remove git
下载编译工具
yum -y groupinstall Development Tools
下载依赖包
yum -y install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel
下载 Git 最新版本的源代码
wget https://www.kernel.org/pub/software/scm/git/git-2.32.0.tar.gz
登录https://github.com/git/git/releases查看git的最新版。不要下载带有-rc的,因为它代表了一个候选发布版本。
https://github.com/git/git/archive/refs/tags/v2.32.0.tar.gz
解压
tar -zxvf git-2.9.5.tar.gz
进入目录配置
cd git-2.32.0
./configure –prefix=/usr/local/git
安装
make && make install
配置全局路径
export PATH="/usr/local/git/bin:$PATH"
source /etc/profile
以上就是使用yum在Centos7上安装Git服务器的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号