安装git和配置
-
yum -y update
-
yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
-
$ wget https://github.com/git/git/archive/v2.3.0.zip
$ unzip v2.3.0.zip
$ cd git-2.3.0
-
将其安装在“/usr/local/git”目录下。
make prefix=/usr/local/git all
make prefix=/usr/local/git install
-
你可以用下面的命令查看git所在的路径:
$ whereis git
git: /usr/bin/git /usr/local/git /usr/share/man/man1/git.1.gz
-
vim /etc/profile
然后在文件的最后一行,添加下面的内容,然后保存退出。
export PATH=/usr/local/git/bin:$PATH
-
source /etc/profile