虚拟机下的linux安装git
1、先在window下下载好linux安装版本的git包
2、在远程连接的xshell中将 xftp 安装好
3、打开后一边 是windows 一边是linux
4、点击安装好的 xftp 将git的安装包放到linux下面
5、在linux里面就可以看到
6、用 tar -zxf git - 2.9.1.tar.gz -C /opt 解压到opt下(可以解压到任意目录下 建议解压到opt下)
7、cd /opt/git-2.9.1 然后make prefix=/usr/local/git install (得1-2分钟)
8、查看安装路径 whereis git
9、配置环境变量
修改“/etc/profile”文件(或者/etc/bashrc文件)。
vim /etc/profile
然后在文件的最后一行,添加下面的内容,然后保存退出。
export PATH=/usr/local/git/bin:$PATH
10、使用source命令立即生效
source /etc/profile
11、git -version 查看自己是否安装成功
不懂的可以随时留言提问 或者qq 1144109319