#topicpath
----
#contents
----
Oracle 10g を試してみるため、[[CentOS:http://www.centos.org/]] 4.2 を Windows XP の [[VMWare:http://www.vmware.com/]] 5 にインストールしてみました。「サーバ」で最低限の構成にして、X は入れて Gnome や KDE は入れず。
Oracle 10g を試してみるため、[[CentOS:http://www.centos.org/]] 4.2 を Windows XP の [[VMware:http://www.vmware.com/]] 5 にインストールしてみました。「サーバ」で最低限の構成にして、X は入れて Gnome や KDE は入れず。

ディスクはこんな感じ。6GB 確保。VMWare ではメモリは 276MB しか取れなかったので、swap は多めに 1GB にしています。df では出てこないんですね。よくわかりません。
ディスクはこんな感じ。6GB 確保。VMware ではメモリは 276MB しか取れなかったので、swap は多めに 1GB にしています。df では出てこないんですね。よくわかりません。

 [root@centos4 ~]# df -h
 Filesystem          サイズ  使用  残り 使用% マウント位置
 /dev/mapper/VolGroup00-LogVol01
                       4.8G  1.7G  2.9G  37% /
 /dev/sda1              99M   13M   82M  14% /boot
 none                  135M     0  135M   0% /dev/shm

* yum update [#wc562fd9]

パッケージを最新にupdate。何も設定していなくても、いきなり yum update していいみたいです。

近場から取ってくるための設定は、/etc/yum.repos.d/CentOS-Base.repo を参考にして /etc/yum.conf を書けばいいのかなとは思いますが、よくわからないのでそのまま実行。

 [root@centos4 ~]# yum update
 Setting up Update 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
 primary.xml.gz            100% |=========================|  17 kB    00:00     
 ...
 Added 33 new packages, deleted 0 old in 0.47 seconds
 Resolving Dependencies
 --> Populating transaction set with selected packages. Please wait.
 ---> Downloading header for libungif to pack into transaction set.
 libungif-4.1.3-1.el4.2.i3 100% |=========================| 6.5 kB    00:00     
 ---> Package libungif.i386 0:4.1.3-1.el4.2 set to be updated
 ...
 --> Running transaction check
 
 Dependencies Resolved
 
 =============================================================================
  Package                 Arch       Version          Repository        Size 
 =============================================================================
 Installing:
  kernel                  i686       2.6.9-22.0.1.EL  update            9.7 M
  kernel-devel            i686       2.6.9-22.0.1.EL  update            3.6 M
 Updating:
  curl                    i386       7.12.1-6.rhel4   update            230 k
  curl-devel              i386       7.12.1-6.rhel4   update            245 k
  kernel-hugemem-devel    i686       2.6.9-22.0.1.EL  update            3.6 M
  kernel-smp-devel        i686       2.6.9-22.0.1.EL  update            3.6 M
  libungif                i386       4.1.3-1.el4.2    update             39 k
  nss_ldap                i386       226-10           update            1.0 M
  openldap                i386       2.2.13-4         update            234 k
  openldap-devel          i386       2.2.13-4         update            1.3 M
  openssl                 i686       0.9.7a-43.4      update            1.1 M
  openssl-devel           i586       0.9.7a-43.4      update            1.6 M
  pam                     i386       0.77-66.13       update            1.8 M
  pam-devel               i386       0.77-66.13       update             83 k
  util-linux              i386       2.12a-16.EL4.12  update            1.5 M
  wget                    i386       1.10.2-0.40E     update            567 k
 
 Transaction Summary
 =============================================================================
 Install      2 Package(s)         
 Update      14 Package(s)         
 Remove       0 Package(s)         
 Total download size: 30 M
 Is this ok [y/N]: y
 Downloading Packages:
 (1/16): libungif-4.1.3-1. 100% |=========================|  39 kB    00:00   
 (2/16): kernel-hugemem-de 100% |=========================| 3.6 MB    00:12     
 (3/16): pam-0.77-66.13.i3 100% |=========================| 1.8 MB    00:10   
 ...
 (16/16): openldap-2.2.13- 100% |=========================| 234 kB    00:03     
 warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 443e1821
 Public key for libungif-4.1.3-1.el4.2.i386.rpm is not installed
 Retrieving GPG key from http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
 Importing GPG key 0x443E1821 "CentOS-4 key <centos-4key@centos.org>"
 Is this ok [y/N]: y
 Key imported successfully
 Running Transaction Test
 Finished Transaction Test
 Transaction Test Succeeded
 Running Transaction
   Updating  : openssl                      ####################### [ 1/30] 
   Updating  : pam                          ####################### [ 2/30] 
   Updating  : openldap      
 ...
   Cleanup   : openssl-devel                ####################### [29/30]
   Cleanup   : openldap                     ####################### [30/30]
 
 Installed: kernel.i686 0:2.6.9-22.0.1.EL kernel-devel.i686 0:2.6.9-22.0.1.EL
 Updated: curl.i386 0:7.12.1-6.rhel4 curl-devel.i386 0:7.12.1-6.rhel4 kernel-huge
 mem-devel.i686 0:2.6.9-22.0.1.EL kernel-smp-devel.i686 0:2.6.9-22.0.1.EL libungi
 f.i386 0:4.1.3-1.el4.2 nss_ldap.i386 0:226-10 openldap.i386 0:2.2.13-4 openldap-
 devel.i386 0:2.2.13-4 openssl.i686 0:0.9.7a-43.4 openssl-devel.i586 0:0.9.7a-43.
 4 pam.i386 0:0.77-66.13 pam-devel.i386 0:0.77-66.13 util-linux.i386 0:2.12a-16.E
 L4.12 wget.i386 0:1.10.2-0.40E
 Complete!
 [root@centos4 ~]#

カーネルが更新されたので、一応 reboot します。

 [root@centos4 ~]# shutdown -r now

* VMWare Tools [#w3f4a2a8]

VMWare Tools も入れておきます。メニューから選択。

&ref(vmware-tools:install.png);

CD-ROM として見えるので、まず mount します。/media/cdrom なんですねぇ。rpm で入れます。

 [root@centos4 cdrom]# mount -ro /dev/hdc /media/cdrom
 [root@centos4 cdrom]# cd /media/cdrom/
 [root@centos4 cdrom]# ls
 VMwareTools-5.0.0-13124.i386.rpm  VMwareTools-5.0.0-13124.tar.gz
 [root@centos4 cdrom]# rpm -ivh VMwareTools-5.0.0-13124.i386.rpm 
 Preparing...                ########################################### [100%]
    1:VMwareTools            ########################################### [100%]
 [root@centos4 cdrom]# eject

vmware-config-tools.pl を実行して設定。

- マウスやファイル共有などの kernel module を作る
- X の設定をする

という処理がされるようです。

 [root@centos4 ~]# vmware-config-tools.pl 
 
 Stopping VMware Tools services in the virtual machine:
    Guest operating system daemon:                          [  OK  ]
 Trying to find a suitable vmhgfs module for your running kernel.
 
 None of the pre-built vmhgfs modules for VMware Tools is suitable for your 
 running kernel.  Do you want this program to try to build the vmhgfs module for 
 your system (you need to have a C compiler installed on your system)? [yes] 
 
 Using compiler "/usr/bin/gcc". Use environment variable CC to override.
 
 What is the location of the directory of C header files that match your running 
 kernel? [/lib/modules/2.6.9-22.0.1.EL/build/include] 
 
 Extracting the sources of the vmhgfs module.
 
 Building the vmhgfs module.
 
 Using 2.6.x kernel build system.
 make: Entering directory `/tmp/vmware-config0/vmhgfs-only'
 make -C /lib/modules/2.6.9-22.0.1.EL/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
 make[1]: Entering directory `/usr/src/kernels/2.6.9-22.0.1.EL-i686'
   CC [M]  /tmp/vmware-config0/vmhgfs-only/cpName.o
   CC [M]  /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
   CC [M]  /tmp/vmware-config0/vmhgfs-only/dev.o
   CC [M]  /tmp/vmware-config0/vmhgfs-only/driver.o
 ...
 Detected X.org version 6.8.
 
 コンソールマウスサービスを停止中:                          [  OK  ]
 コンソールマウスサービスを起動中:                          [  OK  ]
 
 Please choose one of the following display sizes (1 - 9):
 
 [1]  "640x480"
 [2]< "800x600"
 [3]  "1024x768"
 [4]  "1152x864"
 [5]  "1152x900"
 [6]  "1280x1024"
 [7]  "1376x1032"
 [8]  "1600x1200"
 [9]  "2364x1773"
 Please enter a number between 1 and 9:
 
 [2]
 
 ...
 
 Starting VMware Tools services in the virtual machine:
    Switching to guest configuration:                       [  OK  ]
    Guest filesystem driver:                                [  OK  ]
    DMA setup:                                              [  OK  ]
    Guest operating system daemon:                          [  OK  ]
 
 The configuration of VMware Tools 5.0.0 build-13124 for Linux for this running 
 kernel completed successfully.
 
 You must restart your X session before any mouse or graphics changes take 
 effect.
 
 You can now run VMware Tools by invoking the following command: 
 "/usr/bin/vmware-toolbox" during an XFree86 session.
 
 To use the vmxnet driver, restart networking using the following commands: 
 /etc/init.d/network stop
 rmmod pcnet32
 rmmod vmxnet
 depmod -a
 modprobe vmxnet
 /etc/init.d/network start
 
 Enjoy,
 
 --the VMware team
 
 [root@centos4 ~]#

最後に言われたように、vmxnet を読み込み直します。

 [root@centos4 ~]# /etc/init.d/network stop
 インターフェース eth0 を終了中:                            [  OK  ]
 ループバックインターフェースを終了中                       [  OK  ]
 [root@centos4 ~]# rmmod pcnet32
 [root@centos4 ~]# rmmod vmxnet
 ERROR: Module vmxnet does not exist in /proc/modules
 [root@centos4 ~]# depmod -a
 [root@centos4 ~]# modprobe vmxnet
 [root@centos4 ~]# /etc/init.d/network start
 ネットワークパラメーターを設定中:                          [  OK  ]
 ループバックインターフェイスを呼び込み中                   [  OK  ]
 インターフェース eth0 を活性化中:                          [  OK  ]
 [root@centos4 ~]# 

最後に、時刻を合わせます。vmware-toolbox を起動して、チェックを入れるだけです。

&ref(vmware-tools:time-sync.png);

 [root@centos4 ~]# date
 2005年 11月 10日 木曜日 17:08:39 JST

ここまで終われば、CentOS として普通に使えます。

* VMWare ファイル共有 [#tf4744eb]
* VMware ファイル共有 [#tf4744eb]

VM->Settings->Options で "Shared Folders" という設定があります。フォルダを追加して名前を付けるだけです。

&ref(vmware:sharedfolder.png);

このようにファイル共有が設定されていれば、/mnt/hgfs/ に shared/ として見えます。

 [root@centos4 ~]# ls /mnt/hgfs/
 shared

----
#comment

トップ   差分 履歴 リロード   一覧 検索 最終更新   ヘルプ   最終更新のRSS