謝辞
このコーナーは以下の資料を参考にいたしました。
- 「PHPxPostreSQLで作る最強Webシステム」石井達夫氏著・技術評論社・2003年
- 「PHP実践のツボ」山本勇氏著・九天社・2002年
- 「Apache アプリケーションサイト構築」安田幸弘氏著・オーム社・2001年
- Stack Asterisk 連載記事・IT Boost 社
- Hiz Laboratory
% cd /usr/local/src/apache_1.3.33 % env OPTIM="-O2" ./configure --enable-module=so % gmake % su root -c "gmake install" % % cd ../php-4.3.10 % ./configure --without-mysql --with-apxs=/usr/local/apache/bin/apxs --enable-mb str-enc-trans --enable-mbstring --enable-trans-sid % gmake % su root -c "gmake install" |
#LoadModule env_module libexec/mod_env.so
#LoadModule config_log_module libexec/mod_log_config.so
#LoadModule mime_module libexec/mod_mime.so
#LoadModule negotiation_module libexec/mod_negotiation.so
#LoadModule status_module libexec/mod_status.so
#LoadModule includes_module libexec/mod_include.so
#LoadModule autoindex_module libexec/mod_autoindex.so
#LoadModule dir_module libexec/mod_dir.so
#LoadModule cgi_module libexec/mod_cgi.so
#LoadModule asis_module libexec/mod_asis.so
#LoadModule imap_module libexec/mod_imap.so
#LoadModule action_module libexec/mod_actions.so
#LoadModule userdir_module libexec/mod_userdir.so
#LoadModule alias_module libexec/mod_alias.so
#LoadModule access_module libexec/mod_access.so
#LoadModule auth_module libexec/mod_auth.so
#LoadModule setenvif_module libexec/mod_setenvif.so
LoadModule php4_module libexec/libphp4.so
|
% su
# mkdir /usr/local/pgsql
# chown pgsql:pgsql /usr/local/pgsql
# chown -R pgsql:pgsql /usr/local/src/postgresql-7.4.6
# su - pgsql
$ cd /usr/local/src/postgresql-7.4.6
$ ./configure --enable-multibyte=EUC_JP --enable-syslog
$ gmake
$ gmake install
$ initdb
$ /usr/local/pgsql/bin/pg_ctl start
|
% cd /usr/local/src/mod_auth_pgsql-0.9.12
% more INSTALL
% ./configure --with-apxs=/usr/local/apache/bin/apxs --with-pgsql=/usr/local/pgs
ql
|
#my $CFG_LD_SHLIB = q(gcc); # substituted via Makefile.tmpl
my $CFG_LD_SHLIB = q(ld); # substituted via Makefile.tmpl
#my $CFG_LDFLAGS_SHLIB = q(-shared); # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = q(-G); # substituted via Makefile.tmpl
|
% /usr/local/apache/bin/apxs -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -
lpq -o mod_auth_pgsql.so -c mod_auth_pgsql.c auth_pgsql_shared_stub.c
% /usr/local/apache/bin/apxs -i -a -n auth_pgsql mod_auth_pgsql.so
|
# more /usr/local/apache/conf/httpd.conf
(途中略)
LoadModule php4_module libexec/libphp4.so
LoadModule auth_pgsql_module libexec/mod_auth_pgsql.so
(途中略)
AddModule mod_php4.c
AddModule mod_auth_pgsql.c
(以下省略)
|
[notice] Apache/1.3.33 (Unix) mod_auth_pgsql/0.9.12 PHP/4.3.10 configured -- res
uming normal operations
|
% cd /usr/local/src/php-4.3.10/ext/pgsql
% phpize
% ./configure
% gmake
% su root -c "gmake EXTENSION_DIR=/usr/local/lib/php/extensions install"
|
--- php.ini.orig Tue Dec 21 17:48:39 2004
+++ php.ini Tue Dec 21 17:52:19 2004
@@ -441,7 +441,8 @@
user_dir =
; Directory in which the loadable extensions (modules) reside.
-extension_dir = "./"
+extension_dir = /usr/local/lib/php/extensions
+extension=pgsql.so
; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
|