【簡易版】Vagrantを利用した仮想サーバ開発環境の立ち上げまでの7つの手順

【簡易版】Vagrantを利用した仮想サーバ開発環境の立ち上げまでの7つの手順

Vagrantを利用した仮想サーバ開発環境の立ち上げ手順をまとめました。超簡易版です。

1.欲しい環境のboxファイルを探す

http://www.vagrantbox.es/ などから探す。

ダウンロードまたはURLを取得する。

2.vagrant に boxを追加する

$ vagrant box add 任意box名 boxファイルパス(ダウンロードしたファイルパスまたはURL)

3.vagrant box 確認

$ vagrant box list
任意box名 (virtualbox, 0)

で任意box名で追加されている事を確認する。

4.Vagrantfile生成

$ vagrant init 任意box名
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

5.Vagrantfile確認

カレントディレクトリに出来たVagrantfileを

$ vi Vagrantfile

で確認する。

config.vm.box = "任意box名"

となっている事を確認する。

6.vagrant 起動

$ vagrant up

7.vagrantへssh接続

$ vagrant ssh

これでサーバが立ち上がったのであとはお好きば開発環境構築を。

他のVagrantまとめ記事

他にもVagrantについてまとめた記事があります。

https://normalblog.net/system/vagrant_matome/

https://normalblog.net/system/vagrant_box/

https://normalblog.net/system/extension_compression/

https://normalblog.net/system/vagrant-centos7-apache-mariadb/

Comments

No comments yet. Why don’t you start the discussion?

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です