> CentOS > CentOS入门 >

修改Centos的系统时间为北京时间

由于直接使用yum 安装安装1.7版本的旧git,github要求1.8.3 以上

git是用ruby编写的,所以应该要安装ruby,采用源码安装

配置源

cd /etc/yum.repo/
mkdir bak
mv * ./bak
#配置163的源
curl -L http://mirrors.163.com/.help/CentOS6-Base-163.repo  > CentOS6-Base-163.repo 
#配置epel的源
rpm -ivh http://mirrors.ustc.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
#更新一下包
yum update
  • 1

安装依赖

yum install ruby
yum install gcc
yum install gcc-g++
yum install make
yum install libffi-devel 
yum install openssl-devel.x86_64
yum install python-devel
yum install vim
yum install curl-devel
yum install perl-ExtUtils-MakeMaker.x86_64
yum install tcl tk
yum install gettext 
yum install asciidoc
yum install xmlto
  • 1

编译安装

#下载解压
curl  -O https://www.kernel.org/pub/software/scm/git/git-2.0.0.tar.gz 
tar -zxvf git-2.0.0.tar.gz 
cd git-2.0.0

make configure ;# as yourself
./configure --prefix=/usr ;# as yourself
make all doc ;# as yourself
make install install-doc install-html;# as root

(责任编辑:IT)