Version 2 (modified by rock, 16 years ago) (diff) |
---|
實作一: Xen 單機安裝與基本操作
【前言】
- 使用的 OS 為 Debian etch (5.0)
- 為了方便學員,可以使用 複製和貼上 繁瑣的指令 (請複製 "$" 之後的指令)
- 黑底白字部份為指令
$ vim /etc/hosts
- 白底黑字為文件內容
127.0.0.1 localhost
【Step 1: 安裝所需的相關套件】
- 因 Xen 會相依某些套件,此步驟可以把需要的套件一次先裝好
$ sudo aptitude install build-essential libncurses5-dev kernel-package iproute bridge-utils python-twisted gcc binutils \ make zlib1g-dev python-dev transfig bzip2 screen ssh debootstrap libncurses5-dev x-dev libsdl1.2-dev bin86 bcc \ python-pam patch latex-make qemu qemu-launcher qemuctl graphviz graphviz-dev lvm2 libvncserver-dev libjpeg62-dev libjpeg62 \ gettext python-xml gawk tetex-extra tetex-base openssl libssl-dev mercurial libc6-dev-i386 libcurl4-openssl-dev \ bzip2 debhelper dpatch libsnmp-dev module-assistant quilt libxml2 python-xml libconfig-inifiles-perl libtext-template-perl
【Step 2: 安裝 Xen Kernel 和 Xen】
- 下載已經 patch 好的 Kernel
$ wget https://trac.nchc.org.tw/grid/export/101/xen/xen_lustre_patch/linux-xen0-2.6.22.9-rock_r01_amd64.deb --no-check-certificate
- 安裝 Kernel
$ sudo dpkg -i linux-xen0-2.6.22.9-rock_r01_amd64.deb $ sudo mv /boot/xen0-linux-2.6.22.9-rock /boot/vmlinuz-2.6.22.9-rock
- 產生 initramfs
$ sudo mkinitramfs -o /boot/initrd.img-2.6.22.9-rock 2.6.22.9-rock
【Step 3: 安裝 Xen】
- 下載 Xen source
$ cd /usr/src/ $ sudo wget http://bits.xensource.com/oss-xen/release/3.4.1/xen-3.4.1.tar.gz
- 編譯和安裝 Xen
$ sudo tar zxvf xen-3.4.1.tar.gz $ cd xen-3.4.1 $ make -j 4 xen && make -j 4 tools $ sudo make install-xen && install-tools
Attachments (3)
- Xen_grub.JPG (85.1 KB) - added by rock 16 years ago.
- xen_lab1_step1.sh (286 bytes) - added by jazz 16 years ago.
- xen-tools.conf.diff (1.7 KB) - added by jazz 16 years ago.
Download all attachments as: .zip