在linux上安装git cmake工具

安装git工具

1、首先下载zlib,   http://zlib.net/;  git工具:https://github.com/git/git/archive/master.tar.gz。下载后是两个tar.gz包

(git-master.tar.gz,zlib-1.2.8.tar.gz)

2、上传到linux服务器,解压两个压缩包.

3、执行 ./configure && make && make install 安装zlib.

4、执行以下命令编译git  make NO_OPENSSL=YesPlease  NO_CURL=YesPlease prefix=/usr all

5、执行以下命令安装git  sudo make NO_OPENSSL=YesPlease  NO_CURL=YesPlease prefix=/usr install

6、对需要使用git的用户配置环境变量:

在主目录的.bash_profile或者/etc/profile文件加入设置环境变量
export PATH=/usr/libexec/git-core:$PATH
然后重启登录或者source一下该文件使其生效。

 

发表评论

邮箱地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>