centos7用命令行方式安装VirtualBox

Installing and using VirtualBox on CentOS

<!> VirtualBox (VB) development is progressing rapidly and the information on this page may be outdated. The Linux Downloads page now has yum repo configs. Unfortunately the RPM packages do not handle major version upgrades gracefully. The built-in update notifications when running VB are also deficient and will only notify of minor updates (i.e. 5.1.6->5.1.8), if that, and not more major version upgrades (i.e. 4->5). For now, older versions should be uninstalled before installing a new major version or the package upgrade will encounter RPM conflicts. The VB user manual should be read carefully; however, at this writing it does not do a good job of addressing RPM installations. See the VB site for the latest details. The good news is that the new versions have significant improvements and new features, and backwards compatibility with existing VMs has been excellent.

VirtualBox-6.1 (VirtualBox-6.1-6.1.28_147628) is currently available and supported. To get full 6.1 functionality you may also need the VirtualBox Extension Pack which provides support for USB 2.0/3.0 devices, and RDP and PXE boot for Intel cards.

See CentOS as a Guest OS in VirtualBox for information about using CentOS as a VB guest.

See also this Red Hat Developer article on VirtualBox.

Please note that VirtualBox is a product of Oracle Corporation. It is neither provided nor supported by the CentOS Project, although questions may be answered at the Fora or on the virtualization mailing lists.


下面讲一下安装步骤,不废话了,直接贴命令行

$ cd /etc/yum.repos.d
$ wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
$ yum --enablerepo=epel install dkms
$ yum groupinstall "Development Tools"
$ yum install kernel-devel
$ yum install VirtualBox-5.2

安装完成后可以试一下创建一个虚机

VBoxManage createvm --name "CentOS_magic" --ostype RedHat_64 --basefolder /VirtualBox --register
VBoxManage unregistervm CentOS_magic --delete

如果到这里都没问题就行了,安装完成!

有什么其他问题的,自己看官网介绍吧
https://wiki.centos.org/HowTos/Virtualization/VirtualBox

Guess you like

Origin blog.csdn.net/weixin_44388689/article/details/121118881