centos7 install VirtualBox

参考资料:

VirtualBox 官方地址

不啰嗦:

cd /etc/yum.repos.d/
sudo wget https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
yum update -y && yum install -y VirtualBox-6.0

验证执行:(检查每一步是否正确)

[centos@ip-172-26-0-234 ~]$ cd /etc/yum.repos.d/
[centos@ip-172-26-0-234 yum.repos.d]$ ls
CentOS-Base.repo  CentOS-CR.repo  CentOS-Debuginfo.repo  CentOS-fasttrack.repo  CentOS-Media.repo  CentOS-Sources.repo  CentOS-Vault.repo  epel-7.repo
[centos@ip-172-26-0-234 yum.repos.d]$ sudo wget https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
--2019-06-13 10:07:25--  https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
Resolving download.virtualbox.org (download.virtualbox.org)... 104.103.44.231
Connecting to download.virtualbox.org (download.virtualbox.org)|104.103.44.231|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 259 [text/plain]
Saving to: ‘virtualbox.repo’

100%[===========================================================================================================================>] 259         --.-K/s   in 0s      

2019-06-13 10:07:27 (42.6 MB/s) - ‘virtualbox.repo’ saved [259/259]

[centos@ip-172-26-0-234 yum.repos.d]$ ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo  virtualbox.repo
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo  epel-7.repo
[centos@ip-172-26-0-234 yum.repos.d]$ yum update -y
[centos@ip-172-26-0-234 yum.repos.d]$ yum search VirtualBox-6.0
[centos@ip-172-26-0-234 yum.repos.d]$ yum install VirtualBox-6.0

相关推荐