Xen

Domain-UへCentOS 5.2をインストール

Domain-0もCentOSで構築されているものとし、IPアドレスは、192.168.2.10/24とする。

Webサーバを起動

service httpd start

CentOSのインストールDVDをドライブにセット。

 Domain-0がGUIで、かつ、autofsサービスが動いている場合は自動的に/mediaの下にマウントされるので、そこへのシンボリックリンクを作成する。

 autofsが無い場合は、次のようにする。

mkdir /media/dvd
mount /dev/cdrom /media/dvd
cd /var/www/html
ln -s /media/dvd centos

 リソースは/var/www/html以外の場所にあるので、このままだとSELinuxがアクセス許可を出さないので、いったんSELinuxを無効にする。

system-config-securitylevel-tui

仮想マシンインストール

# virt-install --nographics --paravirt
仮想マシンの名前は何ですか? manto
どれだけの RAM を割り当てますか (メガバイト単位で)? 256
What would you like to use as the disk (file path)? /opt/vm/manto.img
どの位の大きさのディスク (/opt/vm/manto.img) にしたいですか(ギガバイト単位で)? 8
インストール場所は何ですか? http://192.168.2.10/centos

インストールを開始しています...

Welcome to CentOS
                  +---------+ Choose a Language +---------+
                  |                                       |
                  | What language would you like to use   |
                  | during the installation process?      |
                  |                                       |
                  |       Catalan                ^        |
                  |       Chinese(Simplified)    :        |
                  |       Chinese(Traditional)   #        |
                  |       Croatian               :        |
                  |       Czech                  :        |
                  |       Danish                 :        |
                  |       Dutch                  :        |
                  |       English                v        |
                  |                                       |
                  |                +----+                 |
                  |                | OK |                 |
                  |                +----+                 |
                  |                                       |
                  |                                       |
                  +---------------------------------------+

 Englishを選択。

            +----------------+ Configure TCP/IP +----------------+
            |                                                    |
            | [*] Enable IPv4 support                            |
            |        ( ) Dynamic IP configuration (DHCP)         |
            |        (*) Manual configuration                    |
            |                                                    |
            | [ ] Enable IPv6 support                            |
            |        (*) Automatic neighbor discovery (RFC 2461) |
            |        ( ) Dynamic IP configuration (DHCP)         |
            |        ( ) Manual configuration                    |
            |                                                    |
            |          +----+                  +------+          |
            |          | OK |                  | Back |          |
            |          +----+                  +------+          |
            |                                                    |
            |                                                    |
            +----------------------------------------------------+

 IPv4サポートはオンで、Manual configurationを選択。

 IPv6はチェックを外す。

        +--------------+ Manual TCP/IP Configuration +---------------+
        |                                                            |
        | Enter the IPv4 and/or the IPv6 address and prefix          |
        | (address / prefix).  For IPv4, the dotted-quad netmask     |
        | or the CIDR-style prefix are acceptable. The gateway and   |
        | name server fields must be valid IPv4 or IPv6 addresses.   |
        |                                                            |
        | IPv4 address: 192.168.2.11____ / 24______________          |
        | Gateway:      _________________________________________    |
        | Name Server:  _________________________________________    |
        |                                                            |
        |            +----+                      +------+            |
        |            | OK |                      | Back |            |
        |            +----+                      +------+            |
        |                                                            |
        |                                                            |
        +------------------------------------------------------------+

 IPアドレス等を指定。

              +------------------+ CentOS +-------------------+
              |                                               |
              | Welcome to CentOS!                            |
              |                                               |
              |                                               |
              |                    +----+                     |
              |                    | OK |                     |
              |                    +----+                     |
              |                                               |
              |                                               |
              +-----------------------------------------------+
               +-----------------+ Warning +-----------------+
               |                                             |
               | The partition table on device xvda was      |
               | unreadable. To create new partitions it     |
               | must be initialized, causing the loss of    |
               | ALL DATA on this drive.                     |
               |                                             |
               | This operation will override any previous   |
               | installation choices about which drives     |
               | to ignore.                                  |
               |                                             |
               | Would you like to initialize this drive,    |
               | erasing ALL DATA?                           |
               |                                             |
               |        +-----+               +----+         |
               |        | Yes |               | No |         |
               |        +-----+               +----+         |
               |                                             |
               |                                             |
               +---------------------------------------------+

Yesを選択

  +-------------------------+ Partitioning Type +-------------------------+
  |                                                                       |
  |    Installation requires partitioning of your hard drive.  The        |
  |    default layout is reasonable for most users.  You can either       |
  |    choose to use this or create your own.                             |
  |                                                                       |
  | Remove all partitions on selected drives and create default layout.   |
  | Remove linux partitions on selected drives and create default layout. |
  | Use free space on selected drives and create default layout.          |
  | Create custom layout.                                                 |
  |                                                                       |
  |       Which drive(s) do you want to use for this installation?        |
  |          [*]   xvda     8189 MB (Xen Virtual Block Device) ^          |
  |                                                            #          |
  |                                                                       |
  |                          +----+   +------+                            |
  |                          | OK |   | Back |                            |
  |                          +----+   +------+                            |
  |                                                                       |
  |                                                                       |
  +-----------------------------------------------------------------------+

OKを選択

                   +-------------+ Warning +-------------+
                   |                                     |
                   | You have chosen to remove all       |
                   | Linux partitions (and ALL DATA on   |
                   | them) on the following drives:      |
                   |                                     |
                   | /dev/xvda                           |
                   |                                     |
                   | Are you sure you want to do this?   |
                   |                                     |
                   |      +----+           +-----+       |
                   |      | No |           | Yes |       |
                   |      +----+           +-----+       |
                   |                                     |
                   |                                     |
                   +-------------------------------------+

Yesを選択(Yesは右にあるので注意)

                 +-------+ Review Partition Layout +-------+
                 |                                         |
                 | Review and modify partitioning layout?  |
                 |                                         |
                 |       +-----+             +----+        |
                 |       | Yes |             | No |        |
                 |       +-----+             +----+        |
                 |                                         |
                 |                                         |
                 +-----------------------------------------+

Yesを選択

+------------------------------+ Partitioning +------------------------------+
|                                                                            |
|        Device          Start    End     Size       Type     Mount Point    |
| VG VolGroup00                            8064M  VolGroup                 ^ |
| LV LogVol01                               544M  swap                     # |
| LV LogVol00                              7520M  ext3        /            : |
| /dev/xvda                                                                : |
|   xvda1                     1      13     101M  ext3        /boot        : |
|   xvda2                    14    1044    8087M  physical v               : |
|                                                                          : |
|                                                                          : |
|                                                                          : |
|                                                                          v |
|                                                                            |
|      +-----+   +------+   +--------+   +------+   +----+   +------+        |
|      | New |   | Edit |   | Delete |   | RAID |   | OK |   | Back |        |
|      +-----+   +------+   +--------+   +------+   +----+   +------+        |
|                                                                            |
|                                                                            |
+----------------------------------------------------------------------------+

とりあえずこのまま。 必要があれば変更。

             +----------+ Boot Loader Configuration +-----------+
             |                                                  |
             | Which boot loader would you like to use?         |
             |                                                  |
             |             (*) Use GRUB Boot Loader             |
             |                ( ) No Boot Loader                |
             |                                                  |
             |         +----+                 +------+          |
             |         | OK |                 | Back |          |
             |         +----+                 +------+          |
             |                                                  |
             |                                                  |
             +--------------------------------------------------+

GRUBでいいので、OKを選択

     +------------------+ Boot Loader Configuration +------------------+
     |                                                                 |
     | A few systems will need to pass special options to the kernel   |
     | at boot time for the system to function properly. If you need   |
     | to pass boot options to the kernel, enter them now. If you      |
     | don't need any or aren't sure, leave this blank.                |
     |                                                                 |
     |        console=xvc0____________________________________         |
     |                                                                 |
     |         [ ] Force use of LBA32 (not normally required)          |
     |                                                                 |
     |             +----+                        +------+              |
     |             | OK |                        | Back |              |
     |             +----+                        +------+              |
     |                                                                 |
     |                                                                 |
     +-----------------------------------------------------------------+

そのままOK

          +-------------+ Boot Loader Configuration +-------------+
          |                                                       |
          | A boot loader password prevents users from passing    |
          | arbitrary options to the kernel.  For highest         |
          | security, we recommend setting a password, but this   |
          | is not necessary for more casual users.               |
          |                                                       |
          |                [ ] Use a GRUB Password                |
          |                                                       |
          |    Boot Loader Password: ________________________     |
          |    Confirm:              ________________________     |
          |                                                       |
          |          +----+                    +------+           |
          |          | OK |                    | Back |           |
          |          +----+                    +------+           |
          |                                                       |
          |                                                       |
          +-------------------------------------------------------+

そのままOK

    +-------------------+ Boot Loader Configuration +-------------------+
    |                                                                   |
    | The boot manager CentOS uses can boot other operating systems     |
    | as well. You need to tell me what partitions you would like to    |
    | be able to boot and what label you want to use for each of them.  |
    |                                                                   |
    | Default  Boot label                Device                         |
    |    *     CentOS                    /dev/VolGroup00/LogVol00   ^   |
    |                                                               :   |
    |                                                               :   |
    |                                                               #   |
    |                                                               v   |
    |                                                                   |
    |        +----+              +------+              +------+         |
    |        | OK |              | Edit |              | Back |         |
    |        +----+              +------+              +------+         |
    |                                                                   |
    |                                                                   |
    +-------------------------------------------------------------------+

そのままOK

             +----------+ Boot Loader Configuration +----------+
             |                                                 |
             | Where do you want to install the boot loader?   |
             |                                                 |
             | /dev/xvda        Master Boot Record (MBR)       |
             | /dev/xvda1       First sector of boot partition |
             |                                                 |
             |         +----+                +------+          |
             |         | OK |                | Back |          |
             |         +----+                +------+          |
             |                                                 |
             |                                                 |
             +-------------------------------------------------+

そのままOK

                  +----+ Configure Network Interface +-----+
                  |                                        |
                  | Would you like to configure the eth0   |
                  | network interface in your system?      |
                  |                                        |
                  |       +-----+            +----+        |
                  |       | Yes |            | No |        |
                  |       +-----+            +----+        |
                  |                                        |
                  |                                        |
                  +----------------------------------------+

Yesを選択

                     ++ Network Configuration for eth0 ++
                     |                                  |
                     |     Xen Virtual Ethernet         |
                     |     00:16:3E:6D:97:57            |
                     |                                  |
                     |     [*] Activate on boot         |
                     |     [*] Enable IPv4 support      |
                     |     [ ] Enable IPv6 support      |
                     |                                  |
                     |       +----+    +------+         |
                     |       | OK |    | Back |         |
                     |       +----+    +------+         |
                     |                                  |
                     |                                  |
                     +----------------------------------+

OKを選択

                 +-----+ IPv4 Configuration for eth0 +-----+
                 |                                         |
                 | Xen Virtual Ethernet                    |
                 | 00:16:3E:6D:97:57                       |
                 |                                         |
                 | ( ) Dynamic IP configuration (DHCP)     |
                 | (*) Manual address configuration        |
                 |                                         |
                 |     IP Address         Prefix (Netmask) |
                 |     192.168.2.11____ / 24______________ |
                 |                                         |
                 |       +----+            +------+        |
                 |       | OK |            | Back |        |
                 |       +----+            +------+        |
                 |                                         |
                 |                                         |
                 +-----------------------------------------+

マニュアル設定で、IPアドレスを記入して、OK。

         +------------+ Miscellaneous Network Settings +------------+
         |                                                          |
         | Gateway:       _________________________________________ |
         | Primary DNS:   _________________________________________ |
         | Secondary DNS: _________________________________________ |
         |                                                          |
         |           +----+                     +------+            |
         |           | OK |                     | Back |            |
         |           +----+                     +------+            |
         |                                                          |
         |                                                          |
         +----------------------------------------------------------+

今回は、全部空のままでOK

        +-----+-------------+ Error With Data +--------------+-----+
         |     |                                              |     |
         | Gate| You have not specified the field gateway.    | ___ |
         | Prim| Depending on your network environment this   | ___ |
         | Seco| may cause problems later.                    | ___ |
         |     |                                              |     |
         |     |                +----------+                  |     |
         |     |                | Continue |                  |     |
         |     |                +----------+                  |     |
         |     |                                              |     |
         |     |                                              |     |
         +-----+----------------------------------------------+ ----+

警告が出るけど、続行 警告は2つ出る(DNSとGateway)

     +--------------------+ Hostname Configuration +--------------------+
     |                                                                  |
     | If your system is part of a larger network where hostnames are   |
     | assigned by DHCP, select automatically via DHCP. Otherwise,      |
     | select manually and enter a hostname for your system. If you     |
     | do not, your system will be known as 'localhost.'                |
     |                                                                  |
     |       ( ) automatically via DHCP                                 |
     |       (*) manually               manto.sc.fosl.co.jp_____        |
     |                                                                  |
     |             +----+                         +------+              |
     |             | OK |                         | Back |              |
     |             +----+                         +------+              |
     |                                                                  |
     |                                                                  |
     +------------------------------------------------------------------+

ホスト名を記入して、OK

                   +-------+ Time Zone Selection +-------+
                   |                                     |
                   | What time zone are you located in?  |
                   |                                     |
                   | [*] System clock uses UTC           |
                   |                                     |
                   |  Asia/Tehran                     ^  |
                   |  Asia/Thimphu                    :  |
                   |  Asia/Tokyo                      #  |
                   |  Asia/Ulaanbaatar                :  |
                   |  Asia/Urumqi                     v  |
                   |                                     |
                   |      +----+          +------+       |
                   |      | OK |          | Back |       |
                   |      +----+          +------+       |
                   |                                     |
                   |                                     |
                   +-------------------------------------+

Asia/Tokyoを選択して、OK

               +--------------+ Root Password +---------------+
               |                                              |
               | Pick a root password. You must type it       |
               | twice to ensure you know what it is and      |
               | didn't make a mistake in typing. Remember    |
               | that the root password is a critical part    |
               | of system security!                          |
               |                                              |
               | Password:           *******_________________ |
               | Password (confirm): *******_________________ |
               |                                              |
               |        +----+               +------+         |
               |        | OK |               | Back |         |
               |        +----+               +------+         |
               |                                              |
               |                                              |
               +----------------------------------------------+

Rootのパスワードを記入して、OK

     +----------------------+ Package selection +----------------------+
     |                                                                 |
     | The default installation of CentOS includes a set of software   |
     | applicable for general internet usage. What additional tasks    |
     | would you like your system to include support for?              |
     |                                                                 |
     |                    [ ] Desktop - Gnome    ^                     |
     |                    [ ] Desktop - KDE      #                     |
     |                    [ ] Server             :                     |
     |                    [ ] Server - GUI       v                     |
     |                                                                 |
     |                [*] Customize software selection                 |
     |                                                                 |
     |             +----+                        +------+              |
     |             | OK |                        | Back |              |
     |             +----+                        +------+              |
     |                                                                 |
     |                                                                 |
     +-----------------------------------------------------------------+

どれも選択せず、下の、「Customize software selection」だけチェックしてOK

              +----------+ Package Group Selection +----------+
              |                                               |
              | Please select the package groups you would    |
              | like to have installed.                       |
              |                                               |
              |   [ ] Authoring and Publishing            ^   |
              |   [*] Base                                #   |
              |   [ ] Cluster Storage                     :   |
              |   [ ] Clustering                          :   |
              |   [ ] DNS Name Server                     :   |
              |   [ ] Development Libraries               v   |
              |                                               |
              |        +----+                +------+         |
              |        | OK |                | Back |         |
              |        +----+                +------+         |
              |                                               |
              |                                               |
              +-----------------------------------------------+

チェックするのは次の通り

 - Base
 - Development Libraries
 - Development Tools
 - Editors

チェックしたら、OK

     +----------------------+ Dependency Check +-----------------------+
     |                                                                 |
     | Checking dependencies in packages selected for installation...  |
     |                                                                 |
     |                               17%                               |
     |                                                                 |
     +-----------------------------------------------------------------+

こんなかんじで、依存関係チェックが入る。

                +---------+ Installation to begin +----------+
                |                                            |
                | A complete log of your installation will   |
                | be in /root/install.log after rebooting    |
                | your system. You may want to keep this     |
                | file for later reference.                  |
                |                                            |
                |       +----+              +------+         |
                |       | OK |              | Back |         |
                |       +----+              +------+         |
                |                                            |
                |                                            |
                +--------------------------------------------+

インストールの最終確認。 OKを選ぶ。

         +---------------------+ Formatting +----------------------+
         |                                                         |
         | Formatting / file system...                             |
         |                                                         |
         |                           77%                           |
         |                                                         |
         +---------------------------------------------------------+

まずファイルシステムのフォーマットが走る。

        +------------------+ Package Installation +------------------+
        |                                                            |
        |  Name   : cracklib-dicts-2.8.9-3.3-i386                    |
        |  Size   : 7855k                                            |
        |  Summary: The standard CrackLib dictionaries.              |
        |                                                            |
        |                                                            |
        |  Status:                                                   |
        |                                                            |
        |                             0%                             |
        |                                                            |
        |                          Packages      Bytes        Time   |
        |   Total    :                  517      1138M     0:03:21   |
        |   Completed:                   10         9M     0:00:01   |
        |   Remaining:                  507      1129M     0:03:20   |
        |                                                            |
        |                             0%                             |
        |                                                            |
        +------------------------------------------------------------+

それぞれのファイルのインストールが進んでいく。

待つ。

ヒマなので、仮想マシンの様子を見てみる。

# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     1761     2 r-----     57.3
manto                                      1      255     1 -b----     67.4
         +----------------------+ Complete +-----------------------+
         |                                                         |
         | Congratulations, your CentOS installation is complete.  |
         |                                                         |
         | Remove any media used during the installation process   |
         | and press <Enter> to reboot your system.                |
         |                                                         |
         |                                                         |
         |                       +--------+                        |
         |                       | Reboot |                        |
         |                       +--------+                        |
         |                                                         |
         |                                                         |
         +---------------------------------------------------------+

終わった。

あとは、ゲストマシンを通常のCentOSとしてセットアップを進めていけばいい。


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS