centos7 安装 virtualbox

sudo yum update
sudo yum install –y patch gcc kernel-headers kernel-devel make perl wget
sudo wget http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo -P /etc/yum.repos.d
sudo yum install VirtualBox-6.1
wget https://download.virtualbox.org/virtualbox/6.1.22/Oracle_VM_VirtualBox_Extension_Pack-6.1.22.vbox-extpack
sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.22.vbox-extpack

参考:https://phoenixnap.com/kb/how-to-install-virtualbox-centos-7