Linux安装git服务

xiaoxiao2025-05-02  9

centos6.5 安装git(已测试通过)

1.安装编译git时需要的包,提前安装

# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel # yum install gcc perl-ExtUtils-MakeMaker

2.删除已有的git(*为通配符)

# yum -y remove git*

3.下载git源码,进入 https://mirrors.edge.kernel.org/pub/software/scm/git/ 网址浏览自己想要的git包,本人选择的最新版本2.9.5

# cd /usr/src # wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz # tar xzf git-2.9.5.tar.gz

4.执行编译安装

# cd git-2.9.5 # make prefix=/usr/local/git all # make prefix=/usr/local/git install # echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc # source /etc/bashrc

5.检查一下版本号,输出 git version 2.9.5 

# git --version

6.添加用户组

TODO 参考教程网站: http://www.cnblogs.com/dee0912/p/5815267.html 遇到问题疑惑: http://yanue.net/post-163.html

 

转载请注明原文地址: https://www.6miu.com/read-5029624.html

最新回复(0)