iOS安装 vitual box 和vagrant template
首先需要安装brew 最新的地址:http://brew.sh
bogon:~ wj$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/.
/usr/local/bin
==> The following directories will have their owner set to wj:
/usr/local/.
/usr/local/bin
==> The following directories will have their group set to admin:
/usr/local/.
/usr/local/bin
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password:
==> /usr/bin/sudo /usr/sbin/chown wj /usr/local/. /usr/local/bin
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown wj /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 3885, done.
remote: Compressing objects: 100% (3729/3729), done.
remote: Total 3885 (delta 33), reused 2352 (delta 21), pack-reused 0
Receiving objects: 100% (3885/3885), 3.37 MiB | 169.00 KiB/s, done.
Resolving deltas: 100% (33/33), done.
From https://github.com/Homebrew/homebrew
* [new branch] master -> origin/master
HEAD is now at 828c239 Add some more integration command tests.
==> Installation successful!
==> Next steps
Run `brew help` to get started
bogon:~ wj$
安装brew cask:
bogon:Desktop wj$ brew cask
==> Tapping caskroom/cask
Cloning into '/usr/local/Library/Taps/caskroom/homebrew-cask'...
remote: Counting objects: 3341, done.
remote: Compressing objects: 100% (3313/3313), done.
remote: Total 3341 (delta 55), reused 158 (delta 11), pack-reused 0
Receiving objects: 100% (3341/3341), 5.83 MiB | 117.00 KiB/s, done.
Resolving deltas: 100% (55/55), done.
Checking connectivity... done.
Tapped 1 formula (3318 files, 25M)
==> We need to make Caskroom for the first time at /opt/homebrew-cask/Caskroom
==> We'll set permissions properly so we won't need sudo in the future
Password:
brew-cask provides a friendly homebrew-style CLI workflow for the
administration of Mac applications distributed as binaries.
Commands:
audit verifies installability of Casks
cat dump raw source of the given Cask to the standard output
cleanup cleans up cached downloads and tracker symlinks
create creates the given Cask and opens it in an editor
doctor checks for configuration issues
edit edits the given Cask
fetch downloads Cask resources to local cache
home opens the homepage of the given Cask
info displays information about the given Cask
install installs the given Cask
list with no args, lists installed Casks; given installed Casks, lists staged files
search searches all known Casks
uninstall uninstalls the given Cask
update a synonym for 'brew update'
zap zaps all files associated with the given Cask
See also "man brew-cask"
bogon:Desktop wj$
安装virtual box:
bogon:Desktop wj$ brew cask install virtualbox
==> Downloading http://download.virtualbox.org/virtualbox/5.0.10/VirtualBox-5.0.10-104061-OSX.dmg
########################################### 59.8%
######################################################################## 100.0%
==> Running installer for virtualbox; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
Password:
Password:
==> installer: Package name is Oracle VM VirtualBox
==> installer: Installing at base path /
==> installer: The install was successful.
==> Sorry, try again.
🍺 virtualbox staged at '/opt/homebrew-cask/Caskroom/virtualbox/5.0.10-104061' (4 files, 87M)
bogon:Desktop wj$
安装Vagrant:
bogon:Desktop wj$ brew cask install vagrant
==> Downloading https://releases.hashicorp.com/vagrant/1.7.4/vagrant_1.7.4.dmg
######################################################################## 100.0%
==> Running installer for vagrant; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
==> installer: Package name is Vagrant
==> installer: Installing at base path /
==> installer: The install was successful.
🍺 vagrant staged at '/opt/homebrew-cask/Caskroom/vagrant/1.7.4' (6 files, 82M)
bogon:Desktop wj$
下载box:
在http://www.vagrantbox.es中选择想要的系统然后复制URL
bogon:wj_vm_git wj$ vagrant box add https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box --name wj_git
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'wj_git' (v0) for provider:
box: Downloading: https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box
box: Progress: 0% (Rate: 0/s, Estimated time remaining: 8:01:21)
也可以添加本地box 拷贝到当前目录即可。
bogon:wj_vm_git wj$ vagrant box add wj_git ubuntu-14.10-amd64.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'wj_git' (v0) for provider:
box: Unpacking necessary files from: file:///Users/wj/wj_vm_git/ubuntu-14.10-amd64.box
==> box: Successfully added box 'wj_git' (v0) for 'virtualbox'!
在目的路径下初始化虚拟机生成Vagrantfile 文件配置管理
bogon:wj_vm_git wj$ vagrant init
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.