rootになってhttpdを起動し、
http://(apacheをインストールしたホストのIPアドレスorFQDN)/
にアクセスしてみよ。
httpdを起動する前後やページにアクセスする前後、さらに、サーバに同時に複
数のアクセスをした場合で、プロセス(httpd)の状態はどのように変化するか
観察し、プロセスの状態が変化するのはなぜかを考察せよ。
1 [nw0423:/usr/local] root# apachectl start
2 /usr/sbin/apachectl start: httpd (pid 329) already running
3 [nw0423:/usr/local] root# httpd
4 Processing config directory: /private/etc/httpd/users/*.conf
5 Processing config file: /private/etc/httpd/users/handball.conf
6 Processing config file: /private/etc/httpd/users/j04023.conf
7 [nw0423:/usr/local] root# ps ax|grep httpd
8 329 ?? Ss 0:00.32 /usr/sbin/httpd
9 340 ?? S 0:00.04 /usr/sbin/httpd
10 497 ?? S 0:00.00 /usr/sbin/httpd
11 501 std R+ 0:00.00 grep httpd
12 [nw0423:/usr/local] root# ps ax | grep httpd
13 329 ?? Ss 0:00.32 /usr/sbin/httpd
14 340 ?? S 0:00.04 /usr/sbin/httpd
15 497 ?? S 0:00.02 /usr/sbin/httpd
16 502 ?? S 0:00.01 /usr/sbin/httpd
17 504 std R+ 0:00.00 grep httpd
7〜9行目が一人だけアクセスした場合で、12〜17行目が2人アクセス
した場合である。
サーバーにアクセスすると、新しい子プロセスを作りその子プロセスで対応する。
また、同時に複数のPCがアクセスするのにも台数に制限があり、この制限はその
サーバーを管理する人が変更する事ができる。また、環境設定でもapacheを
httpdで起動した場合と同じ処理が出来る。