git的安装
安装依赖:
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
下载git源码:
wget https://www.kernel.org/pub/software/scm/git/git-1.9.0.tar.gz
编译安装:
tar zxvf git-1.9.0.tar.gz cd git-1.9.0 ./configure --prefix=/usr/local/git make make install
查看能否运行
/usr/local/git/bin/git --version
配置环境变量,编辑文件:vi /etc/profile
export PATH=$PATH:/usr/local/git/bin
生效环境变量
source /etc/profile
配置公钥文件
cp 公钥文件 /root/.ssh/id_rsa cd /root/.ssh/ chmod -R 600 id_rsa # 设定权限
测试拉取代码
git clone [git地址]
安装完毕!
其它信息:git服务端安装