CentOSにgitの設定をする

さくらのVPSでCentOSを利用しているが、
ここで開発もまとめてやってしまいたいと思っているので、
githubを利用出来るように環境設定を行う。

yumではgitがリストにないため、インストールできない。

$ sudo yum install git
:
Setting up Install Process
No package git available.
Nothing to do

yumリポジトリにgitを含むものを追加

yumリポジトリにgitを含むリポジトリを追加する。
今回は2つのファイルを作成する。

/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


wgetpython-hashlib のrpmを取得して、rpmでインストール。
インストールする理由は、yum updateでError performing checksum失敗してしまうため。

$ wget http://skvidal.fedorapeople.org/hashlib/python-hashlib-20081119-2.x86_64.rpm
$ sudo rpm -ivh python-hashlib-20081119-2.i386.rpm
$ rpm -qa | grep python-hashlib
python-hashlib-20081119-2

yum updateで、gitのリポジトリを追加する。

$ yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
git                                                                                                                updates                                                                                               | 1.9 
:
updates/primary_db                                                                                    | 1.1 
:
Setting up Update Process
No Packages marked for Update

結果的にgitのインストールでまた違うエラーが発生してしまい、インストールは完了できなかった。
依存関係のあるモジュールが不足しているため、発生しているみたい。
ちょっと一旦、ここで打ち切って違うタイミングで解決させておきたい。

$sudo yum install git
:
:
--> Processing Dependency: libexpat.so.1()(64bit) for package: git
--> Processing Dependency: libcrypto.so.10()(64bit) for package: git
---> Package perl-Git.x86_64 0:1.7.4.3-1.fc13 set to be updated
--> Processing Dependency: perl(:MODULE_COMPAT_5.10.1) for package: perl-Git
--> Finished Dependency Resolution
git-1.7.4.3-1.fc13.x86_64 from git has depsolving problems
  --> Missing Dependency: libcurl.so.4()(64bit) is needed by package git-1.7.4.3-1.fc13.x86_64 (git)
perl-Git-1.7.4.3-1.fc13.x86_64 from git has depsolving problems
  --> Missing Dependency: perl(:MODULE_COMPAT_5.10.1) is needed by package perl-Git-1.7.4.3-1.fc13.x86_64 (git)
git-1.7.4.3-1.fc13.x86_64 from git has depsolving problems
  --> Missing Dependency: libexpat.so.1()(64bit) is needed by package git-1.7.4.3-1.fc13.x86_64 (git)
git-1.7.4.3-1.fc13.x86_64 from git has depsolving problems
  --> Missing Dependency: libc.so.6(GLIBC_2.7)(64bit) is needed by package git-1.7.4.3-1.fc13.x86_64 (git)
git-1.7.4.3-1.fc13.x86_64 from git has depsolving problems
  --> Missing Dependency: libssl.so.10()(64bit) is needed by package git-1.7.4.3-1.fc13.x86_64 (git)
git-1.7.4.3-1.fc13.x86_64 from git has depsolving problems
  --> Missing Dependency: libcrypto.so.10()(64bit) is needed by package git-1.7.4.3-1.fc13.x86_64 (git)
Error: Missing Dependency: libcrypto.so.10()(64bit) is needed by package git-1.7.4.3-1.fc13.x86_64 (git)
Error: Missing Dependency: libc.so.6(GLIBC_2.7)(64bit) is needed by package git-1.7.4.3-1.fc13.x86_64 (git)
Error: Missing Dependency: libcurl.so.4()(64bit) is needed by package git-1.7.4.3-1.fc13.x86_64 (git)
Error: Missing Dependency: libexpat.so.1()(64bit) is needed by package git-1.7.4.3-1.fc13.x86_64 (git)
Error: Missing Dependency: libssl.so.10()(64bit) is needed by package git-1.7.4.3-1.fc13.x86_64 (git)
Error: Missing Dependency: perl(:MODULE_COMPAT_5.10.1) is needed by package perl-Git-1.7.4.3-1.fc13.x86_64 (git)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.