2008年9月7日日曜日

PHPインストール

やってきましたPHPインストールw

最新版の5.2.6をオフィシャルからダウンロードして展開



展開したフォルダにcdして

'./configure' '--prefix=/usr/local/php5' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-curl' '--with-gd' '--enable-gd-native-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-openssl' '--with-png' '--with-jpeg' '--with-regex=system' '--with-xml' '--with-xsl' '--with-xmlrpc=shared' '--with-pcre' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-mysql=/usr/local/mysql' '--enable-soap' '--enable-spl' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-mbstring' '--enable-discard-path' '--with-ttf' '--enable-xslt' '--enable-zend-multibyte' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-libjpeg-dir=/usr' '--enable-so' '--enable-gd-imgstrttf' '--with-jpeg-dir=usr/lib' '--with-freetype-dir=/usr'



いつもながら長っ!w



libxml2が無いよーと怒られるので

apt-get install libxml2-dev



opensslが無いよーと若干本気で切れられるので

apt-get install libssl-dev



bzip2が無いよーと半ば投げやりに呆れられるので

apt-get install libbz2-dev



ここからMDB関連のエラーでにっちもさっちもいかん状態に:;

↓に解決法があります。





libjpeg libpng libfreetype6 libgmp3 libxslt1

それぞれのdevを求められるので、これもaptでインストールしておく





make



rootにsuして

make install



↓DBA(QDBM)エラーの解決法


やっと対応策が判明したので追記



configure: error: DBA: Could not find necessary header file(s).

このエラーでコンパイル停止してしまう。



原因?と思われるものが書いてあるページ(英語)

http://bugs.php.net/bug.php?id=31585&edit=1



どうもQDBMのエラーと思っていたがGDBMのdevelが無いのが原因らしい

��色々試した結果)



やった事


  • qdbm関連モジュールのインストール

    apt-cache search qdbm

    で出てきたパッケージを片っ端からインストール

  • Tru64関連モジュールのインストール

    apt-cache search Tru64

    で出てきたパッケージを片っ端からインストール

  • GDBM関連モジュールのインストール

    apt-cache search gdbm

    で出てきたパッケージを片っ端からインストール




結局以上の事をしたが、おそらく必要だったのは以下のパッケージ

libgdbm-dev

tdb-dev



debianだからだろうか・・・

こんなエラー実務では見たことなかった。

ってかこれだけエラー内容が不明瞭でわかりずりーっつーの





09/04/26現在最新の5.2.9のコンパイルオプションは以下

'./configure' '--prefix=/usr/local/php5' '--with-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-curl' '--with-gd' '--enable-gd-native-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-openssl' '--with-png-dir=/usr/lib'  '--with-regex=system' '--with-xml-dir=/usr' '--with-xsl' '--with-xmlrpc=shared' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-mysql=/usr/local/mysql' '--enable-soap' '--enable-spl' '--enable-shmop' '--enable-calendar'  '--enable-mbstring' '--enable-discard-path' '--with-ttf' ' '--enable-zend-multibyte' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-gd-native-ttf  '--with-jpeg-dir=usr/lib' '--with-freetype-dir=/usr' '--with-pgsql=/usr/local/pgsql'

postgresPHPから操作する場合は

/etc/ld.so.conf



/usr/local/pgsql/lib

を追記しておく。

※これをやっていないとapacheの起動でコケる





WEB鯖を立ち上げる時のインストールの順番は以下

・Apache

・(qmail)

・MySQL or Postgres

・PHP

0 件のコメント:

コメントを投稿