The Host

The scripts for setting up Drupal can be run, e.g. in Amazon cloud service or Orcale Virtual Box running ubuntu.

Amazon Web Service, Elastic Compute Cloud

On AWS EC2, launch an instance with Ubuntu Server 16.04 LTS. First I setup security groups for http and ftp.

  • for http enable tcp port 80
  • for ftp enable tcp port 20-21 and tcp ports 1024-1048, more details in the setup of vsftpd

Log into the cloud server with ssh and continue to install software on ubunty.

Oracle Virtual Box

I run my development environment in a virtual machine, with GitNetBeans and Chrome on a host computer. For the virtual machine I am using VirtualBox together with Vagrant.

As host I have used a MacBook Pro from 2010 with 4 GB of ram running OS X Yosemite and also a Lenovo Yoga 500 with 4GB of ram running Windows 10.  On the Lenovo you need to enable virtualisation in the bios.

Ok, ready to go. One time only, I prepare the host by installing Git, Netbeans, Chrome, VirtualBox and Vagrant. On OS X I run the following in Terminal, on Windows 10 I use GitBash.

For Vagrant I add a plugin

vagrant plugin install vagrant-hostsupdater

which ensures that /etc/hosts is synchronized with the vm. On Windows 10 you need to set the permissions for %SystemRoot%\system32\drivers\etc\hosts to allow modifications.

After the required software is installed on the host you won’t need to change it anymore.

Every time I need a new vm I do the procedure explained below. When I don’t want to edit configuration files and do commands by hand, I use my Github instructions.

I create a working directory for the vm, the name is not important, e.g. mkdir ~/ts64-0816 and step into this directory.


I prepare the vm with

vagrant init bento/xenial64

This creates a Vagrantfile in the directory. I add a few options and the results looks like this Vagrantfile, where I have also remove the comments. If you prefer a desktop version change the option as shown below, but beware that your pc requires more power to give a good experience when using the desktop. = “box-cutter/ubuntu1604-desktop”

The synced_folder option is convenient when you need access to your files on the host. In my vm this maps my files to ~/host.

config.vm.synced_folder “~”, “/home/vagrant/host”

The vm needs to be given an IP network address matching and a local domain name, this is done with :private_network, ip: “”
 config.vm.hostname = “”

I create the vm and power it up. The very first time I do this it will take a few minutes to download a box image. When I do it again later it will go much faster.

vagrant up

I establish an ssh to the vm:

vagrant ssh

And now I am ready to install software on ubunty.

Leave a Reply

Your email address will not be published. Required fields are marked *