CentOS 7 安装VirtualBox
VirtualBox 5.1 Released – Install on RHEL/CentOS/Fedora and Debian/Ubuntu/Linux Mint
1 | #yum install epel-release |
在 RHEL/CentOS 和 Fedora 上安装 VirtualBox 5.1
1.如果已经安装有老版本,需要先卸载原来版本
1 | # yum remove VirtualBox-4* |
2.添加VirtualBox安装源
RHEL/CentOS 7/6/5
1 2 | # cd /etc/yum.repos.d/ # wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo |
RHEL/CentOS 5
1 2 | # wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm # rpm -Uvh epel-release-5-4.noarch.rpm |
Fedora 24-12
1 2 | # cd /etc/yum.repos.d/ # wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo |
3.安装相关依赖包
1 2 | # yum update # yum install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms |
4.安装VirtualBox 5.1
1 | # yum install VirtualBox-5.1 |
5.重建VirtualBox 5.1内核模块
1 2 | ------------- Fedora 24-19 and CentOS /RHEL 7 ------------- # /usr/lib/virtualbox/vboxdrv .sh setup |
1 2 | ------------- Fedora 18-16 and CentOS /RHEL 6 /5 ------------- #/etc/init.d/vboxdrv setup |
1 2 | ## OR ## #service vboxdrv setup |
6.添加用户到vboxusers中 (user_name替换为相应的用户名)
1 | # usermod -a -G vboxusers user_name |
7.如果有关于KERN_DIR的错误,则需要设置相应的全局变量
1 2 3 4 | ## RHEL / CentOS / Fedora ## KERN_DIR= /usr/src/kernels/3 .10.0-229.7.2.el7.x86_64 ## Export KERN_DIR ## export KERN_DIR |
Installing VirtualBox 5.1 in Debian, Ubuntu and Linux Mint
First, uninstall any earlier version of Virtualbox if any.
$ sudo apt-get remove virtualbox-4*
Next, install latest 5.1 version using official Virtualbox repository. To add the repository, use the following command as shown.
$ sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" >> /etc/apt/sources.list.d/virtualbox.list' $ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - $ sudo apt-get update $ sudo apt-get install virtualbox-5.1
Starting VirtualBox 5.1
Simply execute following command to start it from the terminal or use launcher from menu to start.
# VirtualBox
VirtualBox Screenshots on CentOS 7
VirtualBox Screenshots on Linux Mint 17
Installing VirtualBox Extension Pack
If you need some additional functionality such as VirtualBox RDP, PXE, ROM with E1000 support and USB 2.0 Host Controller support, etc. You need to download and install the VirtualBox Extension Pack using following wget command.
# wget http://download.virtualbox.org/virtualbox/5.1.0/Oracle_VM_VirtualBox_Extension_Pack-5.1.0.vbox-extpack
To install the extension pack, you must have Virtualbox 5.1 installed, once you downloaded vbox-extpack open with Virtualbox as shown below. If it doesn’t work out, then open Virtaulbox –> Preferences –> Extensions and browse for the vbox-extpack to install it.
Updating VirtualBox
If you want to update the VirtualBox with latest version in the future, you can simply run the following command to update it.
On RHEL/CentOS/Fedora
# yum update VirtualBox-5.1
On Ubuntu/Linux Mint
# apt-get install VirtualBox-5.1
Remove VirtualBox
If in case you want to remove VirtualBox completely, just use the following command to remove it completely from your system.
On RHEL/CentOS/Fedora
# cd /etc/yum.repos.d/ # rm -rf virtualbox.repo # yum remove VirtualBox-5.1
On Ubuntu/Linux Mint
# apt-get remove VirtualBox-5.1
You can also Download VirtualBox 5.1 for other Linux, Windows and Mac OS X platforms.
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· C++代码改造为UTF-8编码问题的总结
· DeepSeek 解答了困扰我五年的技术问题
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 实操Deepseek接入个人知识库
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库