centos7 阿里云 安装 git 2.2.1 脚本

#!/bin/bash
wget https://github.com/git/git/archive/v2.2.1.tar.gz
tar zxvf v2.2.1.tar.gz
cd git-2.2.1
make configure
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
make all
make install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
[root@iZbp12082f6cclytj56ggdZ ~]# vi install_git.sh 
[root@iZbp12082f6cclytj56ggdZ ~]# cat install_git.sh 
#!/bin/bash
yum remove git -y
wget https://github.com/git/git/archive/v2.2.1.tar.gz
tar zxvf v2.2.1.tar.gz
cd git-2.2.1
make configure
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
make all
make install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
    原文作者:小金子
    原文地址: https://segmentfault.com/a/1190000008302212
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞