hello-world
webエンジニアのメモ。とりあえずやってみる。

[Mac]Vagrant1.0.7からVagrant1.2.2に更新

公開日時

手元のmacにインストールされているvagrantのバージョンが1.0.7だったので最新の1.2.2に更新しました。

gemで入れると1.0.7がインストールされるので、1.2.2を入れるには 公式サイトからdmgファイルをダウンロードしてインストールする必要があります。

更新方法

  • 現状のバージョンを確認
vagrant -v

Vagrant version 1.0.7
  • vagrant1.0.7をアンインストール
gem uninstall vagrant
  • 公式サイトからv1.2.2のdmgファイルをダウンロードしてインストール

  • インストール後のバージョン確認

vagrant -v

Vagrant version 1.2.2

これで1.2.2に更新できました。

動作確認

インストールは無事にできたのですが、既存マシンを vagrant up しようとしたらエラーが発生しました。

cd ~/vagrant
vagrant up

A Vagrant 1.0.x state file was found for this environment. Vagrant has
gone ahead and auto-upgraded this to the latest format. Everything
should continue working as normal. Beware, however, that older versions
of Vagrant may no longer be used with this environment.

However, in case anything went wrong, the old dotfile was backed up
to the location below. If everything is okay, it is safe to remove
this backup.

Backup: /Users/xxxx/vagrant/.vagrant.v1.1368490599
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The box 'base' could not be found.

baseが見つからない・・・

  • boxの確認
vagrant box list

base (virtualbox)

baseは存在している模様・・・

  • centos という名前で新規にboxを追加
vagrant box add centos http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130309.box
  • boxの確認
vagrant box list
base   (virtualbox)
centos (virtualbox)

centos のboxが追加されました

  • base box は削除しておく
vagrant box remove base virtualbox
  • Vagrantfileの設定を変更
config.vm.box = "centos"
  • vagrant起動
vagrant up
  • ssh接続確認
ssh vagrant

# ssh接続情報未設定の場合は以下を実行して、configに追加しておく
# vagrant ssh-config --host vagrant >> ~/.ssh/config

これで無事に1.2.2に更新できました。


Related #mac

macを買ったらとりあえずファンクションキーの動作を変更する

昨日に続きまして、macを買ったらとりあえず変更しておきたいキーボード設定です。

Web制作から日常使用まで、とりあえず入れている便利なChrome拡張一覧

最近、Macを新しくセットアップし直す機会があったので、Chrome拡張も整理してみました。