Skip to content

Instantly share code, notes, and snippets.

@Buravo46
Last active September 4, 2016 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Buravo46/2ce427afb07c874e2b785ce59db60ebf to your computer and use it in GitHub Desktop.
Save Buravo46/2ce427afb07c874e2b785ce59db60ebf to your computer and use it in GitHub Desktop.
【Vagrant】VirtualBox+Vagrant+CentOSで環境構築

前提

【OS】

Windowws 7

【インストール済みソフトウェア】 TeraTerm

VirtualBox

Vagrant 1.8.5

※1.8.5の場合は以下の設定を実施していること

Vagrant 1.8.5でLinux boxをvagrant upするとエラーが出る件について

実施手順

コマンドプロンプト上で以下の手順を実施

C:\Users\USER>mkdir centos

C:\Users\USER>cd centos

C:\Users\USER\centos>dir

C:\Users\USER\centos>vagrant box add CentOS7 https://github.com/tommy-muehle/puppet-vagrant-boxes/releases/download/1.1.0/centos-7.0-x86_64.box

C:\Users\USER\centos>vagrant init CentOS7

C:\Users\USER\centos>edit Vagrantfile
※config.vm.network "private_network", ip: "192.168.33.1が記載されている行をコメントアウト
※画面上部のFile→Save→Exitを選択

C:\Users\USER\centos>vagrant up

IP:192.168.33.10へSSHログイン出来ない場合は以下を参照して実施

[Vagrant]Vagrantfileで指定したipアドレスでアクセスができない場合の対応

TeraTermで作成した仮想環境へログインし、以下のコマンドを実施

$ sudo ln -sf /dev/null /etc/udev/rules.d/70-persistent-net.rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment