Skip to content

Instantly share code, notes, and snippets.

@YoshihitoAso
Last active August 29, 2015 13:56
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 YoshihitoAso/9048091 to your computer and use it in GitHub Desktop.
Save YoshihitoAso/9048091 to your computer and use it in GitHub Desktop.
[Vagrant][Ubuntu]vagrantでubuntuをインストール

VagrantでUbuntuをインストール

※Vagrantが既にインストール済みの状態からの説明です。

以下のURLからインストールしたいOSのURLを探してくる。

http://www.vagrantbox.es/

ここではOfficial Ubuntu 12.10 daily Cloud Image amd64 (Guest Additions)を利用することにする。

任意のディレクトリで以下のコマンドを実行する。

$ vagrant box add ubuntu http://cloud-images.ubuntu.com/quantal/current/quantal-server-cloudimg-vagrant-amd64-disk1.box

そうすると

$ vagrant box add ubuntu http://cloud-images.ubuntu.com/quantal/current/quantal-server-cloudimg-vagrant-amd64-disk1.box
Downloading or copying the box...
�[0KExtracting box...ate: 3298k/s, Estimated time remaining: --:--:--)
The box you're attempting to add already exists:

Name: ubuntu
Provider: virtualbox

と、こんな感じでダウンロード出来るはず。

ダウンロードが完了したら、

$ vagrant init ubuntu
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 up

でUbuntuサーバが起動する。

Windows環境の場合、SSHクライアントを利用して

Host: 127.0.0.1
Port: 2222
Usr/Pwd: vagrant/*******

とかの接続情報で接続出来る。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment