我這裡選用的虛擬機器軟體為virtualbox
下載
wget http://download.virtualbox.org/virtualbox/5.2.2/VirtualBox-5.2-5.2.2_119230_el7-1.x86_64.rpm
新建檔案
vim /etc/yum.repos.d/virtualbox.repo
寫入以下內容
[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
更新yum
yum clean all
yum makecache
檢視yum包
yum list | grep virtualbox
VirtualBox-4.3.x86_64 4.3.40_110317_el7-1 virtualbox
VirtualBox-5.0.x86_64 5.0.40_115130_el7-1 virtualbox
VirtualBox-5.1.x86_64 5.1.30_118389_el7-1 virtualbox
VirtualBox-5.2.x86_64 5.2.2_119230_el7-1 virtualbox
想安裝哪個就安裝哪個
yum install -y VirtualBox-5.2.x86_64
直接使用命令即可啟動虛擬機器
virtualbox