しばいぬびより

しばいぬとかしばいぬとか技術とか

Virtualbox+VagrantでCentOS in MacOSXしてみる

すぐに忘れちゃうので覚え書き。
VirtualboxVagrantはインストール済みだよ。

前提

Virtualbox 5.2
Vagrant 2.0

isoファイル準備

CentOSのisoファイルを用意。
今回は下記を使います。
http://ftp.riken.jp/Linux/centos/6.9/isos/x86_64/
CentOS-6.9-x86_64-minimal.iso

VagrantにOSファイルを登録

$ vagrant box add centos69 /hoge/CentOS-6.9-x86_64-minimal.iso
$ vagrant init centos69
A Vagrantfile has been placed in this directory. You are now ready to vagrant up your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on vagrantup.com for more information on using Vagrant.


Vagrant起動

$ vagrant up

CentOSにログインする

$ vagrant ssh
[vagrant@localhost ~]$ #こうなったらOK

あとはyumyumしたりしなかったり。

次はOpen LDAP使うぞーーー