LoginSignup
5
5

More than 5 years have passed since last update.

Web開発のためのVirtualbox + Ubuntu on OS Xの基本設定

Posted at

Setup ssh

Install openssh-server

$ sudo apt-get install openssh-server

.ssh directory

$ mkdir ~/.ssh
$ chmod 700 ~/.ssh
$ touch ~/.ssh/authorized_keys
$ chmod 600 ~/.ssh/authorized_keys

And you add your public key (ex. id_rsa.pub) to authorized_keys

Setup ufw

$ sudo ufw enable
$ sudo ufw allow 80/tcp
$ sudo ufw allow 22

Setup Apache

$ sudo apt-get install apache2

Setup Virtualbox

  • In Network > NAT > Advanced, you add 2022 and 22 (this is just an example)
  • In Network, add Bridge Addaptor and eth0
  • In Display, you check 3D Accelarator
  • In General, you checkout guide in full screen

Confirm now environment

Now you can confirm using a browser in host computer. Using ip address which appears when you type ifconfig in guest computer. (ex. 192.168.33.56) You can check using the browser if you can connect using 80 port.

5
5
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
5
5