Install VirtualBox 6.0 / 5.2 on CentOS 7 / RHEL 7

博客介绍了在CentOS 7 / RHEL 7系统上安装VirtualBox的步骤。先将系统更新到最新版本并重启,安装头文件和开发工具以及wget包,接着下载并导入Oracle公钥,下载或创建VirtualBox仓库文件,最后使用命令安装VirtualBox,还可检查其内核模块服务状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

Update the system to the latest version.

yum update

Reboot the system.

reboot

Once the system is up, install header and development tools.

yum install -y kernel-devel kernel-headers gcc make perl

Also, install the wget package to download items using the terminal.

yum -y install wget

Download the Oracle public key.

wget https://www.virtualbox.org/download/oracle_vbox.asc

Import Oracle public key.

rpm --import oracle_vbox.asc

Download the VirtualBox repository file for CentOS 7 / RHEL 7 and move it into /etc/yum.repos.d/ directory.

 wget http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo -O /etc/yum.repos.d/virtualbox.repo

OR

Create the /etc/yum.repos.d/virtualbox.repo file with the following repository information.

[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

Install VirtualBox using the yum command.

VirtualBox v6.0:

yum install -y VirtualBox-6.0

VirtualBox v5.2:

yum install -y VirtualBox-5.2

Run the below command to check the status of VirtualBox Linux kernel module service.

systemctl status vboxdrv
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值