0
0

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基本操作

0
Posted at

仮想環境にcentosを入れる

vagrant box add [name] url

確認

vagrant box list

vagrant 初期化

vagrant init [box name]

ネットワークの設定

vi Vagrantfile
config.vm.network "private_network", ip: "192.168.33.10"

vagrant-vbguestをインストトール

sudo vagrant plugin install vagrant-vbguest

vagrant を実行する

vagrant up

vagrant をシャットダウンする

vagrant halt

guest hostのファイル共有

vi Vagrantfile
config.vm.synced_folder "../host_path", "/home/vagrant/guest_path"

vagrantfileの変更を反映するため、vagrantを再起動

vagrant reload

仮想環境にログイン

vagrant ssh

仮想環境から抜く

exit

仮装サーバ削除

vagrant destroy

仮装サーバの状態表示

vagrant status

box list の確認

vagrant box list

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?