NetBSD で Apache ! インストール cd /usr/pkgsrc/www/apache2 sudo make install clean !! 起動ファイル sudo cp /usr/pkg/share/examples/rc.d/apache /etc/rc.d/apache !! rc.conf 以下を追加。 apache=YES apache_start="start" ---- 以下は過去の作業ログ ---- ! 起動ファイル はじめは ln すりゃいーやと思ったのでやってみた。 root@kahori[~]# ln -s /usr/pkg/etc/rc.d/apache /etc/rc.d/apache root@kahori[~]# /etc/rc.d/apache start /etc/rc.d/apache: WARNING: $apache is not set properly - see rc.conf(5). $apache ってなに root@kahori[~]# grep apache /usr/pkg/etc/rc.d/apache 3:# $NetBSD: apache.sh,v 1.8 2002/11/19 23:08:27 jlam Exp $ 5:# PROVIDE: apache 11:# apache=YES 12:# apache_start="start" # set to "startssl" to allow HTTPS connections; 20:name="apache" 23:ctl_command="/usr/pkg/sbin/apachectl" 26:start_cmd="apache_doit start" 27:stop_cmd="apache_doit stop" 28:restart_cmd="apache_doit restart" 29:reload_cmd="apache_doit reload" 31:apache_doit () 33: : ${apache_start:=start} 36: start) action=${apache_start} ;; 59: apache_doit "$1" ということで /etc/rc.conf に apache=YES と apache_start="start" を追加。 root@kahori[~]# grep apache /etc/rc.conf apache=YES apache_start="start" ! 起動確認 手動で起動してみる。 root@kahori[~]# /etc/rc.d/apache start Starting apache. root@kahori[~]# ps aux | grep httpd ps aux | grep httpd www 1945 0.0 2.8 1824 1804 ?? I 9:31PM 0:00.02 /usr/pkg/sbin/httpd -k start www 4822 0.0 2.8 1824 1804 ?? I 9:31PM 0:00.01 /usr/pkg/sbin/httpd -k start www 12603 0.0 2.8 1824 1804 ?? I 9:31PM 0:00.01 /usr/pkg/sbin/httpd -k start root 17377 0.0 4.6 1800 2976 ?? Ss 9:31PM 0:01.53 /usr/pkg/sbin/httpd -k start www 18726 0.0 2.8 1824 1804 ?? I 9:31PM 0:00.01 /usr/pkg/sbin/httpd -k start www 22005 0.0 2.8 1824 1804 ?? I 9:31PM 0:00.01 /usr/pkg/sbin/httpd -k start root@kahori[~]# /etc/rc.d/apache stop Stopping apache. ! 設定 ひとまずこれだけ変更。 root@kahori[~]# cd /usr/pkg/etc/httpd/ root@kahori[/usr/pkg/etc/httpd]# diff -u httpd.conf.src httpd.conf --- httpd.conf.src 2004-12-18 21:38:18.000000000 +0900 +++ httpd.conf 2004-12-18 21:45:42.000000000 +0900 @@ -288,7 +288,7 @@ # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # -#ServerName www.example.com:80 +ServerName kahori.area51.gr.jp:80 # # UseCanonicalName: Determines how Apache constructs self-referencing root@kahori[/usr/pkg/etc/httpd]# ! リブート ln -s /usr/pkg/etc/rc.d/apache /etc/rc.d/apache では apache が起動しなかった。 cp /usr/pkg/etc/rc.d/apache /etc/rc.d/apache で apache 起動した。 rc にファイルを出力させてみた。 files=$(rcorder -s nostart ${rc_rcorder_flags} /etc/rc.d/*) for _rc_elem in $files; do echo $_rc_elem run_rc_script $_rc_elem start done apache が echo されなかった。 ということは rcorder が apache@ を処理していない。 ---- 作業ログ ----