It is a record when the development environment is started from the vagrant BOX created in Record of creating Ruby development environment.
Create a directory to launch vagrant
pxedhcp1:Vagrant maho$ mkdir RubyDev4
pxedhcp1:Vagrant maho$ cd RubyDev4
pxedhcp1:RubyDev4 maho$ ls -la
total 0
drwxr-xr-x 2 maho staff 68 8 16 15:08 .
drwxr-xr-x 21 maho staff 714 8 16 15:08 ..
Check the list of boxes
pxedhcp1:RubyDev4 maho$ vagrant box list
RoRDev_Ubuntu14 (virtualbox, 0)
Ubuntu14.04_minimam (virtualbox, 0)
pxedhcp1:RubyDev4 maho$ vagrant init RoRDev_Ubuntu14
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.
Edit the Vargrantfile. The contents of editing are 2GB of memory, 2 CPUs, and addition of private LAN.
pxedhcp1:RubyDev4 maho$ ls -la
total 8
drwxr-xr-x 3 maho staff 102 8 16 15:09 .
drwxr-xr-x 21 maho staff 714 8 16 15:08 ..
-rw-r--r-- 1 maho staff 3027 8 16 15:09 Vagrantfile
pxedhcp1:RubyDev4 maho$ vi Vagrantfile
Start the virtual machine.
pxedhcp1:RubyDev4 maho$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'RoRDev_Ubuntu14'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: RubyDev4_default_1439705471918_64982
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.3.10
default: VirtualBox Version: 5.0
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /Users/maho/Vagrant/RubyDev4
log in.
pxedhcp1:RubyDev4 maho$ vagrant ssh
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Sun Aug 16 05:53:19 2015 from 10.0.2.2
vagrant@vagrant-ubuntu-trusty:~$ df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/sda1 39685 2291 35356 7% /
none 1 0 1 0% /sys/fs/cgroup
udev 991 1 991 1% /dev
tmpfs 201 1 200 1% /run
none 5 1 5 1% /run/lock
none 1002 0 1002 0% /run/shm
none 100 0 100 0% /run/user
vagrant 953050 157585 795465 17% /vagrant
Check the version of each tool and complete
vagrant@vagrant-ubuntu-trusty:~$ ruby -v
ruby 2.0.0p643 (2015-02-25 revision 49749) [x86_64-linux]
vagrant@vagrant-ubuntu-trusty:~$ node -v
v0.12.7
vagrant@vagrant-ubuntu-trusty:~$ python --version
Python 2.7.10
Recommended Posts