LoginSignup
7
7

More than 5 years have passed since last update.

VagrantをMacで動作させてみた

Last updated at Posted at 2015-01-14

VagrantをMacに入れて動作させてみた

MacにVirtualBoxとVagrantをインストールして、Vagrantで仮想マシンを立ち上げ、接続するところまでやってみます。

VirtualBox
Vagrant

1.VirtualBox Vagrantのインストール

リンクから、Mac OS X版をダウンロードし、インストールします。

VirtualBox-Downloads
Vagrant-Downloads

インストール後、Vagrantのバージョンを確認します。

$ vagrant --version
Vagrant 1.6.2

確認できたらBoxを追加します。

2.Boxを追加する

Boxは、以下から確認することが出来ます。

vagrant-box-list

今回は、CentOS6.5を追加します。

$ vagrant box add chef/centos-6.5

3.仮想マシンを立ち上げる

$ mkdir -p ~/vagrant/centos6.5
$ cd ~/vagrant/centos6.5
$ vagrant init chef/centos-6.5
$ vagrant up

これでVirtualBox上に仮想マシンが立ち上がります。

4.仮想マシンに接続します

$ vagrant ssh

これで先ほど立ち上げた仮想マシンに接続することが出来ます。

7
7
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
7
7