los*_*jos 46
您可以使用此处或此处Git 官方站点上提供的IUS 存储库( https://ius.io/ ) 。它包含预构建的二进制文件。x86_64
为此,请运行(以 root 身份):
yum install epel-release
yum remove git
rpm -U https://centos7.iuscommunity.org/ius-release.rpm
yum install git2u
Run Code Online (Sandbox Code Playgroud)
(如果您没有使用 CentOS,centos7
可以替换为centos6
或rhel{6,7}
)。
注意:一些用户报告说没有更多的包叫做git2u
. 您也可以尝试使用软件包git222
或git224
在这种情况下。
另一种选择是使用另一个 RPM 存储库 ( i386
& x86_64
):
sudo yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm
sudo yum install git
Run Code Online (Sandbox Code Playgroud)
小智 15
从源代码构建非常简单。Digital Ocean 有一个关于在 CentOS 7 上从源代码构建 Git的很好的指南。将生成的二进制文件放在 CentOS 7 系统(默认情况下,包含在 $PATH 中)的 /usr/local/bin/ 中,您就可以开始了。
当然,您更喜欢包/使用 repo,但是鉴于您的情况,我会毫不犹豫地自己构建它。
一般信息;推送部署是在Git 2.3.0中引入的。确保使用此版本或更高版本。
jdh*_*hao 14
CentOS 7 对我有用的是什么:
yum install \
https://repo.ius.io/ius-release-el7.rpm \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum remove git
yum install git236
Run Code Online (Sandbox Code Playgroud)
参考:
Kir*_*rby 13
我对 CentOS 7.2 有这种方法:
rpm -U http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm \
&& yum install -y git
Run Code Online (Sandbox Code Playgroud)
目前我有2.10.0
GIT 版本。
或者对于 CentOS 7.1 相同的路径但是wandisco-git-release-7-1.noarch.rpm
.
你可以检查可用的版本http://opensource.wandisco.com/centos/7/git/x86_64/
Red Hat 维护着 Git 2.9 的软件集合:
https://www.softwarecollections.org/en/scls/rhscl/rh-git29/
这是在 CentOS 上获取 Git 2.x 最简单、最安全的方法。
如今,端点git2u
上有一个合适的 git 包(不是):
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum -y install git
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
70566 次 |
最近记录: |