且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Virtual Box 下 安装 CentOs.

更新时间:2022-08-13 11:12:37

 

1,首先下载 virtual box

 

https://www.virtualbox.org/

 

下载页面:

 

https://www.virtualbox.org/wiki/Downloads

 

命令行的最小版本 下载:

 

http://mirrors.163.com/centos/6.0/isos/i386/CentOS-6.0-i386-minimal.iso

 

 

新建一个虚拟机.


Virtual Box 下 安装 CentOs.

 

因为是命令行版本所有选择 512 就够用了. 太大了主机系统慢.
Virtual Box 下 安装 CentOs.

 

创建虚拟硬盘.
Virtual Box 下 安装 CentOs.


Virtual Box 下 安装 CentOs.


Virtual Box 下 安装 CentOs.

 

创建硬盘 4G 就够用了..安装 nginx mysql java 都可以安装.
Virtual Box 下 安装 CentOs.


Virtual Box 下 安装 CentOs.

 

开始创建虚拟硬盘.要等会.
Virtual Box 下 安装 CentOs.


Virtual Box 下 安装 CentOs.


Virtual Box 下 安装 CentOs.

 

启动虚拟机.会自动弹出选择 iso文件.
Virtual Box 下 安装 CentOs.


Virtual Box 下 安装 CentOs.

 

选择 安装文件 ,如果 是windows 选择 i386的版本就行了..如果是 64位系统 还要下载 64bit的文件.

 

Virtual Box 下 安装 CentOs.

 

进入安装界面.

Virtual Box 下 安装 CentOs.

 

启动安装.
Virtual Box 下 安装 CentOs.

 

这个是要检查 CD 跳过.
Virtual Box 下 安装 CentOs.

下一步
Virtual Box 下 安装 CentOs.

安装英文系统,下一步
Virtual Box 下 安装 CentOs.

 

 

这个是没有初始化磁盘.重新初始化.下一步.
Virtual Box 下 安装 CentOs.

 


Virtual Box 下 安装 CentOs.

 

 

 


Virtual Box 下 安装 CentOs.

可以直接在这里设置网络。就不用去系统里面修改  network文件了。


Virtual Box 下 安装 CentOs.


Virtual Box 下 安装 CentOs.

设置密码:
Virtual Box 下 安装 CentOs.

 

使用全部设备 !!!如果你是在自己的电脑上面安装选择最后一个..自定义磁盘..第一个会删除磁盘上全部内容!!!特别注意..虚拟机 当然无所谓了.
Virtual Box 下 安装 CentOs.

最后确认写入磁盘.
Virtual Box 下 安装 CentOs.

开始进入安装程序.
Virtual Box 下 安装 CentOs.

 

安装完成:重启.

 


Virtual Box 下 安装 CentOs.

系统启动.有进度条
Virtual Box 下 安装 CentOs.

命令行登录.查看 可以使用空间 1.9G.安装 tomcat mysql java 都够用.
Virtual Box 下 安装 CentOs.

 

默认情况下这样安装时不能使用网络的.我使用最简单的方式连接网络.

 

确认 虚拟网络是NAT的类型:

 


Virtual Box 下 安装 CentOs.

 

修改 文件:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

将 ONBOOT="no" 修改成 ONBOOT="yes"

并且添加一行:就是设置自动获得IP类型.

BOOTPROTO=dhcp
Virtual Box 下 安装 CentOs.

重启网络:

/etc/init.d/network restart


Virtual Box 下 安装 CentOs.

查看 IP: ifconfig :

如果是 10.0.2.15 已经动态获得IP了.一般都是这个IP
Virtual Box 下 安装 CentOs.

.可以 ping www.iteye.com 看看行不.

 


Virtual Box 下 安装 CentOs.

网络畅通.

 

下面的博客 开始讲如何使用 CentOS.