
Go to the VirtualBox download page, choose your operating system (Windows or macOS) and download and install the software. Step 1 - Install Virtual Box and Vagrant Install VirtualBox We're going to connect to the Ubuntu server though ssh to confirm that everything is running properly.Īfter this tutorial, learn to install a LAMP server on the environment we create.

In this tutorial, we're going to install Vagrant and VirtualBox, and install Ubuntu Server. This can reduce and eliminate bugs and errors that result from trying to develop code for a production server on an environment that does not match. For example, if you're using Digital Ocean or AWS to run a Virtual Private Server (VPS) in the cloud running Ubuntu, PHP, and MySQL, you can install your local version to have all the same versions of that software, while keeping your own computer's software untouched. Using VirtualBox and Vagrant, you can simulate the production environment of your app or website. Through the command line, you can grab any available OS, install it, configure it, run it, work inside of it, shut it down, and more. Vagrant is software that is used to manage a development environment. You can use VirtualBox to run entire sandboxed operating systems within your own computer. VirtualBox is basically inception for your computer. How to connect to the Ubuntu server we create.How to use Vagrant and VirtualBox in tandem to set up a local Ubuntu installation.If you're not familiar with any of that, please read the aforementioned article. This article that I wrote, How to Use the Command Line, will tell you everything you need to know, from moving around directories, creating files, and sshing into servers.

The only prerequisite to this article is command line knowledge, and it is mandatory. Now that I've finally used them, I can see how fun and useful they are, and since I've just set everything up myself in 2017 with the most up-to-date installations I could find, I can share what I've learned with you. Thanks to my friend Timm Stelzer, I finally got over my fear of the unknown and delved into the world of virtual machines via Vagrant and VirtualBox. I've gotten to the point in my web development career where I can no longer avoid the words VirtualBox, Vagrant, and Docker.
