WWW を検索 NOGNOG.COM を検索

WWW.NOGNOG.COM

Last modified: Sat, 29 Dec 2007 15:32:29 +0900
Home   うにっくすさんの覚え書き   プリングルズ   MIDI   ユーザー車検   「小沢昭一の小沢昭一的こころ」のススメ   Blog  

PHP4 - Apache DSOモジュールのインストール

  • はじめに

    • SolarisバンドルのApacheへPHP4を組み込みます。
      インストールに先立ち、
      OpenSSL, GNU dbm, gd, UW-IMAP, libmcrypt, Mhash, MySQL, PostgreSQL, GNU readline, NET-SNMP, XPM(FreeBSD)
      をインストールしておきます。

  • 用意するもの

    • php-4.3.10.tar.gz

      • 公式サイト
        http://www.php.net/
      • ダウンロードサイト
        http://www.php.net/downloads.php

  • コンパイル&インストール

      % tar zxvf php-4.3.10.tar.gz
      % cd php-4.3.10

      (Solaris)
      % ./configure --with-apxs=/usr/apache/bin/apxs --with-openssl=/usr/local --with-zlib=/usr --with-bz2=/usr --enable-calendar --enable-dba --with-gdbm=/usr/local --with-db4=/usr/local --with-cdb=/usr/local --enable-ftp --with-gd=/usr/local --with-jpeg-dir=/usr/sfw --with-png-dir=/usr/sfw --with-zlib-dir=/usr --with-xpm-dir=/usr/openwin --with-freetype-dir=/usr/sfw --with-imap=/usr/local --enable-mbstring --with-mcrypt=/usr/local --with-mhash=/usr/local --with-mysql=/usr/local --with-pgsql=/usr/local --with-readline=/usr/local --with-snmp=/usr/local --with-openssl-dir=/usr/local --enable-sockets --enable-yp

      (FreeBSD)
      % ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-openssl=/usr --with-zlib=/usr --with-bz2=/usr --enable-calendar --enable-dba --with-gdbm=/usr/local --with-db4=/usr/local --with-cdb=/usr/local --enable-ftp --with-gd=/usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-zlib-dir=/usr --with-xpm-dir=/usr/X11R6 --with-freetype-dir=/usr/local --with-imap=/usr/local --enable-mbstring --with-mcrypt=/usr/local --with-mhash=/usr/local --with-mysql=/usr/local --with-pgsql=/usr/local --with-readline=/usr/local --with-snmp=/usr/local --with-openssl-dir=/usr --enable-sockets --enable-yp

      % make
      % su
      # make install
      # cp php.ini-dist /usr/local/lib/php.ini

  • コンフィグレーション

      # vi /etc/apache/httpd.conf

      下記を追記。

        #
        # PHP
        #
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php-source .phps

  • Apache 再起動

      (Solaris)
      # /etc/init.d/apache restart

      (FreeBSD)
      # /usr/local/apache/bin/apachectl restart

うにっくすさんの覚え書きについて

Home >> うにっくすさんの覚え書き >> PHP4 - Apache DSOモジュールのインストール