6
6

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.

vagrantコマンドメモ

Last updated at Posted at 2013-08-02

virtualboxの事前ダウンロードを忘れずに。

インストール

mac

最新版を公式からdmgでインストール

windows

chocolateyからインストール

cinst vagrant

初期設定

vagrantファイル作成

cd [作業フォルダ]
vagrant init

boxファイル取得

vagrant box add box名 url

ex)
vagrant box add CentOS-6.4-x86_64-v20130427.box http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130427.box

vagrantファイル修正

VM起動

vagrant up

ssh設定

vagrant ssh [host名]ssh [host名]として接続したい

vagrant ssh-config [host名] >> ~/.ssh/config

よく使うコマンド

コマンド 内容
vagrant init 初期化
vagrant box add box名 url box登録
vagrant up VMインストール起動
vagrant ssh VM名 VMにssh接続
vagrant halt VM終了
vagrant destroy VM削除
6
6
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
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?