先修改镜像文件。要不然安装依赖会报错。
-- 备份之前的文件
mv CentOS-Base.repo Centos-Base.repo.bak
-- 使用阿里的源文件 需要在 curl 指令后面加上 “-k” 或 “–insecure” 参数, 这样 curl 便不会检查 SSL。
curl -k -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo
yum clean all
yum makecache
2.安装依赖
yum groupinstall -y "Server Platform Development" "Development Tools"
yum install kernel-headers kernel-devel qt-devel gtk2-devel textinfo tcl-devel tk-devel
3.下载源码并安装
可去sourceforge上面下载源码包
http://bochs.sourceforge.net
https://sourceforge.net/projects/bochs/files/bochs/2.6.2/
tar xvfz bochs-2.6.2.tar.gz
cd bochs-2.6.2
./configure \
--prefix=/home/truthos/bochs \
--enable-debugger \
--enable-disasm \
--enable-iodebug \
--enable-x86-debugger \
--with-x \
--with-x11
make
make install
cd =/home/truthos/bochs/bin/
vi bochsrc.txt
/bochs目录下新增文件bochsrc.disk配置如下:
megs:32
romimage: file=/home/truthos/bochs/share/bochs/BIOS-bochs-latest
vgaromimage: file=/home/truthos/bochs/share/bochs/VGABIOS-lgpl-latest
boot: disk
log:bochs.out
mouse:enabled=0
keyboard:keymap=/home/truthos/bochs/share/bochs/keymaps/x11-pc-us.map
ata0:enabled=1,ioaddr1=0x1f0,ioaddr2=0x3f0,irq=14
当使用bximage工具创建完虚拟硬盘后,修改bochsrc.disk,将虚拟硬盘信息添加到bochsrc.disk文件中。
megs:32
romimage: file=/home/truthos/bochs/share/bochs/BIOS-bochs-latest
vgaromimage: file=/home/truthos/bochs/share/bochs/VGABIOS-lgpl-latest
boot: disk
log:bochs.out
mouse:enabled=0
keyboard:keymap=/home/truthos/bochs/share/bochs/keymaps/x11-pc-us.map
ata0:enabled=1,ioaddr1=0x1f0,ioaddr2=0x3f0,irq=14
ata0-master: type=disk,path="hd60M.img", mode=flat,cylinders=121,heads=16,spt=63