VirtualBox のインストール

XAMPP Windowsでのテストではうまく動かないモジュールとかもあるので、
Linuxサーバーでテストできれば、より本番に近い環境でテストできます。

VirtualBox は https://www.virtualbox.org/ からダウンロードします。

VirtualBox のインストールと、Linux のインストール

VirtualBox のインストールは「Next」を押していくだけなので説明を省きます。
Linux は手軽な Ubuntu を使います。インストール方法はここを。

VirtualBox Guest Additions のインストール

VirtualBox のメニューからは上手くインストール出来ないので、手動でインストールします。

サーバー側で以下のコマンドを実行し、VirtualBox Guest Additions をインストールします。

$ sudo apt-get -y install make gcc
$ sudo mount /dev/sr0 /mnt
$ cd /mnt
$ sudo ./VBoxLinuxAdditions.run

共有フォルダの設定

仮想サーバーにファイルを転送する手間をなくすため、web ページを共有させます。

まず、windows 側の共有したいフォルダを、VirtualBox に設定。

仮想サーバー側でマウント。

$ sudo mkdir /var/www/hoge
$ sudo mount -t vboxsf hoge /var/www/hoge
毎回マウントするのは面倒なので rc.local に以下を記述。 /etc/rc.local
# By default this script does nothing.
mount -t vboxsf hoge /var/www/hoge
exit 0

web/virtualbox_のインストール.txt · 最終更新: 2018/03/18 09:56 (外部編集)
 
特に明示されていない限り、本Wikiの内容は次のライセンスに従います: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki