- 通过winscp将window的git包上传到Linux的/root/目录下
#下载地址:http://3maio.com/html/git/packages/git-2.9.0.tar.gz
- 解压git
# tar -zxvf git-2.9.0.tar.gz
- 安装curl-devel
//使用yum安装之前,记得挂载 # yum -y install curl-devel
- 安装git
# cd git-2.9.0 # ./configure --prefix=/usr/local/git # make # make install
- 将git命令加入到环境变量# vim /etc/profile
//将下面这一行放到/etc/profile文件末尾 export PATH=/usr/local/git/bin:$PATH
时间: 2024-10-20 18:18:00