#
Create a Linux VM with an HTTP Server on it
This tutorial explains to you how to create a Linux VM with an HTTP Server on it. I will use a Virtual Box provider.
In order to create your first virtual machine CentOS based wit HTTP server installed on it using Vagrant and Virtual Box (must be already installed), first of all you have to create the folder of the project ( Linux-HTTP directory in my case ) :
As you can see the folder is empty.
Go under the project folder and run the command vagrant init centos/7
:
The command download the Vagrantfile of the project from the Vagrant Cloud. In order to see all the available Vagrant Boxes you can go to the https://app.vagrantup.com/boxes/search.
Now you can edit the Vangrantfile and add the following lines:
Run the vagrant up
command to start the new Virtual Box machine:
As you can see in the image above, Vagrant download all it needs and create the new Virtual Box machine.
Now you can open the Virtual Box and see that the machine is running:
Info
In order to connect to the new virtual machine you can use root
and the default password vagrant
.