blovekyo 发表于 2018-5-15 07:12:34

windows下实现了linux的虚拟

  昨天折腾了半天,在windows下终于实现了linux的虚拟。我用的是colinux+debian,以下是步骤分享给大家:
  1.去colinux上下载最新的colinux安装文件+debian的文件系统
  
2.安装colinux到C:\colinux目录下,把debian文件系统解压到C:\colinux下
  
3.创建配置文件debian.conf:

  kernel=vmlinux
  cobd0="rootfs_2gb.img"
  cobd1="swap_128mb.img"
  root=/dev/cobd0
  ro
  ininrd=ininrd.gz
  mem=128
  eh0=tuntap
  

  4.创建批处理文件start.bat,方便每次启动:
colinux-daemon.exe @debian.conf

5.设置windows下网络环境:
物理网卡(本地连接)设置共享,共享的家庭网络连接设置为colinux的虚拟网卡,此时虚拟网卡被分配一个ip:192.168.0.1,在这里我要给大家指出,虚拟网卡充当的是linux的网关,与物理网卡的网段不能在同一网段。

6.双击start.bat启动colinux,这时debian已经启动,用root登录

7.修改colinux下网络环境:打开/etc/network/interfaces,命令行输入nano /etc/network/interfaces,修改为
auto lo eth0
iface eth0 inet static
address 192.168.0.40
gateway 192.168.0.1
netmask 255.255.255.0
iface lo inet loopbac


  8.设置域名解析服务器dns,命令行输入nano /etc/resolv.conf,修改为
  domain abc.com
  nameserver 192.168.0.1
  
9.重启网络配置,命令行输入/etc/init.d/network restart


  10.ping一下baidu,命令行输入ping www.baidu.com,应该能ping通了

11.apt-get update 更新命令

12.apt-get upgrade

13.apt-get install openssh-server 安装ssh,可以用securecrt登陆了

14.apt-get install安装gcc,g++,wget,locate ,vim,lrzsz等等喜欢的软件
  
页: [1]
查看完整版本: windows下实现了linux的虚拟