Set up a CentOS virtual server with Vagrant

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

Procedure to install in Windows (64bit) environment

1. Install VirtualBox and Vagrant

DL and install each installer from the following URL.

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 https://app.vagrantup.com/boxes/search. 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

~
config.vm.box = "bento/centos-6.7"
#↑ Here, the Box name specified at the time of vagrant init is set.
~
config.vm.network "private_network", ip: "192.168.33.10"
#↑ 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 (192.168.33.10)

--Port No. 22 --Username / Password vagrant / vagrant root / vagrant

Recommended Posts

Set up a CentOS virtual server with Vagrant
[Ubuntu] Set up a Nukkit server
Set up ImpressPages 5.0 with LAMP on CentOS 7.3
Set up GitLab with docker
Set up Gitolite on CentOS 7
Build a CentOS 8 virtual environment on your Mac with VirtualBox
Set up a MineCraft Paper server on Ubuntu 20.04.1 LTS ② Update
How to set up a proxy with authentication in Feign
Launch a stub server with WireMock
Build Virtual Box & Vagrant & Centos7 & GitLab
Build Virtual Box & Vagrant & Centos7 & Artifactory
A memorandum with NTP (chrony) set
A story of connecting to a CentOS 8 server with an old Ansible
Easily set up a Jenkins server on AWS using Bitnami's AMI
Minimal steps to set up a Ruby environment with rbenv on Ubuntu 20.04
Build DNS server with CentOS8 and bind
Set up Docker Registry locally on CentOS 7
Create a simple gateway server by setting masquerade with firewall-cmd of CentOS8
Set up Metabase service on Windows Server 2012
How to add a virtual disk to Linux (CentOS7) on VirtualBox to free up space
[Memo] Create a CentOS 8 environment easily with Docker
Prepare a LEMP Ubuntu 18 server with Ansible Galaxy
Create a web api server with spring boot
Set up a webhook in Shopify's custom app
Play down with Raspberry PI4 as a server. Part 2
[Android / Java] Set up a button to return to Fragment
Steps to set up Postfix and Dovecot on CentOS 8.3
Create a user with an empty password on CentOS7
Setting up the CentOS 8KVM hypervisor and CentOS virtual machine
Set up a Db2 DB container and insert a little data