centos 7 install VirtualBox

1. set the yum repository.

[root@localhost ~]# wget -P /etc/yum.repos.d http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
--2017-02-14 11:40:21--  http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
正在解析主机 download.virtualbox.org (download.virtualbox.org)... 65.200.22.33, 65.200.22.48
正在连接 download.virtualbox.org (download.virtualbox.org)|65.200.22.33|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:259 [text/plain]
正在保存至: “/etc/yum.repos.d/virtualbox.repo”

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

2017-02-14 11:40:22 (32.0 MB/s) - 已保存 “/etc/yum.repos.d/virtualbox.repo” [259/259])

2. search the available version of VirtualBox

[root@localhost ~]# yum search VirtualBox 
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.btte.net
 * updates: mirrors.btte.net
============================================================================================= N/S matched: VirtualBox =============================================================================================
VirtualBox-4.3.x86_64 : Oracle VM VirtualBox
VirtualBox-5.0.x86_64 : Oracle VM VirtualBox
VirtualBox-5.1.x86_64 : Oracle VM VirtualBox

3. install the specific version.

[root@localhost ~]# yum install VirtualBox-5.1
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.btte.net
 * elrepo: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.btte.net
 * updates: mirrors.btte.net
正在解决依赖关系
--> 正在检查事务
---> 软件包 VirtualBox-5.1.x86_64.0.5.1.14_112924_el7-1 将被 安装
--> 正在处理依赖关系 libSDL-1.2.so.0()(64bit),它被软件包 VirtualBox-5.1-5.1.14_112924_el7-1.x86_64 需要
--> 正在检查事务
---> 软件包 SDL.x86_64.0.1.2.15-14.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

===================================================================================================================================================================================================================
 Package                                             架构                                        版本                                                        源                                               大小
===================================================================================================================================================================================================================
正在安装:
 VirtualBox-5.1                                      x86_64                                      5.1.14_112924_el7-1                                         virtualbox                                       75 M
为依赖而安装:
 SDL                                                 x86_64                                      1.2.15-14.el7                                               base                                            204 k

事务概要
===================================================================================================================================================================================================================
安装  1 软件包 (+1 依赖软件包)

总下载量:75 M
安装大小:168 M
Is this ok [y/d/N]: y


run config procedure, there will be message if there are errors.

[root@localhost ~]# /sbin/vboxconfig 
vboxdrv.sh: Building VirtualBox kernel modules.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:

  yum install kernel-devel-3.10.0-327.36.2.el7.x86_64
(The last command may fail if your system is not fully updated.)
  yum install kernel-devel
vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:

  yum install kernel-devel-3.10.0-327.36.2.el7.x86_64
(The last command may fail if your system is not fully updated.)
  yum install kernel-devel

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.

install kernel

 yum install kernel-devel


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
您好!要在VirtualBox上安装CentOS 7,您可以按照以下步骤进行操作: 1. 首先,从CentOS官方网站下载CentOS 7的ISO镜像文件。您可以访问https://www.centos.org/download/下载所需的版本。 2. 打开VirtualBox并点击“新建”按钮创建一个新的虚拟机。 3. 在弹出的窗口中,为虚拟机输入一个名称,选择类型为“Linux”,版本为“Other Linux(64-bit)”。 4. 根据您的系统配置,选择适当的内存大小(推荐至少为2GB)。 5. 创建一个新的虚拟硬盘,并选择“VDI”作为硬盘文件类型。 6. 选择“动态分配”作为存储方式,并为虚拟硬盘分配足够的空间(推荐至少20GB)。 7. 创建完成后,选择新创建的虚拟机,点击“设置”。 8. 在“设置”窗口中,选择“存储”选项卡,然后在“控制器:IDE”下方的空白区域点击加号图标。 9. 在弹出窗口中,选择“选择虚拟光驱文件”,并导航到您之前下载的CentOS 7 ISO镜像文件。 10. 点击“确定”保存设置。 11. 现在您可以启动虚拟机了。选择新创建的虚拟机,点击“启动”。 12. 在CentOS 7的启动界面上,选择“Install CentOS 7”并按下回车键。 13. 按照安装向导的指示进行操作,包括选择语言、键盘布局等。 14. 在安装类型选择界面,可以选择默认的“基本服务器”安装类型,也可以按需求选择其他安装类型。 15. 设置分区方案和磁盘加密(可选),然后点击“开始安装”。 16. 在安装过程中,您需要设置root密码和至少一个用户账号。 17. 完成安装后,重新启动虚拟机,并从硬盘启动。 恭喜!您已成功在VirtualBox上安装了CentOS 7。您现在可以登录并开始使用了。如果需要,您还可以在VirtualBox的菜单栏中选择“设备”>“安装增强功能”来安装VirtualBox增强功能,以提升性能和功能。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值