LoginSignup
6
6

More than 5 years have passed since last update.

Vagrantを導入する

Last updated at Posted at 2015-10-19

・VirtualBoxをインストール

・Vagrantをインストール

・BOXファイルを作成、もしくはHTTP経由でサーバーから取得
(プロジェクト指定のBOXが作成済みの場合はそれを利用する)

・BOXファイルをaddする
例:vagrant box add centos7 /Users/user/Documents/centos7_php56.box

・vagrantを初期化
vagrant init centos7

・Vagrantファイルが作成されるので、編集する
例:
#config.vm.network "private_network", ip: "192.168.33.10"
の、コメントをはずす

config.vm.synced_folder "/var/www/xxxx/htdocs", "/var/www/xxxx/htdocs"
を追記

・自PCのhostsファイルにバーチャル環境の設定を追加する
例:
192.168.33.10 xxxx

・vagrant起動
vagrant up

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