在 centos 上安装 virutalbox
简介
VirtualBox 是一款开源虚拟机软件。VirtualBox 是由德国 Innotek 公司开发,由Sun Microsystems公司出品的软件,使用Qt编写,在 Sun 被 Oracle 收购后正式更名成 Oracle VM VirtualBox。Innotek 以 GNU General Public License (GPL) 释出 VirtualBox,并提供二进制版本及 OSE 版本的代码。使用者可以在VirtualBox上安装并且执行Solaris、Windows、DOS、Linux、OS/2 Warp、BSD等系统作为客户端操作系统。现在则由甲骨文公司进行开发,是甲骨文公司xVM虚拟化平台技术的一部份。
VirtualBox号称是最强的免费虚拟机软件,它不仅具有丰富的特色,而且性能也很优异!它简单易用,可虚拟的系统包括Windows(从Windows 3.1到Windows10、Windows Server 2012,所有的Windows系统都支持)、Mac OS X、Linux、OpenBSD、Solaris、IBM OS2甚至Android等操作系统!使用者可以在VirtualBox上安装并且运行上述的这些操作系统! 与同性质的VMware及Virtual PC比较下,VirtualBox独到之处包括远端桌面协定(RDP)、iSCSI及USB的支持,VirtualBox在客户端操作系统上已可以支持USB 2.0的硬件装置,不过要安装 VirtualBox Extension Pack。
-- 来自百度百科
centos 6.x 安装 virtual box
整个安装过程主要是参考如下博客。
https://tecadmin.net/install-oracle-virtualbox-on-centos-redhat-and-fedora/
Oracle VirtualBox is a cross-platform virtualization application. It installs on your existing Intel or AMD-based computers, whether they are running Windows, Mac, Linux or Solaris operating systems. It extends the capabilities of your existing computer so that it can run multiple operating systems at the same time. Click hereto read more about VirtualBox
Oracle has released its new major version VirtualBox 6.0.4 . In this release VirtualBox has improves stability and fixes regressions. To read more about this release read changelog. This article will help you to install Oracle VirtualBox 6.0 on CentOS and Redhat systems using Yum.
Step 1 – Add Required Yum Repositories
Firstly you are required to add VirtualBox yum repository in your system. Download repository file from its official site and place it under at /etc/yum.repos.d/virtualbox.repo .First navigate to /etc/yum.repos.d/ directory and use one of below commands as per your operating system.
cd /etc/yum.repos.d/
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
The CentOS and RedHat users also required to add EPEL yum repository using one of the following commands.
### On CentOS/RHEL 7 ###
rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
### On CentOS/RHEL 6 ###
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Step 2 – Install Required Packages
Before installing VirtualBox make sure to install all required packages to run VirtualBox like kernel-headers, kernel-devels etc. Use the following command to install the required packages.
yum install gcc make patch dkms qt libgomp
yum install kernel-headers kernel-devel fontforge binutils glibc-headers glibc-devel
After installing latest kernel and kernel headers, let’s reboot your system and start with Latest kernel.
reboot
Step 3 – Setup Environment Variable
VirtualBox installation required kernel source code to install required modules, So we need to configure environment variable KERN_DIR to which VirtualBox get kernel source code. In my case latest kernel source is available in 2.6.32-504.3.3.el6.x86_64 directory under /usr/src/kernels/ . Make sure you are using correct source path.
export KERN_DIR=/usr/src/kernels/`uname -r`
Step 4 – Install Oracle VirtualBox and Setup
Use the following command to install VirtualBox using the yum command line tool. It will install the latest version of VirtualBox 5.2 on your system.
yum install VirtualBox-6.0
要开始重新编译 kernel 模块,还要安装下面的软件
sudo yum install kernel-devel kernel-devel-2.6.32-754.el6.x86_64
After installation, we need to rebuild kernel modules using the following command.
service vboxdrv setup
Step 5 – Launch VirtualBox
Use following command to start VirtualBox from X windows. You can switch to GUI mode using init 5 or startx commands from terminal.
virtualbox
virtual box 中安装 centos 6 minimum 镜像
安装镜像
镜像地址: https://mirror.tuna.tsinghua.edu.cn/#
我选的是 centos 6.10 minimum
https://mirror.tuna.tsinghua.edu.cn/centos/6.10/isos/x86_64/CentOS-6.10-x86_64-minimal.iso
在安装时,网络模式,我选择的是桥接模式
网络设置
在 virtualbox 中安装好 centos minium 后,默认是没有开启网络的,需要自己设置。
开启网络的操作,主要是参考下面链接
核心操作是编辑文件 /etc/sysconfig/network-scripts/ifcfg-eth0
设置下面字段
ONBOOT="yes"
NM_CONTROLLED="no"
桥接模式,设置静态 ip
选择了桥接模式,但是每次启动 centos 后 ip 地址老变,需要将 ip 地址固定住。
参考链接如下 https://blog.csdn.net/qq_25166683/article/details/83211617
当前 nn02 上的网络配置如下。 文件/etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
IPADDR=192.168.1.222
NETMASK=255.255.255.0
GATEWAY=192.168.1.255
DNS1=114.114.114.114
DEVICE=eth0
HWADDR=08:00:27:5E:74:AE
TYPE=Ethernet
UUID=1ee603a9-d6dd-460c-86c2-a74e739193be
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
NAME=eth0
重启网络服务后,就会发现 ip 地址固定为 192.168.1.222 了。
在 centos 上安装 virutalbox的更多相关文章
- NoSql1 在Linux(CentOS)上安装memcached及使用
前言: 今天是初五,生活基本要从过年的节奏中回归到正常的生活了,所以想想也该想想与工作有关的事情了.我之前在工作中会经常使用memcached和redis,但是自己一直没有时间系统的好好看 ...
- 在Ubuntu|CentOS上安装Shutter截图工具及快捷键设置
简介 Shutter前身叫GScrot,它是一款相当棒的截图软件. 通过Shutter,你可以截取包括选定区域.全屏幕.窗口.窗口内的控件甚至网页的图像.通过内置的强大插件机制,你可以在截图后,对图像 ...
- 在CentOS上安装rabbitmq-server
***在 CentOS 6.4上安装python*** 注意啊,自己手动安装python2.7.5,不要动系统上面其他的版本 1,先安装GCC,用如下命令yum install gcc gcc-c++ ...
- CentOS上安装软件错误提示:configure: error: no acceptable C compiler found in $PATH
CentOS上安装软件错误提示:configure: error: no acceptable C compiler found in $PATH 因为是centos linux,默认可以采用yum方 ...
- 如何在centos上安装epel源
一.EPEL是什么? EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为RHEL/Cent ...
- 在Centos上安装RabbitMQ流程(转)
在Centos上安装RabbitMQ流程------------------------ 1. 需求 由于项目中要用到消息队列,经过ActiveMQ与RabbitMQ的比较,最终选择了RabbbitM ...
- 在CentOS上安装ZooKeeper集群
一共准备3个CentOS虚拟机 172.16.9.194 172.16.9.195 172.16.9.196 上传zookeeper-3.3.6.tar.gz到服务器并解压,3台服务器的目录结构如下 ...
- CentOS上安装Node.js
CentOS上安装Node.js [日期:2014-07-21] 来源:Linux社区 作者:maskdfe [字体:大 中 小] CentOS上安装Node.js(想在Linux上学习No ...
- Linux系统入门学习:在CentOS上安装phpMyAdmin
问题:我正在CentOS上运行一个MySQL/MariaDB服务,并且我想要通过网络接口来用phpMyAdmin来管理数据库.在CentOS上安装phpMyAdmin的最佳方法是什么? phpMyAd ...
随机推荐
- 选择排序python实现
选择排序(Selection sort)是一种简单直观的排序算法.它的工作原理是每一次从待排序的数据元素中选出最小(或最大)的一个元素,存放在序列的起始位置,直到全部待排序的数据元素排完.注意每次查找 ...
- 开源一个golang小程序商城后台系统(moshopserver)
开源一个golang小程序商城后台(moshopserver) golang和c/c++比起来是一门新的语言,一直想学,网上搜集了一些资料,有些人说很容易上手,确实是这样,和C/C++比起来,少了很多 ...
- 基于hive的《反贪风暴4》的影评
一:将爬虫大作业产生的csv文件上传到HDFS 查看文件中前10条信息,即可证明是否上传成功. 二.对CSV文件进行预处理生成无标题文本文件 创建一个deal.sh,主要实现数据分割成什么样的意思 执 ...
- [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available
原文链接https://blog.csdn.net/xiaomajia029/article/details/88320233 问题描述: 原因分析:在项目配置的时候,默认 npm 包导出的是运行时构 ...
- merge同时包含增、改、删
我们都知道oracle merge可以用来增和改,很少用它来删除.但是有时候我们仍然需要该特性,以提高性能,典型的场景就是将业务库逻辑删除的记录同步到查询库的时候,做真正的物理删除,这个时候merge ...
- swoole流程图
程图,便于以后回忆下 总结几点如下: 首先主进程监听pipe_master事件, 子进程监听pipe_worker事件 通过主进程派生的线程 swReactorThread *thread = swS ...
- 安卓之Android.mk多文件以及动态库编译
1.多文件编译 多文件编译共有两种方式: (1) 在Android.mk中一一添加 LOCAL_PATH:= $(call my-dir) #定义当前模块的相对路径 include $(CLEAR_V ...
- osg::Group源码
osg::Group源码 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield * * This library i ...
- Spring cloud微服务安全实战-7-9自定义日志采集的格式和内容
怎么来控制输出的日志的格式.并且从日志里面提取出来我想要的一些信息. 整个的message是一个大的json格式字符串. 虽然是可以通过关键字搜索到.但是日志看起来并不舒服. 在我们的控制台,日志实际 ...
- 【Linux】两台服务器ssh免密登录
背景: 有些场景可能用到两台服务器ssh免密登录.比如服务器自动化部署 开始准备: 服务器A linux ip: 192.168.1.1 服务器B linux ip: 192.168.1. ...