Apache2.2(SSL)サーバ構築[No.6:Apahce2.2.16の自動起動と確認] 

今回は、OS起動時にApache自動起動するための設定を行います。
http://assimane.blog.so-net.ne.jp/2010-10-16

1.起動・停止スクリプトのコピー
sudo su -
install -o root -g root -m 755 /usr/local/httpd/bin/apachectl /etc/init.d/apache2
ls -l /etc/init.d/apache2

2.起動・停止設定
update-rc.dコマンドで簡単にシンボリックリンクを張ります。
update-rc.d apache2 defaults 80 60
/etc/rc0.d/K60apache2 -> ../init.d/apache2
/etc/rc1.d/K60apache2 -> ../init.d/apache2
/etc/rc6.d/K60apache2 -> ../init.d/apache2
/etc/rc2.d/S80apache2 -> ../init.d/apache2
/etc/rc3.d/S80apache2 -> ../init.d/apache2
/etc/rc4.d/S80apache2 -> ../init.d/apache2
/etc/rc5.d/S80apache2 -> ../init.d/apache2

3.起動確認
/etc/init.d/apache2 start
ps -ef | grep apache

4.停止確認
/etc/init.d/apache2 stop
ps -ef | grep apache

5.Ubuntuを再起動して、Apacheの起動を確認します。
ps -ef | grep apache
Apacheが起動できていればOKです。

自動起動を止めたい場合は、同じくupdate-rc.dで削除ができます。
update-rc.d -f apache2 remove
rm /etc/init.d/apache2

これでApache2.2(SSL)サーバの構築は完了です。
SSLには、サーバ認証とクライアント認証の2種類があります。
次回は、アクセスしたユーザーを認証するためのクライアント認証の設定を行ってみたいと思います。
お楽しみに!!