ports-currentからapacheを取って来て、/usr/ports/www以下に展開して下さい。
% tar xvzf apache.tar.gz
ディレクトリを移動して、パッチを当てます。
% cd apache
% make patch
パッチがあたったソースをコピーします。
% cp -R work/apache_1.2.5 /root
Apacheを仮にインストールしておきます。
% make install
デフォルトの出力漢字コードはEUCなのでJISに変更します。
src/kanjiconv.cを以下のように変更します。
int output_kanji_code=EUC;
↓
int output_kanji_code=JIS;
installスクリプトを実行して質問に答えます。
% ./install
PHP/FI Installation If you do not understand any of the following questions, then the default should be safe - simply hit 'Return'. Do you have mSQL installed on this system? [yN] Do you have Sybase libraries installed on this system [yN] Do you have Postgres installed in this system? [Yn] Top of your Postgres install tree? [/usr/local/pgsql] Do you have mysql installed on this system? [yN] Do you have Adabas installed in this system? [yN] Do you have Solid installed in this system? [yN] Do you have Oracle installed in this system? [yN] Do you have filePro installed in this system? [yN] Do you have ODBC installed in this system? [yN] Would you like to compile PHP/FI as an Apache module? [yN] y Are you compiling for an Apache 1.1 or later server? [Yn] Are you using Apache-Stronghold? [yN] Does your Apache server support ELF dynamic loading? [yN] Apache source directory (which has httpd.h)? [/usr/local/etc/httpd/src] /root/apache_1.2.5/src Would you like to include access control support? [yN] Would you like to include page logging support? [Yn] You need to choose a page logging directory. This directory must be readable and writable by the user id under which your http server runs. Page logging directory? [/usr/local/etc/httpd/cgi-data] /usr/local/www/cgi-data Would you like to include file upload support? [Yn] n Would you like to build an ELF shared library? [yN] Additional directories to search for .h files []: /usr/local/include Additional directories to search for library files []: /usr/local/lib 略 Do you want to use multi-byte extension for regex library? [y/N] y Using multi-byte extension for regular expression librarymakeします。
無事makeが終了したら以下を実行します。
% cp -R jp.regex /root/apache_1.2.5/src
Cinfugyrationを以下のように修正します。
EXTRA_CFLAGS= \
↓
PREFIX=/usr/local
EXTRA_CFLAGS= -I./jp.regex -DSERVER_SUBVERSION=\"PHP/FI-2.0.1\" \
EXTRA_LIBS=-lmd
↓
EXTRA_LIBS=-lmd -L. -lphp -L/usr/local/lib -lgdbm -L/usr/local/pgsql/lib -lpq -L./jp.regex -lregex -lm
# Module example_module modules/example/mod_example.o
↓
# Module example_module modules/example/mod_example.o
Module php_module mod_php.o
makeしてインストールします。
% ./Configure
% make
% cp httpd /usr/local/sbin
ディレクトリを作成します。
% mkdir /usr/local/www/cgi-data
% chown nobody.nogroup /usr/local/www/cgi-data
srm.confを以下のように修正します。
DirectoryIndex index.html
↓
DirectoryIndex index.html index.phtml
srm.confに以下を追加します。
# To use PHP/FI
AddType application/x-httpd-php .phtml
各ファイルをコメントに従って編集します。
私の所の設定はここを御覧下さい。
ブラウザで見て、以下のようになれば成功です。
0 total hits since Saturday March 14. 0 hits today. No Previous Access to this page Page was last updated on Saturday March 14, 1998 at 15:15:45