如何套用别人网站模板,深圳软件培训机构名单,长沙做网站最好的公司有哪些,wordpress用户名中文说明
使用yum install git安装的git版本是1.8#xff0c;并不是最新版本#xff0c;使用gitlab-runner托管时候会拉项目失败#xff0c;这里使用编译源码方式安装最新版本的git。
基础环境安装
echo nameserver 8.8.8.8 /etc/resolv.conf
curl -o /…说明
使用yum install git安装的git版本是1.8并不是最新版本使用gitlab-runner托管时候会拉项目失败这里使用编译源码方式安装最新版本的git。
基础环境安装
echo nameserver 8.8.8.8 /etc/resolv.conf
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum install git curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker -y注意这里安装的git是旧版本的为了拉取git源码使用配置了dns为8.8.8.8使用阿里的yum源
拉取Git源码
git clone https://ghproxy.com/https://github.com/git/git.git这里使用了加速站点进行加速拉取源码
编译安装
cd git
make prefix/usr all
make prefix/usr install这里编译并安装到了/usr/bin下
配置TAB提示
cp contrib/completion/git-completion.bash ~/.git-completion.bash
cat ~/.bash_profile EOF
if [ -f ~/.git-completion.bash ]; thensource ~/.git-completion.bash
fi
EOF
source ~/.git-completion.bashgitlab-runner可以没有TAB提示但是我不能没有
校验版本
git version就可以看到是最新的Git了
一键脚本
#!/usr/bin/bash
echo nameserver 8.8.8.8 /etc/resolv.conf
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum install git curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker -y
git clone https://ghproxy.com/https://github.com/git/git.git
cd git
make prefix/usr all
make prefix/usr install
cp contrib/completion/git-completion.bash ~/.git-completion.bash
cat ~/.bash_profile EOF
if [ -f ~/.git-completion.bash ]; thensource ~/.git-completion.bash
fi
EOF
source ~/.git-completion.bash