一、安装git
1、检查系统是否已安装git
[root@172 ~]# git --version
bash: git: command not found...
2、yum安装git
[root@172 ~]# yum install git
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.sjtu.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Resolving Dependencies
.........
Installed:
git.x86_64 0:1.8.3.1-12.el7_4
Dependency Installed:
perl-Error.noarch 1:0.17020-2.el7 perl-Git.noarch 0:1.8.3.1-12.el7_4 perl-TermReadKey.x86_64 0:2.30-20.el7
Complete!
3、检查是否安装成功
[root@172 ~]# git --version
git version 1.8.3.1
二、卸载git
yum remove git