VirtualBox and Vagrant are free, open-source tools that let developers easily create VMs on their local workstations. In this video, learn how find the right installer for your system and get these apps installed.
- [Instructor] To get up and running with NGINX, we'll be using a Ubuntu server, Sandbox environment, powered by VirtualBox and Vagrant. We'll use these applications along with exercise files developed for the course. The exercise files contain Vagrant files for VMs, that match specific lessons and other files I'll be using like a fully-designed website, custom error pages, and database files. If you're not using the exercise files, you can still follow along with a VM running Ubuntu server 1804. VirtualBox is a free and opensource application that will let us run virtual machines, or VMs, on standard computers like desktops and laptops.
Using VirtualBox, we'll be able to create VMs running the Ubuntu operating system where we'll install and configure NGINX. You can install VirtualBox by going to VirtualBox.org and clicking the big blue button, and then clicking the link that corresponds to your system. This downloads an installer. All you need to do is run the installer and accept the defaults. We won't need to interface with VirtualBox very much though. Instead, we'll be using Vagrant to control the creation and removal of our VMs, with VirtualBox running in the background.
Vagrant is also a free and opensource application that automates the process for creating VMs. With Vagrant, we can quickly and easily create VMs in a repeatable and predictable fashion. Vagrant uses files called base boxes to define the basic components of a virtual machine running on VirtualBox. Another file, called a Vagrant file, is used to customize and configure the base box. You can install Vagrant by first going to vagrantup.com and clicking download for the latest version. On the downloads page, choose the correct version for your system and follow the link.
Once the download completes, run the installer and accept the defaults. If you're on a Windows system, you might also consider installing VirtualBox and Vagrant with a Chocolatey package manager. Or, if you're on a Mac, you could also install these tools using the Homebrew package manager. I've already installed these on my system using all of the default options. Once you have the apps installed, open a command window on your system, either CMD or PowerShell on Windows, or Terminal on Mac. I'm running Terminal on a Mac. You can verify the applications are installed properly by running VBoxManage --version.
For the VboxManage command, note the capital letters in the name of the command. To verify Vagrant is installed properly, type vagrant --version. These commands should print their version for the respective application if it's installed properly.
- Installing NGINX on Linux
- Configuring a virtual host
- Installing PHP and MariaDB for the LEMP stack
- Securing sites with NGINX
- Creating SSL certificates
- Reverse proxies
- Load balancing