LoginSignup
3
2

More than 5 years have passed since last update.

Cloud9でVagrantを使ってみる

Last updated at Posted at 2016-12-06

概要

元々ローカルでVagrant使っていたのですが、何か動作もっさりしてて。。
クラウドIDEとかなら何か変わるのかな、と妄想して試すためのメモ

前提

  • Vagrantをローカルで動かしたことがある
  • Cloud9が何者かを知っている

やってみること

Vagrantで、作った仮想環境でGitLabとRedmineの連携を試してみたいと思います。

やります

1.Cloud9はこれ選んだ

1.png

2.環境上にVagrantダウンロードした

まずは自分の環境確認

cat /proc/version
->Linux version 4.2.0-c9 (root@b197fb11a5c1) (gcc version 4.9.2 (Debian 4.9.2-10) ) #2 SMP Thu Oct 20 09:52:05 UTC 2016

(うわ、CentOS以外触ったことない。。なにこれ。。)

uname -a
->Linux ksyun-exp-4094368 4.2.0-c9 #2 SMP Thu Oct 20 09:52:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Vagrantのダウンロードページをみる

あったこれか
2.PNG

とりあえずwgetしてインストールする

wget https://releases.hashicorp.com/vagrant/1.9.0/vagrant_1.9.0_x86_64.deb
sudo dpkg --install vagrant_1.7.2_i686.deb

できたっぽい

vagrant -v
->Vagrant 1.9.0

3.VirtualBoxをダウンロードする

公式サイトにはこんなことが書いてあるようだったので実行

sudo vi /etc/apt/sources.list

#最後に以下を追加
deb http://download.virtualbox.org/virtualbox/debian raring contrib

sudo wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox

なんかうまくいったよう

動かして確認してみる

vagrant init --minimal

Vagrantfileとかができてる。やった

Vagrantfile修正してvagrant up

VirtualBox is complaining that the installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
instructions on how to fix this error.

すんげえ怒られた

VBoxManage --version

何かこのコマンド叩けと言われてるようだったので

WARNING: The character device /dev/vboxdrv does not exist.
         Please install the virtualbox-dkms package and the appropriate
         headers, most likely linux-headers-.

         You will not be able to start VMs until this problem is fixed.
4.3.36_Ubuntur105129

はい、怒られるのはわかってましたよ。

教えてぐーぐる先生!
Ubuntu: Virtualbox を起動しようとしてエラーが出る

virtualbox コマンドを発行した時に表示されていたエラーメッセージの中にある”linux-header”と関係があることが判明しました。つまり、カーネルの中にvirualboxが必要とするヘッダーが含まれていないという事。厳密には、カーネルと完全に同一バージョンのヘッダーパッケージが入っている必要があるという事のようです。確かに、3.13.0-51-lowlatency のヘッダーが出てきません。

なるほど・・(よくわかってない)

aptitude コマンドで、3.13.0-51 をキーワードを検索して、ヘッダーをインストールしました。

なんかaptitudeとかいう何かで検索してインストールすれば良いのかな??!!

aptitude search 4.2.0-c9
->bash: aptitude: command not found

諦めへんで

sudo apt-get install aptitude

検索できるようになったみたい

aptitude search 4.2.0-c9
->

なんと、検索結果ゼロ。。。

aptitude search 4.2.0これなら少しは出てきた。。。でもよくわからん

もうやだ、わからん

すんません、、解決手段わかれば追記します。。

追記:ダメでした

公式で確認したところ、VM系のツールはすべてサポートされていないようでしたw

3
2
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
3
2