M1210 CentOS 3 VMWareインストール

さて、これでベースとなるOSインストールとネットワーク設定が完了したので、次は実際にいろいろやる仮想環境を構築します。
構成はこんなかんじ

host os (VMwareを動かすだけ)
- guest 01 (web/app server)
- guest 02 (db server)

ちなみにストレージやSVNのリポジトリなんかは速度がいらないのでルイフーなダイナブックでやる予定。

とりあえずyumでいれられないかためしてみる。

# yum list *VM*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * rpmforge: ftp-stud.fht-esslingen.de
 * base: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
 * addons: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
Installed Packages
libXxf86vm.i386                          1.0.1-3.1                     installed
lvm2.i386                                2.02.40-6.el5                 installed
Available Packages
convmv.noarch                            1.14-1.el5.rf                 rpmforge
gnome-applet-vm.i386                     0.1.2-1.el5                   base
kmod-kvm.i686                            36-3                          extras
kmod-kvm-PAE.i686                        36-3                          extras
kvm.i386                                 36-1                          extras
libXvMC.i386                             1.0.2-2.1                     base
libXvMC-devel.i386                       1.0.2-2.1                     base
libXxf86vm-devel.i386                    1.0.1-3.1                     base
lvm2-cluster.i386                        2.02.40-7.el5                 base
perl-Linux-LVM.noarch                    0.14-1.el5.rf                 rpmforge
pvm.i386                                 3.4.5-7.fc6.1                 base
pvm-gui.i386                             3.4.5-7.fc6.1                 base
system-config-lvm.noarch                 1.1.5-1.0.el5                 base
torcs-data-cars-VM.noarch                1.2.2-1.0.dag                 rpmforge
vmpsd.i386                               1.3-1.2.el5.rf                rpmforge
xorg-x11-drv-vmmouse.i386                12.4.0-2.1                    base
xorg-x11-drv-vmware.i386                 10.13.0-2.1                   base

ない。残念。
ぐぐってみるとどうやらrpmならアル様子。

でも入れる前の準備として kernel-devel をいれないといけないらしい。

# yum install kernel-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * rpmforge: ftp-stud.fht-esslingen.de
 * base: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
 * addons: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.i686 0:2.6.18-164.el5 set to be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch         Version                Repository       Size
================================================================================
Installing:
 kernel-devel         i686         2.6.18-164.el5         updates         5.2 M

Transaction Summary
================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total size: 5.2 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : kernel-devel                                      [1/1]

Installed: kernel-devel.i686 0:2.6.18-164.el5
Complete!

OKです。次

xinetdも必要らしいです。

# yum install xinetd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * rpmforge: fr2.rpmfind.net
 * base: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
 * addons: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package xinetd.i386 2:2.3.14-10.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch           Version                   Repository      Size
================================================================================
Installing:
 xinetd           i386           2:2.3.14-10.el5           base           124 k

Transaction Summary
================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 124 k
Is this ok [y/N]: y
Downloading Packages:
xinetd-2.3.14-10.el5.i386.rpm                            | 124 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : xinetd                                            [1/1]

Installed: xinetd.i386 2:2.3.14-10.el5
Complete!

こっちもOK。

次はVMware本体。会員登録が必要らしい。
ダウンロードにログインが必要ということはwgetできないですね。

http://www.vmware.com/jp/products/server/

ここからダウンロードへ

ダウンロードしたものはwinscpでcentosの/usr/local/srcへ

そしてインストール

# cd /usr/local/src
# rpm -ihv VMware-server-2.0.1-156745.i386.rpm
準備中...                ########################################### [100%]
   1:VMware-server          ########################################### [100%]

The installation of VMware Server 2.0.1 for Linux completed successfully.
You can decide to remove this software from your system at any time by
invoking the following command: "rpm -e VMware-server".

Before running VMware Server for the first time, you need to
configure it for your running kernel by invoking the
following command: "/usr/bin/vmware-config.pl".

Enjoy,

    --the VMware team

オプションを指定したのに途中でなにかいろいろでたりしない!
不安ですな。

でもちゃんとはいってるのでOK。

# rpm -qa | grep -i vmware
VMware-server-2.0.1-156745

さて起動前に設定スクリプトを起動しなさいといってるので設定します。

# vmware-config.pl
Setup is unable to find the "make" program on your machine. Please make sure
it is installed. Do you want to specify the location of this program by hand?
[yes]

What is the location of the "make" program on your
machine?

makeはどこだ??だと!はいってないのか!!
というわけで入れます。

一旦 ctrl + Cでインストールを中止して、

# yum install make
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * rpmforge: ftp-stud.fht-esslingen.de
 * base: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
 * addons: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package make.i386 1:3.81-3.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================================================================
 Package                                   Arch                                      Version                                              Repository                                 Size
==========================================================================================================================================================================================
Installing:
 make                                      i386                                      1:3.81-3.el5                                         base                                      466 k

Transaction Summary
==========================================================================================================================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total size: 466 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : make                                              [1/1]

Installed: make.i386 1:3.81-3.el5
Complete!

もっかい設定を。

# vmware-config.pl
Making sure services for VMware Server are stopped.

Stopping VMware autostart virtual machines:
   Virtual machines                                        [失敗]
Stopping VMware management services:
   VMware Virtual Infrastructure Web Access
   VMware Server Host Agent                                [失敗]
Stopping VMware services:
   VMware Authentication Daemon                            [  OK  ]
   Virtual machine monitor                                 [  OK  ]

You must read and accept the End User License Agreement to continue.
Press enter to display it.

一旦止まった。なんか失敗ってでてるけど・・・・
起動してもいないものをとめようとしたんじゃないかという気がするので放置してENTER。

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no)

The answer "" is invalid. It must be one of "y" or "n".

Do you accept? (yes/no) yes

enter押しっぱなしだとこうなるので、yesをいれてenter

Thank you.

The bld-2.6.18-8.el5-i686smp-RHEL5 - vmmon module loads perfectly into the
running kernel.

The bld-2.6.18-8.el5-i686smp-RHEL5 - vmci module loads perfectly into the
running kernel.

The bld-2.6.18-8.el5-i686smp-RHEL5 - vsock module loads perfectly into the
running kernel.
Do you want networking for your virtual machines? (yes/no/help) [yes]

Configuring a bridged network for vmnet0.

Please specify a name for this network.
[Bridged]

Your computer has multiple ethernet network interfaces available: eth0, wlan0.
Which one do you want to bridge to vmnet0? [eth0]

The following bridged networks have been defined:

. vmnet0 is bridged to eth0

Do you wish to configure another bridged network? (yes/no) [no]

Do you want to be able to use NAT networking in your virtual machines? (yes/no)
[yes]

Configuring a NAT network for vmnet8.

Please specify a name for this network. [NAT]

Do you want this program to probe for an unused private subnet? (yes/no/help)
[yes]

Probing for an unused private subnet (this can take some time)...


The subnet 172.16.43.0/255.255.255.0 appears to be unused.

The following NAT networks have been defined:

. vmnet8 is a NAT network on private subnet 172.16.43.0.

Do you wish to configure another NAT network? (yes/no) [no]

Do you want to be able to use host-only networking in your virtual machines?
[yes]
Configuring a host-only network for vmnet1.

Please specify a name for this network.
[HostOnly]

Do you want this program to probe for an unused private subnet? (yes/no/help)
[yes]

Probing for an unused private subnet (this can take some time)...

The subnet 192.168.58.0/255.255.255.0 appears to be unused.

The following host-only networks have been defined:

. vmnet1 is a host-only network on private subnet 192.168.58.0.

Do you wish to configure another host-only network? (yes/no) [no]

The bld-2.6.18-8.el5-i686smp-RHEL5 - vmnet module loads perfectly into the
running kernel.

Please specify a port for remote connections to use [902]

Please specify a port for standard http connections to use [8222]

Please specify a port for secure http (https) connections to use [8333]

The current administrative user for VMware Server is ''. Would you like to
specify a different administrator? [no]

Using root as the VMware Server administrator.

In which directory do you want to keep your virtual machine files?
[/var/lib/vmware/Virtual Machines]

The path "/var/lib/vmware/Virtual Machines" does not exist currently. This
program is going to create it, including needed parent directories. Is this
what you want? [yes]

Do you want to enter a serial number now? (yes/no/help) [no]

Creating a new VMware VIX API installer database using the tar4 format.

Installing VMware VIX API.

In which directory do you want to install the VMware VIX API binary files?
[/usr/bin]

In which directory do you want to install the VMware VIX API library files?
[/usr/lib/vmware-vix/lib]

The path "/usr/lib/vmware-vix/lib" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the VMware VIX API document pages?
[/usr/share/doc/vmware-vix]

The path "/usr/share/doc/vmware-vix" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

The installation of VMware VIX API 1.6.2 build-156745 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-vix.pl".

Enjoy,

--the VMware team

最後にシリアル入れて終わり。

Starting VMware services:
   Virtual machine monitor                                 [  OK  ]
   Virtual machine communication interface                 [  OK  ]
   VM communication interface socket family:               [  OK  ]
   Virtual ethernet                                        [  OK  ]
   Bridged networking on /dev/vmnet0                       [  OK  ]
   Host-only networking on /dev/vmnet1 (background)        [  OK  ]
   DHCP server on /dev/vmnet1                              [  OK  ]
   Host-only networking on /dev/vmnet8 (background)        [  OK  ]
   DHCP server on /dev/vmnet8                              [  OK  ]
   NAT service on /dev/vmnet8                              [  OK  ]
   VMware Server Authentication Daemon (background)        [  OK  ]
   Shared Memory Available                                 [  OK  ]
Starting VMware management services:
   VMware Server Host Agent (background)                   [  OK  ]
   VMware Virtual Infrastructure Web Access
Starting VMware autostart virtual machines:
   Virtual machines                                        [失敗]
The configuration of VMware Server 2.0.1 build-156745 for Linux for this
running kernel completed successfully.

一番最後に失敗!!!!!!!!!!
VMを起動使用として失敗!!

とりあえず再起動してプロセスをみてみる。

# reboot
# ps aux | grep vm
root 3005 0.0 0.0 4980 780 pts/0 S+ 00:44 0:00 grep vm

ない。

# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.5  0.0   2064   652 ?        Ss   00:41   0:00 init [3]
root         2  0.0  0.0      0     0 ?        S<   00:41   0:00 [migration/0]
root         3  0.0  0.0      0     0 ?        SN   00:41   0:00 [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S<   00:41   0:00 [watchdog/0]
root         5  0.0  0.0      0     0 ?        S<   00:41   0:00 [migration/1]
root         6  0.0  0.0      0     0 ?        SN   00:41   0:00 [ksoftirqd/1]
root         7  0.0  0.0      0     0 ?        S<   00:41   0:00 [watchdog/1]
root         8  0.0  0.0      0     0 ?        S<   00:41   0:00 [events/0]
root         9  0.0  0.0      0     0 ?        S<   00:41   0:00 [events/1]
root        10  0.0  0.0      0     0 ?        S<   00:41   0:00 [khelper]
root        11  0.0  0.0      0     0 ?        S<   00:41   0:00 [kthread]
root        15  0.0  0.0      0     0 ?        S<   00:41   0:00 [kblockd/0]
root        16  0.0  0.0      0     0 ?        S<   00:41   0:00 [kblockd/1]
root        17  0.0  0.0      0     0 ?        S<   00:41   0:00 [kacpid]
root       154  0.0  0.0      0     0 ?        S<   00:41   0:00 [cqueue/0]
root       155  0.0  0.0      0     0 ?        S<   00:41   0:00 [cqueue/1]
root       158  0.0  0.0      0     0 ?        S<   00:41   0:00 [khubd]
root       160  0.0  0.0      0     0 ?        S<   00:41   0:00 [kseriod]
root       227  0.0  0.0      0     0 ?        S    00:41   0:00 [pdflush]
root       228  0.0  0.0      0     0 ?        S    00:41   0:00 [pdflush]
root       229  0.0  0.0      0     0 ?        S<   00:41   0:00 [kswapd0]
root       230  0.0  0.0      0     0 ?        S<   00:41   0:00 [aio/0]
root       231  0.0  0.0      0     0 ?        S<   00:41   0:00 [aio/1]
root       392  0.0  0.0      0     0 ?        S<   00:41   0:00 [kpsmoused]
root       424  0.0  0.0      0     0 ?        S<   00:41   0:00 [ata/0]
root       425  0.0  0.0      0     0 ?        S<   00:41   0:00 [ata/1]
root       426  0.0  0.0      0     0 ?        S<   00:41   0:00 [ata_aux]
root       430  0.0  0.0      0     0 ?        S<   00:41   0:00 [scsi_eh_0]
root       431  0.0  0.0      0     0 ?        S<   00:41   0:00 [scsi_eh_1]
root       435  0.0  0.0      0     0 ?        S<   00:41   0:00 [kstriped]
root       448  0.0  0.0      0     0 ?        S<   00:41   0:00 [ksnapd]
root       463  0.0  0.0      0     0 ?        S<   00:41   0:00 [kjournald]
root       495  0.0  0.0      0     0 ?        S<   00:42   0:00 [kauditd]
root       529  0.2  0.0   2808  1388 ?        S<s  00:42   0:00 /sbin/udevd -d
root      1190  0.0  0.0      0     0 ?        S<   00:42   0:00 [iwl3945/0]
root      1191  0.0  0.0      0     0 ?        S<   00:42   0:00 [iwl3945/1]
root      1216  0.0  0.0      0     0 ?        S<   00:42   0:00 [iwl3945]
root      1485  0.0  0.0      0     0 ?        S<   00:42   0:00 [hd-audio0]
root      1693  0.0  0.0      0     0 ?        S<   00:42   0:00 [kmpathd/0]
root      1694  0.0  0.0      0     0 ?        S<   00:42   0:00 [kmpathd/1]
root      1695  0.0  0.0      0     0 ?        S<   00:42   0:00 [kmpath_handlerd]
root      1721  0.0  0.0      0     0 ?        S<   00:42   0:00 [kjournald]
root      1876  0.0  0.0      0     0 ?        S<   00:42   0:00 [kondemand/0]
root      1877  0.0  0.0      0     0 ?        S<   00:42   0:00 [kondemand/1]
root      2000  0.0  0.0   2160   496 ?        Ss   00:42   0:00 mcstransd
root      2314  0.0  0.0   2308   492 ?        Ss   00:42   0:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
root      2615  0.0  0.2  11572  9916 ?        Ss   00:43   0:00 /usr/sbin/restorecond
root      2630  0.0  0.0   1720   584 ?        Ss   00:43   0:00 syslogd -m 0
root      2633  0.0  0.0   1672   404 ?        Ss   00:43   0:00 klogd -x
dbus      2678  0.0  0.0  12984  1000 ?        Ssl  00:43   0:00 dbus-daemon --system
root      2728  0.0  0.0   7308  1140 ?        Ssl  00:43   0:00 automount
root      2754  0.0  0.0   1668   524 ?        Ss   00:43   0:00 /usr/sbin/acpid
root      2772  0.0  0.0   7056  1052 ?        Ss   00:43   0:00 /usr/sbin/sshd
root      2788  0.0  0.0   2676   692 ?        Ss   00:43   0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root      2803  0.0  0.0   1900   472 ?        Ss   00:43   0:00 gpm -m /dev/input/mice -t exps2
root      2818  0.4  0.0   5288  1184 ?        Ss   00:43   0:00 crond
root      2856  0.0  0.0   2264   444 ?        Ss   00:43   0:00 /usr/sbin/atd
68        2885  2.8  0.1   5740  3960 ?        Ss   00:43   0:00 hald
root      2886  0.0  0.0   3152  1112 ?        S    00:43   0:00 hald-runner
68        2893  0.0  0.0   2012   828 ?        S    00:43   0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
68        2897  0.0  0.0   2012   824 ?        S    00:43   0:00 hald-addon-keyboard: listening on /dev/input/event0
68        2906  0.0  0.0   2012   820 ?        S    00:43   0:00 hald-addon-keyboard: listening on /dev/input/event5
68        2909  0.0  0.0   2012   824 ?        S    00:43   0:00 hald-addon-keyboard: listening on /dev/input/event4
68        2912  0.0  0.0   2012   820 ?        S    00:43   0:00 hald-addon-keyboard: listening on /dev/input/event3
root      2916  0.0  0.0   1968   676 ?        S    00:43   0:00 hald-addon-storage: polling /dev/hdc
root      2920  0.0  0.3  25512 10140 ?        SN   00:43   0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
root      2926  0.0  0.0   1656   456 tty1     Ss+  00:43   0:00 /sbin/mingetty tty1
root      2927  0.0  0.0   1656   456 tty2     Ss+  00:43   0:00 /sbin/mingetty tty2
root      2928  0.0  0.0   1656   460 tty3     Ss+  00:43   0:00 /sbin/mingetty tty3
root      2929  0.0  0.0   1656   456 tty4     Ss+  00:43   0:00 /sbin/mingetty tty4
root      2930  0.0  0.0   1656   452 tty5     Ss+  00:43   0:00 /sbin/mingetty tty5
root      2931  0.0  0.0   1656   456 tty6     Ss+  00:43   0:00 /sbin/mingetty tty6
root      2967  0.0  0.0   2552  1100 ?        SN   00:43   0:00 /usr/libexec/gam_server
root      2984  0.7  0.0   9908  2868 ?        Rs   00:43   0:00 sshd: root@pts/0
root      2986  0.2  0.0   5468  1496 pts/0    Ss   00:44   0:00 -bash
root      3006  0.0  0.0   5188   948 pts/0    R+   00:44   0:00 ps aux

もう一回設定しろといわれた。


# vmware-config.pl
Making sure services for VMware Server are stopped.
Stopping VMware autostart virtual machines:
   Virtual machines                                        [失敗]
Stopping VMware management services:
   VMware Virtual Infrastructure Web Access
   VMware Server Host Agent                                [失敗]
Stopping VMware services:
   VMware Authentication Daemon                            [  OK  ]
   VM communication interface socket family:               [  OK  ]
   Virtual machine communication interface                 [  OK  ]
   Virtual machine monitor                                 [  OK  ]
   Bridged networking on /dev/vmnet0                       [  OK  ]
   Host network detection                                  [  OK  ]
   DHCP server on /dev/vmnet1                              [  OK  ]
   Host-only networking on /dev/vmnet1                     [  OK  ]
   DHCP server on /dev/vmnet8                              [  OK  ]
   NAT service on /dev/vmnet8                              [  OK  ]
   Host-only networking on /dev/vmnet8                     [  OK  ]
   Virtual ethernet                                        [  OK  ]
You must read and accept the End User License Agreement to continue.
Press enter to display it.

最初にでてくる失敗2個が非常にびっくりする。
起動していないものを終了させようとしたから出ているんだろうけど・・・
でも3番目以降は起動していないのに失敗になってない。
あやしい・・・。
が、とりあえずすすめてみることにする。



Please specify a port for remote connections to use [902]

enter

Using Existing SSL Certificate.
You have a pre-existing config.xml. The new version will be created as
/etc/vmware/hostd/NEW_config.xml. Please check the new file for any new values
that you may need to migrate to your current config.xml.

前回と違って既存のSSLを使うといってる。前回作ったものがのこっているからだな。

(略)

Starting VMware autostart virtual machines:
Virtual machines [失敗]

The configuration of VMware Server 2.0.1 build-156745 for Linux for this
running kernel completed successfully.

やはり最後の自動起動で失敗するなあ。

ログをみてみる

# tail /var/log/messages
Oct 13 00:06:30 localhost kernel: type=1400 audit(1255359990.806:6): avc: denied { execmod } for pid=3990 comm="vmware-vimsh" path="/usr/lib/vmware/vmacore/libvmacore.so.1.0" dev=dm-0 ino=7045897 scontext=root:system_r:unconfined_execmem_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

よくわからない。
ので、centosでvmwareで検索するとポート902番を別のものが使っているということがかかれていた。

# netstat -av
Active Internet connections (servers and established)
tcp 0 0 *:ideafarm-chat *:* LISTEN

どうやらこの「ideafarm-chat」というやつが902らしい。
とめてしまっていいのか分からないのでぐぐってみたが、
902がウェルノウンとしてこいつのために予約されていることしかわからず。

http://www.archivum.info/fedora-list@redhat.com/2007-02/01183/Re:_VMWare_repo

どうやらドータン・コーヘン氏にもわからないようだ。
manでもなにもでないと。

一応やってみる

# man ideafarm
No manual entry for ideafarm
# man ideafarm-chat
No manual entry for ideafarm-chat

コーヘン氏同様になにもでない。
そしていくらググってもVMwareを動かすために邪魔だという情報ばかりでてくる。
そしてこいつを殺してVMwareを動かすか、VMwareに904を割り当てるかのどちらかで回避しているようだ。
こいつがなにか重要な可能性もあるので生かしておくことにした。
ので、もう一度設定へ。

そして設定途中のココ

Please specify a port for remote connections to use [902] 904

WARNING: VMware Server has been configured to run on a port different from the
default port. Please make sure to use this port when installing remote clients
on other machines.

デフォルトを使わないことにしたのでリモートでつなぐときはクライアントの設定に
注意しな!といってる。なんと親切な。

そしてあとはenter連打。

Starting VMware autostart virtual machines:
Virtual machines [失敗]

アッー!!!
また失敗した。どうやらこいつが失敗するのはポートのせいではなかったみたい。

こまったので再起動してみる。

#reboot
# ps aux | grep vm
root      2751  0.0  0.0   2008   348 ?        Ss   00:31   0:00 /usr/bin/vmnet-bridge -d /var/run/vmnet-bridge-0.pid -n 0 -i eth0
root      2763  0.0  0.0   2516   296 ?        Ss   00:31   0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
root      2781  0.0  0.0   2516   296 ?        Ss   00:31   0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet8/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8
root      2786  0.0  0.0   2460   448 ?        Ss   00:31   0:00 /usr/bin/vmnet-natd -d /var/run/vmnet-natd-8.pid -m /var/run/vmnet-natd-8.mac -c /etc/vmware/vmnet8/nat/nat.conf
root      3052  0.0  0.0   4532  1260 ?        S    00:31   0:00 /bin/sh /usr/bin/vmware-watchdog -s webAccess -u 30 -q 5 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root      3059  0.0  0.0   2476   516 ?        Ss   00:31   0:00 /usr/sbin/vmware-authdlauncher
root      3065  0.3  0.7 245896 26888 ?        Ssl  00:31   0:02 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root      3397  0.0  0.0   1984   184 ?        Ss   00:31   0:00 /usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet1.pid /dev/vmnet1 vmnet1
root      3410  0.0  0.0   1984   188 ?        Ss   00:31   0:00 /usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet8.pid /dev/vmnet8 vmnet8
root      3596  0.0  0.0   4984   776 pts/0    S+   00:40   0:00 grep vm

再起動がおわったのでプロセスを見てみると。
VMwareがいますねぇ。

でもautostartがない。
とりあえずサービスをいじってみる

# service vmware-autostart start
Starting VMware autostart virtual machines:
   Virtual machines                                        [失敗]
# service vmware-autostart stop
Stopping VMware autostart virtual machines:
   Virtual machines                                        [失敗]

やはり失敗するのでログを見る。

# tail /var/log/messages
Oct 13 00:41:40 localhost kernel: type=1400 audit(1255362100.432:6): avc: denied { execmod } for pid=3614 comm="vmware-vimsh" path="/usr/lib/vmware/vmacore/libvmacore.so.1.0" dev=dm-0 ino=7045897 scontext=root:system_r:unconfined_execmem_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file
Oct 13 00:41:44 localhost kernel: type=1400 audit(1255362104.508:7): avc: denied { execmod } for pid=3676 comm="vmware-vimsh" path="/usr/lib/vmware/vmacore/libvmacore.so.1.0" dev=dm-0 ino=7045897 scontext=root:system_r:unconfined_execmem_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

かわってない。execmodが拒否されているようなのでググるとどうやらSELinuxが嫌がっているようだ。
SELinuxという単語をみると中学生であればもうあれしか連想しない。
中学から心も体も成長していないので同様にあれしか連想しない。

http://ja.wikipedia.org/wiki/SELinux

で、これがSELinux。以前からセキュリティのためのモノということは分かっていたが具体的になにをやっているのかは不明だった。
しかしなんとアメリカ国家安全保障局がかかわっている!
アメリカでありしかも国家で最後に局などがつく組織は概ね何かを秘匿しているに違いないのだが、その辺はムーやキバヤシが何とかしてくれるだろうからスルー。

さて、今までSELinuxがいるといろいろと面倒なのでインストール時にOFFっていたのだけど、もうちゃんと適切な設定をして動かすようにしないと成長しないだろうということでちゃんとやることにする。

まず、SELinuxがうごいてるかどうかチェック

# getenforce
Enforcing

動いてます。ばっちりです。

# /usr/sbin/setenforce permissive

こうすると一時的に「SELinux有で、制限無」になるらしい。
これって無効とどうちがうかというと、


  • permissive : SELinuxのポリシーに沿って「チェックする」が、「アクセス拒否をしない」
  • disableは : 無効。チェックすらしない


なんかいろいろ大変な設定をしないといけなくなるようなのでとりあえずVMwareを動かすことを有線してSELinuxのお勉強はいつものようにまた今度にする。
というわけで一時的にではなくずっとpermissiveにするために設定ファイルを編集。
/etc/sysconfig/selinuxは/etc/selinux/configへのシンボリックリンクになっているのでどっちをいじってもOK。

# vi /etc/selinux/config

SELINUX=enforcing

#SELINUX=enforcing
SELINUX=permissive

そしてOS再起動が必要らしい。

#reboot

起動したのでps


# ps aux | grep vm
root      2751  0.0  0.0   2008   352 ?        Ss   01:34   0:00 /usr/bin/vmnet-bridge -d /var/run/vmnet-bridge-0.pid -n 0 -i eth0
root      2763  0.0  0.0   2516   296 ?        Ss   01:34   0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
root      2781  0.0  0.0   2516   296 ?        Ss   01:34   0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet8/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8
root      2786  0.0  0.0   2460   436 ?        Ss   01:34   0:00 /usr/bin/vmnet-natd -d /var/run/vmnet-natd-8.pid -m /var/run/vmnet-natd-8.mac -c /etc/vmware/vmnet8/nat/nat.conf
root      3052  0.0  0.0   4532  1256 ?        S    01:34   0:00 /bin/sh /usr/bin/vmware-watchdog -s webAccess -u 30 -q 5 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root      3059  0.0  0.0   2476   540 ?        Ss   01:34   0:00 /usr/sbin/vmware-authdlauncher
root      3062  0.6  0.7 246916 26888 ?        Ssl  01:34   0:02 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root      3160  0.5  0.8  75972 29684 ?        Ssl  01:34   0:01 /usr/lib/vmware/bin/vmware-hostd -a -d -u /etc/vmware/hostd/config.xml
root      3280  0.0  0.0   1984   184 ?        Ss   01:34   0:00 /usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet1.pid /dev/vmnet1 vmnet1
root      3291  0.0  0.0   1984   188 ?        Ss   01:34   0:00 /usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet8.pid /dev/vmnet8 vmnet8
root      3606  0.0  0.0   4984   776 pts/0    S+   01:39   0:00 grep vm

しかしこのなかにはやはりautostartはいませんねぇ。
サービスを起動してみる

# service vmware-autostart start
Starting VMware autostart virtual machines:
Virtual machines [ OK ]

できた!!!

# ps aux | grep vm
root      2751  0.0  0.0   2008   352 ?        Ss   01:34   0:00 /usr/bin/vmnet-bridge -d /var/run/vmnet-bridge-0.pid -n 0 -i eth0
root      2763  0.0  0.0   2516   296 ?        Ss   01:34   0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
root      2781  0.0  0.0   2516   296 ?        Ss   01:34   0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet8/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8
root      2786  0.0  0.0   2460   436 ?        Ss   01:34   0:00 /usr/bin/vmnet-natd -d /var/run/vmnet-natd-8.pid -m /var/run/vmnet-natd-8.mac -c /etc/vmware/vmnet8/nat/nat.conf
root      3052  0.0  0.0   4532  1256 ?        S    01:34   0:00 /bin/sh /usr/bin/vmware-watchdog -s webAccess -u 30 -q 5 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root      3059  0.0  0.0   2476   540 ?        Ss   01:34   0:00 /usr/sbin/vmware-authdlauncher
root      3062  0.5  0.7 246916 26888 ?        Ssl  01:34   0:02 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root      3160  0.4  0.9  76068 30628 ?        Ssl  01:34   0:01 /usr/lib/vmware/bin/vmware-hostd -a -d -u /etc/vmware/hostd/config.xml
root      3280  0.0  0.0   1984   184 ?        Ss   01:34   0:00 /usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet1.pid /dev/vmnet1 vmnet1
root      3291  0.0  0.0   1984   188 ?        Ss   01:34   0:00 /usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet8.pid /dev/vmnet8 vmnet8
root      3684  0.0  0.0   4984   772 pts/0    S+   01:41   0:00 grep vm

でもプロセス見てもなにもかわってない。まあ、サービス名がそのままプロセス名ってことではないだけなのだろうということで今度はとめてみる。

# service vmware-autostart stop
Stopping VMware autostart virtual machines:
   Virtual machines                                        [  OK  ]
# ps aux | grep vm
root      2751  0.0  0.0   2008   352 ?        Ss   01:34   0:00 /usr/bin/vmnet-bridge -d /var/run/vmnet-bridge-0.pid -n 0 -i eth0
root      2763  0.0  0.0   2516   296 ?        Ss   01:34   0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
root      2781  0.0  0.0   2516   296 ?        Ss   01:34   0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet8/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8
root      2786  0.0  0.0   2460   436 ?        Ss   01:34   0:00 /usr/bin/vmnet-natd -d /var/run/vmnet-natd-8.pid -m /var/run/vmnet-natd-8.mac -c /etc/vmware/vmnet8/nat/nat.conf
root      3052  0.0  0.0   4532  1256 ?        S    01:34   0:00 /bin/sh /usr/bin/vmware-watchdog -s webAccess -u 30 -q 5 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root      3059  0.0  0.0   2476   540 ?        Ss   01:34   0:00 /usr/sbin/vmware-authdlauncher
root      3062  0.4  0.7 246916 26892 ?        Ssl  01:34   0:02 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root      3160  0.3  0.9  76068 30672 ?        Ssl  01:34   0:01 /usr/lib/vmware/bin/vmware-hostd -a -d -u /etc/vmware/hostd/config.xml
root      3280  0.0  0.0   1984   184 ?        Ss   01:34   0:00 /usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet1.pid /dev/vmnet1 vmnet1
root      3291  0.0  0.0   1984   188 ?        Ss   01:34   0:00 /usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet8.pid /dev/vmnet8 vmnet8
root      3760  0.0  0.0   4984   776 pts/0    S+   01:42   0:00 grep vm

なにもかわらない。
autostartということでなにか起動させるだけのものなんじゃないかと思われるが、本当は何をやるものなのか気になるので調べてみる。
が、なんかインストール方法の書いてあるブログがいっぱいでるだけでわからない。
でもうごいたからいいや。そのうちわかるだろう。

というわけでブラウザからアクセスしてみる。

http://192.168.0.10:8222/
https://192.168.0.10:8333/

どちらも見られないです。

# netstat -av
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 *:904                       *:*                         LISTEN
tcp        0      0 *:8333                      *:*                         LISTEN
tcp        0      0 *:8222                      *:*                         LISTEN

ちゃんとうごいてますねえ。
まさかwebサーバが必要とか?tomcatが動いているのに???
でも8009を使っているし・・・・まさか・・?
見当違い感がものすごくあるけど・・・と思いながらもhttpdをyumから。

# yum install httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * rpmforge: ftp-stud.fht-esslingen.de
 * base: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
 * addons: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package httpd.i386 0:2.2.3-22.el5.centos.2 set to be updated
filelists.xml.gz                                                                       | 3.8 MB     00:27
--> Processing Dependency: libaprutil-1.so.0 for package: httpd
--> Processing Dependency: libapr-1.so.0 for package: httpd
--> Running transaction check
---> Package apr-util.i386 0:1.2.7-7.el5_3.2 set to be updated
--> Processing Dependency: libpq.so.4 for package: apr-util
---> Package apr.i386 0:1.2.7-11.el5_3.1 set to be updated
--> Running transaction check
---> Package postgresql-libs.i386 0:8.1.11-1.el5_1.1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================
 Package                      Arch              Version                            Repository            Size
==============================================================================================================
Installing:
 httpd                        i386              2.2.3-22.el5.centos.2              updates              1.2 M
Installing for dependencies:
 apr                          i386              1.2.7-11.el5_3.1                   updates              123 k
 apr-util                     i386              1.2.7-7.el5_3.2                    updates               76 k
 postgresql-libs              i386              8.1.11-1.el5_1.1                   base                 196 k
Transaction Summary
==============================================================================================================
Install      4 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 1.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): apr-util-1.2.7-7.el5_3.2.i386.rpm                                               |  76 kB     00:00
(2/4): apr-1.2.7-11.el5_3.1.i386.rpm                                                   | 123 kB     00:00
(3/4): postgresql-libs-8.1.11-1.el5_1.1.i386.rpm                                       | 196 kB     00:00
(4/4): httpd-2.2.3-22.el5.centos.2.i386.rpm                                            | 1.2 MB     00:00
--------------------------------------------------------------------------------------------------------------
Total                                                                         2.4 MB/s | 1.6 MB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : apr                                               [1/4]
  Installing     : postgresql-libs                                   [2/4]
  Installing     : apr-util                                          [3/4]
  Installing     : httpd                                             [4/4]
Installed: httpd.i386 0:2.2.3-22.el5.centos.2
Dependency Installed: apr.i386 0:1.2.7-11.el5_3.1 apr-util.i386 0:1.2.7-7.el5_3.2 postgresql-libs.i386 0:8.1.11-1.el5_1.1
Complete!

# service httpd start
httpd を起動中: [ OK ]

そしてブラウザからアクセス。
表示されません。
違ったようだ。

なんか↓をやるといけたというのを見つけたのでためしてみる。

# vi /etc/pam.d/vmware-authd
#%PAM-1.0
#auth       required pam_unix.so shadow nullok
#account    required pam_unix.so
auth       required     pam_permit.so shadow nullok
account    required pam_permit.so

が、かわらず。
困ったのでとりあえず再起動してみる

#reboot

やはりダメ。

そこで思い出した。SELinuxと同様にいつも壁になるiptables。
こいつのせいではないか。
当然ルータ内にいるのでこれはいらない。いずれちゃんとやるとして今回もOFF。
そしていつもやらなくなってしまう。

# chkconfig iptables off
# chkconfig --list iptables
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off

オフになった。


# service iptables stop
ファイアウォールルールを適用中:                            [  OK  ]
チェインポリシーを ACCEPT に設定中filter                   [  OK  ]
iptables モジュールを取り外し中                            [  OK  ]

とめた。
そしてアクセス・・・

(゜∀゜)

VMWareログイン画面

OKです。
うーんすばらしい。とりあえずログインしてみる。

VMWare Server Webコンソール トップページ

ログインできた!!!
というわけでOKです!!

先ほど試しにいれてみたapacheや設定をが実は不要かもしれないので元に戻してみる。

まずapacheの削除。こいつはどう考えてもいらないはずなんだ。

# yum erase httpd
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.i386 0:2.2.3-22.el5.centos.2 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================================================================
 Package                              Arch                                Version                                                Repository                                Size
================================================================================================================================================================================
Removing:
 httpd                                i386                                2.2.3-22.el5.centos.2                                  installed                                3.1 M
Transaction Summary
================================================================================================================================================================================
Install      0 Package(s)
Update       0 Package(s)
Remove       1 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : httpd                                             [1/1]
Removed: httpd.i386 0:2.2.3-22.el5.centos.2
Complete!

けしました。

# ps aux | grep httpd
root 3807 0.0 0.0 4980 764 pts/0 S+ 02:42 0:00 grep httpd

httpはいなくなってる。OK
一応apacheでも見てみる。

# ps aux | grep apache
root      3076  0.0  0.0   4532  1256 ?        S    02:10   0:00 /bin/sh /usr/bin/vmware-watchdog -s webAccess -u 30 -q 5 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root      3092  0.4  1.7 265580 58848 ?        Ssl  02:10   0:08 /usr/lib/vmware/webAccess/java/jre1.5.0_15/bin/webAccess -client -Xmx64m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=30 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/common/endorsed -classpath /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/bootstrap.jar:/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/bin/commons-logging-api.jar -Dcatalina.base=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Dcatalina.home=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16 -Djava.io.tmpdir=/usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/temp org.apache.catalina.startup.Bootstrap start
root      3809  0.0  0.0   4984   776 pts/0    S+   02:42   0:00 grep apache

ギャアアア。いっぱいでた!と思ったら、vmwareのtomcatだった。
さてブラウザから・・・大丈夫な様子。

今度はもうひとつの設定ファイルの方を。

# vi /etc/pam.d/vmware-authd
#%PAM-1.0
auth       required     pam_unix.so shadow nullok
account    required     pam_unix.so
#auth       required    pam_permit.so shadow nullok
#account    required    pam_permit.so

設定は戻して、さっきのは一応残しておく。

そしてブラウザからログイン・・・・大丈夫なようだ。
さて、最後に再起動して確認してみる。
ここでこれを省いてあとで再起動してアクセスできなくなってたら原因の特定に時間がかかるからね!

#reboot

起動したのでrootでログイン。
問題なし。OK!!

コメント