2011/05/05

install git : linux(centOS)













I can't install "git" by using yum on CentOS.
Because the package "git" is not in yum "default" repository.

1. add 2 file

/etc/yum.repos.d/git.repo

-----
[git]
name=Base git repository
baseurl=http://www.kernel.org/pub/software/scm/git/RPMS/$basearch
enabled=1
gpgcheck=0

----

/etc/yum.repos.d/rpmforge.repo
----

[rpmforge]
name = Red Hat Enterprise $releasever - RPMforge.net - dag
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
enabled = 0
gpgcheck = 0

----


2. if checksum error is occurred,
#yum update
http://www.kernel.org/pub/software/scm/git/RPMS/i386/repodata/primary.xml.gz: [Errno -3] Error performing checksum

- download site
http://pkgs.org/centos-5-rhel-5/atrpms-bleeding-i386/python-hashlib-20081119-3.i386.rpm.html

2-1. wget http://dl.atrpms.net/el5-i386/atrpms/bleeding/python-hashlib-20081119-3.i386.rpm
2-2. rpm -ivh python-hashlib-20081119-3.i386.rpm

reference : http://d.hatena.ne.jp/miau/20100404/1270384404


3. yum install git

3-1. yum install git --enablerepo=rpmforge

3-2. git --version

0 件のコメント:

コメントを投稿