8
9

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.

MacOS 上に Centos 6.5 環境を VirtualBox, packer, vagrant で構築する。

Posted at

課題

MacOS 上に Centos 6.5 環境を VirtualBox, packer, vagrant で構築する。

構築環境

以下に設定のためのファイル一式を置いた。
https://github.com/katoy/using-packer

説明

操作欄の操作をすると、centos 6.5 が Virtuaxbox で動作するようになります。
ViatrulBox, vagrant, paker を事前に install しておく必要があります。

VirtualBox
vagrant
packer

環境

Oracle VM VirtualBox Manager 4.3.12
Vagrant 1.6.3
Packer v0.6.0
ruby 2.1.2
Macos 10.9.3

操作

$ cd centos
$ packer validate centos-6.5.json                    # json の内容をチェックします。
$ packer build -only=virtualbox-iso centos-6.5.json  # centos6.5 の iso を download し, Virtualbox 上で install します。
                                                     # その結果を vagrant 用の box にします。

$ cd ../vagrant                                      # vagrant  で 作成した box を利用できるようにします。
$ vagrant box add CentOS-65 box/virtualbox/CentOS-6.5-x86_64-VirtualBox.box
$ vagrant init CentOS-65
$ vagrant up
$ vagrant ssh
  exit
$ vagrant status
$ vagrant halt

vagrant/Vagrantfile-001 を使って provison すろと、 httpd, php, postgres が稼働する環境になります。

プラウザで http://192.168.33.10/http://192.168.33.10/info.php にアクセスしてください。

参考

8
9
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
8
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?