3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS6でgitのより新しいバージョンをchefでインストール

Posted at

背景

chefのcookbookについての検証結果を紹介します。

問題

chefのcookbookでgitをインストールすると、CentOS6の標準パッケージの1.7.1がインストールされます。
このバージョンでは周知の事象ですが、httpアクセスのbasic認証に不具合があるので、新し目のパッケージをインストールしてみます。

解法

yumリポジトリにRPM Forgeを追加して、別バージョンのgitをインストールします。
Berksfileにcookbookを指定します。

Berksfile
cookbook "yum-repoforge"
cookbook "git"

nodeのjsonファイルにrun_listで指定します。

nodes/centos6.json
{
        "run_list":[
                "recipe[yum-repoforge]",
                "recipe[git]"
        ]
}

後はノードへ実行します。

$ knife solo cook centos6

ノードにログインしてバージョンを確認してみます。

$ vagrant ssh
[vagrant@centos6 ~]$ git --version
git version 1.7.12.4
3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?