CygwinでApache2を動かすぞぉ〜
CygwinでApache2を動かしたいと思います。僕の環境ではCygwinは最小インストールなので必要最小限しか入ってません。
インストール
まずはsetup.exeで、必要なものを揃えます。
- Admin/cygrunsrv
- Web/Apache2
cygrunsrvはサービス登録に必要です。
サービス登録
$ /usr/bin/cygserver-config
yes 2回でサービス登録できます。
Basic Cygserver configuration finished. Have fun!
と出たら、サービス登録完了です。
/usr/bin/cygserver-config: line 176: cygrunsrv: command not found
と出る場合は、cygrunsrvがインストールされてません(ここではまった)
サービス開始
The service has been installed under LocalSystem account. To start it, call `net start cygserver' or `cygrunsrv -S cygserver'.
と、書いてあるので、実行してみます。
$ net start cygserver
CYGWIN cygserver サービスを開始します.
CYGWIN cygserver サービスは正常に開始されました。
うまくいっているようです。
Apache2を起動
色々起動方法があるみたいですが、今回はテストなので、
$ /usr/sbin/httpd2 -k start
Bad system callと出なければ鯖立て完了です。