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で仮想環境をサクッと作る!

Posted at

前置き

とりあえず早く仮想環境を準備したい!という方に。細かい説明は入れてません。
解説は後々に記載したいと思います。

前提条件

  • ホストはWindows10(未検証ですがおそらくMacもできます)
  • Vagrant 2.2.6
  • VirtualBox 6.0.14
  • 仮想環境のOSはCentOS7を導入するとします
  • ターミナルはGitBash使いました(Windowsの方はコマンドプロンプトやPowershellでも大丈夫です、macはターミナルで)

方法

下準備

1.pluginを更新

vagrant plugin update

2.hostsupdaterを入れる

vagrant plugin install vagrant-hostsupdater

3.適当にディレクトリを準備してVagrantfileを生成

vagrant init --minimal centos/7

4.Vagrantfileを下記に修正

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.provider "virtualbox" do |v|
   v.customize ["modifyvm", :id, "--ostype", "RedHat_64"]
  end
end

5.vagrantを立ち上げる

vagrant up

6.sshでゲストOSへ

vagrant ssh

これでひとまずは仮想環境の準備はできる(汗)

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?