LoginSignup
17
12

More than 5 years have passed since last update.

CentOS 5.xにgitを入れる

Last updated at Posted at 2014-07-04

発端

  • CentOS 5.8(Final)にyumでgitをインストールしようとするとNo package git available.と言われインストール出来ない。
cmd
# yum install git
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
Setting up Install Process
No package git 
  • 環境
cmd
# cat /etc/redhat-release ; arch
CentOS release 5.8 (Final)
x86_64

※ arch:アーキテクチャ確認コマンド(OSが32bit, 64bitとちらなのか)

gitのインストール

  • epelリポジトリの取得(2014/7現在で最新のものを確認)
cmd
# rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
  • epelリポジトリを指定してgitをインストール
cmd
# yum install --enablerepo=epel git
  • インストールの確認
cmd
# git --version
git version 1.8.2.1

→2014/7現在で最新のバージョンは1.9系なのでまあまあ。

  • ついでtigもインストール
cmd
# yum install --enablerepo=epel tig

所感

最初はパーケージをwget->makeでやろうとしたが依存関係のインストールで諦めた。
やはりyumのパッケージは遣りやすい。

参考URL
http://blog.hypermkt.jp/centos5-8%E3%81%AByum%E3%81%A7git%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B/

17
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
12