查看centos版本
# cat /etc/redhat-release
CentOS release 5.5 (Final)
安装git
下载:
如果有老版本的git:
#git clone git@github.com:git/git.git
如果没有,使用wget或者在windows下面下载程序包并解压也是一样.
make:
#cd git
# make prefix=/usr all doc info
报错: git-compat-util.h:280:25: warning: openssl/ssl.h: No such file or directory #yum install openssl安装openssl,无效
报错: git-compat-util.h:280:25: warning: openssl/ssl.h: No such file or directory # yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker 参考: linux安装git方法 http://jingyan.baidu.com/article/e9fb46e16698687521f766ec.html
报错:ASCIIDOC git-add.html/bin/sh: line 1: asciidoc: command not foundmake[1]: *** [git-add.html] Error 127这里下载并执行make(./configure ;make ;make install)常用方法安装http://sourceforge.net/projects/asciidoc参考centos编译安装git最新版本 http://www.cppblog.com/Error/archive/2014/01/14/205365.aspx
#make prefix=/usr/ install
#vim /etc/profile
#export PATH=/usr/bin:$PATH
#source /etc/profile
然后再次使用git --version 查看git版本