カスタム検索
|
Tweet |
|
|
Modified: 23 December 2005
参考になったページ
http://project-xen.web.cern.ch/project-xen/xen/howto.html
ツール類のインストールの確認
![]()
CentOS4.2のインストールの注意
以下の点に注意してインストールします。
- パーティションの割付では、ゲスト用の領域は割りつけないで空けておきます。
ホスト用の領域は、最低2G以上、4Gの領域がいるそうです。
- パッケージの選択では、開発環境を選択しておきます。
追加パッケージのインストール
# yum install bridge-utils mod_python Setting up Install Process Setting up repositories update 100% |=========================| 951 B 00:00 base 100% |=========================| 1.1 kB 00:00 addons 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for bridge-utils to pack into transaction set. bridge-utils-1.0.4-4.i386 100% |=========================| 4.2 kB 00:00 ---> Package bridge-utils.i386 0:1.0.4-4 set to be updated ---> Downloading header for mod_python to pack into transaction set. mod_python-3.1.3-5.1.i386 100% |=========================| 22 kB 00:00 ---> Package mod_python.i386 0:3.1.3-5.1 set to be updated --> Running transaction check --> Processing Dependency: libsysfs.so.1 for package: bridge-utils --> Processing Dependency: httpd-mmn = 20020903 for package: mod_python --> Processing Dependency: httpd >= 2.0.40 for package: mod_python --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Downloading header for sysfsutils to pack into transaction set. sysfsutils-1.2.0-1.i386.r 100% |=========================| 4.0 kB 00:00 ---> Package sysfsutils.i386 0:1.2.0-1 set to be updated ---> Downloading header for httpd to pack into transaction set. httpd-2.0.52-19.ent.cento 100% |=========================| 61 kB 00:00 ---> Package httpd.i386 0:2.0.52-19.ent.centos4 set to be updated --> Running transaction check --> Processing Dependency: httpd-suexec for package: httpd --> Processing Dependency: libapr-0.so.0 for package: httpd --> Processing Dependency: libaprutil-0.so.0 for package: httpd --> Processing Dependency: apr >= 0.9.4-24.2 for package: httpd --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Downloading header for apr-util to pack into transaction set. apr-util-0.9.4-21.i386.rp 100% |=========================| 5.2 kB 00:00 ---> Package apr-util.i386 0:0.9.4-21 set to be updated ---> Downloading header for httpd-suexec to pack into transaction set. httpd-suexec-2.0.52-19.en 100% |=========================| 21 kB 00:00 ---> Package httpd-suexec.i386 0:2.0.52-19.ent.centos4 set to be updated ---> Downloading header for apr to pack into transaction set. apr-0.9.4-24.5.i386.rpm 100% |=========================| 7.4 kB 00:00 ---> Package apr.i386 0:0.9.4-24.5 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: bridge-utils i386 1.0.4-4 base 27 k mod_python i386 3.1.3-5.1 base 568 k Installing for dependencies: apr i386 0.9.4-24.5 base 88 k apr-util i386 0.9.4-21 base 51 k httpd i386 2.0.52-19.ent.centos4 base 886 k httpd-suexec i386 2.0.52-19.ent.centos4 base 27 k sysfsutils i386 1.2.0-1 base 56 k Transaction Summary ============================================================================= Install 7 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 1.7 M Is this ok [y/N]: y Downloading Packages: (1/7): bridge-utils-1.0.4 100% |=========================| 27 kB 00:00 (2/7): apr-util-0.9.4-21. 100% |=========================| 51 kB 00:00 (3/7): mod_python-3.1.3-5 100% |=========================| 568 kB 00:01 (4/7): sysfsutils-1.2.0-1 100% |=========================| 56 kB 00:00 (5/7): httpd-2.0.52-19.en 100% |=========================| 886 kB 00:02 (6/7): httpd-suexec-2.0.5 100% |=========================| 27 kB 00:00 (7/7): apr-0.9.4-24.5.i38 100% |=========================| 88 kB 00:00 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: apr ######################### [1/7] Installing: apr-util ######################### [2/7] Installing: sysfsutils ######################### [3/7] Installing: bridge-utils ######################### [4/7] Installing: httpd ######################### [5/7] Installing: mod_python ######################### [6/7] Installing: httpd-suexec ######################### [7/7] Installed: bridge-utils.i386 0:1.0.4-4 mod_python.i386 0:3.1.3-5.1 Dependency Installed: apr.i386 0:0.9.4-24.5 apr-util.i386 0:0.9.4-21 httpd.i386 0:2.0.52-19.ent.centos4 httpd-suexec.i386 0:2.0.52-19.ent.centos4 sysfsutils.i386 0:1.2.0-1 Complete! #
Zopeのインストール
以下のようにダウンロードします。
# wget http://www.zope.org/Products/ZopeInterface/3.0.1final/ZopeInterface-3.0.1.tgz --14:21:26-- http://www.zope.org/Products/ZopeInterface/3.0.1final/ZopeInterface-3.0.1.tgz => `ZopeInterface-3.0.1.tgz.1' www.zope.org をDNSに問いあわせています... 63.240.213.171 www.zope.org|63.240.213.171|:80 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 108,336 (106K) [application/x-gzip] 100%[===============================================================>] 108,336 174.43K/s 14:21:28 (173.97 KB/s) - `ZopeInterface-3.0.1.tgz.1' を保存しました [108336/108336] #以下の手順でビルドしてインストールします。
# tar zxvf ZopeInterface-3.0.1.tgz # cd ZopeInterface-3.0.1 # python setup.py build # python setup.py install
Twistedをインストール
以下のようにダウンロードします。
# wget http://tmrc.mit.edu/mirror/twisted/Twisted/2.0/Twisted-2.0.1.tar.bz2 --14:24:22-- http://tmrc.mit.edu/mirror/twisted/Twisted/2.0/Twisted-2.0.1.tar.bz2 => `Twisted-2.0.1.tar.bz2' tmrc.mit.edu をDNSに問いあわせています... 18.150.1.81 tmrc.mit.edu|18.150.1.81|:80 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 1,061,899 (1.0M) [application/x-bzip2] 100%[===============================================================>] 1,061,899 278.54K/s ETA 00:00 14:24:26 (277.91 KB/s) - `Twisted-2.0.1.tar.bz2' を保存しました [1061899/1061899] # wget http://tmrc.mit.edu/mirror/twisted/Web/0.5/TwistedWeb-0.5.0.tar.bz2 --14:25:17-- http://tmrc.mit.edu/mirror/twisted/Web/0.5/TwistedWeb-0.5.0.tar.bz2 => `TwistedWeb-0.5.0.tar.bz2' tmrc.mit.edu をDNSに問いあわせています... 18.150.1.81 tmrc.mit.edu|18.150.1.81|:80 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 263,139 (257K) [application/x-bzip2] 100%[===============================================================>] 263,139 215.94K/s 14:25:19 (215.39 KB/s) - `TwistedWeb-0.5.0.tar.bz2' を保存しました [263139/263139] #以下の手順でビルドしてインストールします。
# tar jxf Twisted-2.0.1.tar.bz2 # cd Twisted-2.0.1 # python setup.py install # cd .. # tar jxf TwistedWeb-0.5.0.tar.bz2 # cd TwistedWeb-0.5.0 # python setup.py install # cd ..
ソースコードのダウンロード
以下のコマンドで、ダウンロードします。
# wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-2.0.7-src.tgz --17:29:42-- http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-2.0.7-src.tgz => `xen-2.0.7-src.tgz' www.cl.cam.ac.uk をDNSに問いあわせています... 128.232.0.20 www.cl.cam.ac.uk|128.232.0.20|:80 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 2,580,390 (2.5M) [application/x-tar] 100%[===============================================================>] 2,580,390 386.70K/s ETA 00:00 17:29:51 (326.88 KB/s) - `xen-2.0.7-src.tgz' を保存しました [2580390/2580390] #
ビルドとインストール
解凍して、MAKEし、インストールします。
# tar zxvf xen-2.0.7-src.tgz # cd xen-2.0 # make world : make[3]: Leaving directory `/root/xen-2.0/linux-2.6.11-xenU' make[2]: Leaving directory `/root/xen-2.0' make[1]: Leaving directory `/root/xen-2.0' sh ./docs/check_pkgs && make -C docs install || true ************************************************* ************************************************* * WARNING: Package 'latex' is required * to build Xen documentation ************************************************* ************************************************* install -d -m0755 /root/xen-2.0/dist/check install -m0644 ./COPYING /root/xen-2.0/dist install -m0644 ./README /root/xen-2.0/dist install -m0755 ./install.sh /root/xen-2.0/dist install -m0755 tools/check/chk tools/check/check_* /root/xen-2.0/dist/check # make install : install -m0644 vmlinux /boot/vmlinux-syms-2.6.11.12-xenU install -m0664 .config /boot/config-2.6.11.12-xenU install -m0664 System.map /boot/System.map-2.6.11.12-xenU ln -f -s vmlinuz-2.6.11.12-xenU /boot/vmlinuz-2.6-xenU mkdir -p /usr/include/xen/linux install -m0644 include/asm-xen/linux-public/*.h /usr/include/xen/linux make[3]: Leaving directory `/root/xen-2.0/linux-2.6.11-xenU' make[2]: Leaving directory `/root/xen-2.0' make[1]: Leaving directory `/root/xen-2.0' sh ./docs/check_pkgs && make -C docs install || true ************************************************* ************************************************* * WARNING: Package 'latex' is required * to build Xen documentation ************************************************* ************************************************* #
WARNINGは、ドキュメントに関する警告なので、動作には関係ないそうです。
RAMディスクの作成
# mkinitrd /boot/initrd-2.6.11-xen0.img 2.6.11.12-xen0 No dep file found for kernel 2.6.11.12-xen0 #
これを作成しないと、"Unable to open an initial console"のエラーが出ますが、"No dep file found for kernel 2.6.11.12-xen0"のエラーが出て、作れません。
解決方法をご存知の方はぜひお教えください。仕方なく、以下をダウンロードして、リネームして起動したら、なんとか起動できました。これでいいんだろうか?
# wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/initrd-fc3.img
TLSを無効にする
# mv /lib/tls /lib/tls.disabled
ブートメニューの編集
ブートメニューを、"/etc/grub.conf"で変更します。
# grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/hda2 # initrd /initrd-version.img #boot=/dev/hda default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz #hiddenmenu title Xen-2.0 / XenLinux2.7 - CentOS (2.6.9-22.0.1.EL) root (hd0,0) kernel /xen-2.0.7.gz dom0_mem=131072 module /vmlinuz-2.6.11.12-xen0 root=/dev/hda2 ro console=tty0 module /initrd-2.6.11-xen0.img title CentOS (2.6.9-22.0.1.EL) root (hd0,0) kernel /vmlinuz-2.6.9-22.0.1.EL ro root=LABEL=/ initrd /initrd-2.6.9-22.0.1.EL.img title CentOS (2.6.9-22.0.1.ELsmp) root (hd0,0) kernel /vmlinuz-2.6.9-22.0.1.ELsmp ro root=LABEL=/ initrd /initrd-2.6.9-22.0.1.ELsmp.img title CentOS-4 i386 (2.6.9-22.ELsmp) root (hd0,0) kernel /vmlinuz-2.6.9-22.ELsmp ro root=LABEL=/ initrd /initrd-2.6.9-22.ELsmp.img title CentOS-4 i386-up (2.6.9-22.EL) root (hd0,0) kernel /vmlinuz-2.6.9-22.EL ro root=LABEL=/ initrd /initrd-2.6.9-22.EL.img再起動して立ち上がればOKです。