CentOS安装Vagrant

Vagrant使用VirtualBox实现虚拟化。

一、搭建编译环境

安装VirtualBox,需要安装内核编译环境,并且需要安装dkms,请执行以下命令

sudo yum update 
sudo yum install -y epel-release 
sudo yum install -y wget 
sudo yum install -y kernel kernel-headers kernel-devel 
sudo yum install -y dkms 

二、安装Virtualbox

# The VirtualBox provider is compatible with VirtualBox versions 4.0.x, 4.1.x, 4.2.x, 4.3.x, 5.0.x, 5.1.x, and 5.2.x. 

cd /etc/yum.repos.d 
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo 

yum install -y VirtualBox-5.0.x86_64 

如需更改Virtualbox 虚拟机的存储目录,请执行

mkdir /home/VirtualBox_VMs 
VBoxManage setproperty machinefolder /home/VirtualBox_VMs 

三、安装Vagrant

详见: https://www.vagrantup.com/downloads.html

四、下载Vagrant Box

详见: http://www.vagrantbox.es/

你可能感兴趣的:(CentOS安装Vagrant)