centos qemu安装的历史记录

88560398 2013-03-28

 
yum install bluez* 
蓝牙,bluetooth相关
yum install SDL
yum install libpng libgl libsdl libbluetoothsd

 yum install esound-libs 
 yum install esound
缺esd
 

1ls

2gcc

3exit

4ls

5cdtest/

6ls

7qemu-hdadisk.img-cdrominstall-amd64-minimal-20130110.iso-bootd

8yuminstalllibsdl

9yuminstalllibsdl*

10yumsearchSDL

11yuminstallSDL.x86_64SDL-devel.x86_64

12yumremoveSDL-static.x86_64

13qemu-hdadisk.img-cdrominstall-amd64-minimal-20130110.iso-bootd

14yumsearchSDL

15yuminstallSDL

16yuminstallSDL*

17qemu-hdadisk.img-cdrominstall-amd64-minimal-20130110.iso-bootd

18yuminstalllibx11-dev

19yuminstalllibx11

20yuminstalllibX11

21yuminstalllibX11-dev

22yuminstalllibX11*

23yuminstalllibX11-dev

24gcc

25yuminstallgcc

26history

27ls

28vima.txt

29ls

30qemu-system-x86_64-cdromrhel-server-6.3-x86_64-dvd.iso-m1024-smp2-drive

31cls

32ls

33cata.txt

34qemu-system-x86_64-cdrominstall-amd64-minimal-20130110.iso-m1024-smp2-drivefile=f18,if=virtio-bootd-vnc:7

35qemu-system-x86_64-cdrominstall-amd64-minimal-20130110.iso-m1024-smp2-drivefile=disk.img,if=virtio-bootd-vnc:7

36qemu-system-x86_64-cdrominstall-amd64-minimal-20130110.iso-m256-smp2-drivefile=disk.img,if=virtio-bootd-vnc:7

37vima.txt

38ls

39history>history.txt

1ls

2pwd

3df-h

4freee

5free

6yuminstallqemu

7qemu

8yumupdate

9yuminstallqemu

10wgethttp://pkgs.repoforge.org/qemu/qemu-0.15.0-1.el6.rfx.x86_64.rpm

11ls

12wgethttp://pkgs.repoforge.org/qemu/qemu-img-0.15.0-1.el6.rfx.x86_64.rpm

13rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

14yuminstallqemu-img

15yuminstallqemu

16yuminstallqemu-kvm

17qemu

18qemu-kvm

19cd/usr/share/qemu-kvm/

20ls

21cd

22ls

23rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

24rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

25yuminstalllibpnglibgllibsdllibbluetoothsd

26yuminstalllibpnglibgllibsdllibbluetooth

27rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

28yuminstalllibesd

29qemu-kvm

30qemu

31yuminstallesd

32yuminstallsdl

33rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

34yuminstallGL

35yumsearchlibGL

36yuminstallmesa-libGL.x86_64mesa-libGL-devel.x86_64

37rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

38yumsearchsdl

39yuminstallSDL.x86_64SDL-devel.x86_64SDL-static.x86_64

40rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

41yumsearchlibesd

42yumsearchesd

43yuminstallkdesdk.x86_64

44rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

45yumsearchesd

46yuminstallkdesdk-devel.x86_64kdesdk-libs.x86_64kdesdk-utils.x86_64

47rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

48yumsearchbluetooth

49yuminstallbluez*

50rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

51yumsearchbluetooth

52yuminstallbluez.x86_64bluez-libs.x86_64bluez-libs-devel.x86_64

53rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

54yuminstallesound

55rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

56yuminstallesound-libs

57rpm-ivhqemu-0.15.0-1.el6.rfx.x86_64.rpm

58ls

59qemu

60qemu-img

61pwd

62ls

63cd/usr/share/qemu

64ls

65cd

66ls

67mkdirtest

68ls

69cdtest/

70ls

71cd..

72ls

73mkdirbackup

74mvqemu-0.15.0-1.el6.rfx.x86_64.rpmbackup/

75ls

76rmqemu-img-0.15.0-1.el6.rfx.x86_64.rpm

77ls

78cdtest/

79ls

80wgethttp://mirrors.sohu.com/gentoo/releases/amd64/current-iso/install-amd64-minimal-20130110.iso

81pw

82lpwd

83pwd

84ls

85qemu-imgcreate-fqcowdisk.img8G

86ls

87qemu-hdadisk.img-cdrominstall-amd64-minimal-20130110.iso-bootd

88ls

89yuminstallxorg-dev

90yuminstallxorg

91yuminstalllibx11-dev

92qemu-hdadisk.img-cdrominstall-amd64-minimal-20130110.iso-bootd

93qemu-system-x86_64-cdromrhel-server-6.3-x86_64-dvd.iso-m1024-smp2-drivefile=f18,if=virtio-bootd-vnc:7

94vima.txt

95ps-ef|grepvnc

96history>>history.txt

mkdir -p /data0/software/  
cd /data0/software/  
# 32位系统 centos 5.x   
wget http://pkgs.repoforge.org/qemu/qemu-img-0.14.1-2.el5.rfx.i386.rpm  
wget http://pkgs.repoforge.org/qemu/qemu-0.14.1-2.el5.rfx.i386.rpm  
rpm -ivh qemu-img-0.14.1-2.el5.rfx.i386.rpm  
rpm -ivh qemu-0.14.1-2.el5.rfx.i386.rpm  
# 64位系统 centos 5.x  
wget http://pkgs.repoforge.org/qemu/qemu-img-0.14.1-2.el5.rfx.x86_64.rpm  
wget http://pkgs.repoforge.org/qemu/qemu-0.14.1-2.el5.rfx.x86_64.rpm  
rpm -ivh qemu-img-0.14.1-2.el5.rfx.x86_64.rpm  
rpm -ivh qemu-0.14.1-2.el5.rfx.x86_64.rpm  
# 32位系统  centos 6.x  
wget http://pkgs.repoforge.org/qemu/qemu-0.15.0-1.el6.rfx.i686.rpm  
wget http://pkgs.repoforge.org/qemu/qemu-img-0.15.0-1.el6.rfx.i686.rpm  
rpm -ivh qemu-0.15.0-1.el6.rfx.i686.rpm  
rpm -ivh qemu-img-0.15.0-1.el6.rfx.i686.rpm  
# 64位系统  centos 6.x  
wget http://pkgs.repoforge.org/qemu/qemu-0.15.0-1.el6.rfx.x86_64.rpm  
wget http://pkgs.repoforge.org/qemu/qemu-img-0.15.0-1.el6.rfx.x86_64.rpm  
rpm -ivh qemu-0.15.0-1.el6.rfx.x86_64.rpm  
rpm -ivh qemu-img-0.15.0-1.el6.rfx.x86_64.rpm  
  
  
#安装完毕,qemu的bios的启动信息在 /usr/share/qemu下  
#创建个虚拟机目录  
mkdir /data0/software/win2003  
cd /data0/software/win2003  
#创建个10G硬盘镜像  
qemu-img create disk.10G 10G  
  
#假设win2003镜像位置在当前目录  
#启动虚拟机的命令  
#boot d 是从光驱启动 boot c 是硬盘  
qemu -L /usr/share/qemu -m 512 -hda disk.10G -localtime -boot d -cdrom ./win2003.iso  -localtime -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=no -net user  
  
#如想修改VNC端口 参数是: -vnc localhost:2,to=4  
# 就是从5902到5904本机。如果远程则 -vnc 123.123.123.123:1,to=4  
# 未测试 -daemonize -usbdevice tablet  
  
# 按 ctrl + alt 释放虚拟机中的鼠标  
  
#网络桥虚拟网卡:  
yum install tunctl  
yum install bridge-utils  
  
#rc.local启动脚本  
iptables -t nat -A POSTROUTING -o eth0 -s 10.0.67.0/24 -j MASQUERADE  
tunctl -t tap0  
ifconfig tap0 10.0.67.1 netmask 255.255.255.0  
#虚拟机里网关设置成 10.0.67.1 即可联网  
  
___________________________________________________________  
#以下为有问题后检查用  
echo 1>/proc/sys/net/ipv4/ip_forward  
查看 tun模块  
lsmod | grep tun  
modprobe tun

参考

https://blog.b999.net/post/99/

相关推荐