Set up a CentOS virtual server with Vagrant

1 minute read

What is Vagrant

A command line tool for easily building virtual machines and managing virtual machines so that the same environment can be reproduced anywhere.


Procedure to install in Windows (64bit) environment

1. Install VirtualBox and Vagrant

DL and install each installer from the following URL.

  • Vagrant
  • VirtualBox

After installation, restart your PC and check the version at the command prompt.

>vagrant -v
Vagrant 2.1.2

2. Search for the Box you want to make

Search for the Box file to install at
For example, for CentOS, “bento / centos-7.3”.

3. Initialize Vagrant

First, create a dedicated folder

mkdir centos7

Initialize Vagrant

#This command is "2.You can check it with "Search for the Box you want to make"
vagrant init bento/centos-7.3

→ OK when Vagrantfile is created in the centos7 folder.

4. Edit Vagrantfile

~ = "bento/centos-6.7"
#↑ Here, the Box name specified at the time of vagrant init is set.
~ "private_network", ip: ""
#↑ Uncomment here and use your favorite IP address

4. Start the virtual machine

vagrant up

5. Log in to the virtual machine

Log in from an SSH client such as Rlogin.

–Destination host name
IP address written in Vagrantfile (

No. 22
–Username / Password
vagrant / vagrant
root / vagrant