Centos7.X安装VirtualBox-6.0 Vagrant

VirtualBox-6.0安装

参考:https://www.if-not-true-then-false.com/2010/install-virtualbox-with-yum-on-fedora-centos-red-hat-rhel/

参考:https://www.cnblogs.com/hongdada/p/9578849.html

参考:https://www.howtoing.com/how-to-install-vagrant-on-centos-7

1.安装Repo文件

cd /etc/yum.repos.d/

wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

2.安装最新的包和检查kernel版本

yum update

rpm -qa kernel | sort -V | tail -n 1

uname-r

reboot

3.安装依赖包

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

yum install binutils gccmakepatch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

4.安装VirtualBox最新版Version6.0

yum install VirtualBox-6.0

5.重新编译kernel

/usr/lib/virtualbox/vboxdrv.sh setup

6. Add VirtualBox User(s) to vboxusers Group

usermod-a -G vboxusers root

7. 启动VirtualBox

启动:VirtualBox (这个方式会报错误)

用下面的两个方式启动:

systemctl start vboxdrv.service

systemctl status vboxdrv.service

Vagrant安装

1. 下载 

wget https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.rpm

2. 安装

在下载的目录 下运行

yum -y localinstall vagrant_2.2.4_x86_64.rpm

3. 运行

# mkdir ~/vagrant-home 

# cd ~/vagrant-home

# vagrant init centos/7

# vagrant up

你可能感兴趣的:(Centos7.X安装VirtualBox-6.0 Vagrant)