[[PHP]]

*説明 [#a8a80b00]
ソースからのPHPのインストールです。~


*手順 [#k8e619b0]
***[PHP5.1.6] [#f9fed8aa]
 # yum install gcc make libxml2-devel openssl-devel 
 # cd /usr/local/src/
 # wget http://museum.php.net/php5/php-5.1.6.tar.gz
 # tar xfvz php-5.1.6.tar.gz
 # mkdir /root/src
 # mv php-5.1.6 /root/src/
 # cd /root/src/php-5.1.6
 
 必要なものを有効化&パスは確認が必要
 # ./configure \
 --prefix=/usr/local/php-5.1.6 \
 --with-config-file-path=/usr/etc \
 --with-apx2=/usr/local/apache2/bin/apxs \
 --enable-mbstring \
 --with-gd \
 --enable-gd-native-ttf \
 --with-t1lib \
 --with-ttf \
 --enable-zend-multibyte \
 --with-pgsql=/usr/local/pgsql/lib/ \
 --with-pdo-pgsql=/usr/local/pgsql/lib/ \
 --enable-xml \
 --with-xpm-dir=/usr/lib64 \
 --with-zlib \
 --libdir=/usr/lib64 \
 --with-libdir=lib64
 
 # cd /usr/lib64/httpd/modules/
 # mv libphp5.so libphp53.so
 # cd /etc/httpd/conf.d
 # cp -p php.conf php.conf.org
 
 ※既にパッケージ版をインストールしている場合
 # vim php.conf
 - LoadModule php5_module modules/libphp5.so
 + LoadModule php5_module modules/libphp53.so
 # service httpd configtest
 # service httpd restart
 
 # make
 # make install
 # cd /etc/httpd/conf.d/
 # vi php.conf
 - LoadModule php5_module modules/libphp53.so
 + # LoadModule php5_module modules/libphp53.so
 + LoadModule php5_module modules/libphp51.so
 # service httpd restart
 
*トラブルシュート [#y53e5614]
***1 [#nfb6618d]
 checking lex output file root... ./configure: line 3246: lex: command not found 
 configure: error: cannot find output from lex; giving up

 下記をインストール
 #yum install flex
***2 [#oe947537]
 If configure fails try --with-jpeg-dir=<DIR>
configure: error: libpng.(a|so) not found.

 以下のライブラリをインストール
 # yum install libjpeg-devel libpng-devel

 以下のパスをConfigureオプションに追加
 --libdir=/usr/lib64 \
 --with-libdir=lib64
***3 [#wc082a31]
configure: error: PNG support requires ZLIB. Use --with-zlib-dir=<DIR>

以下オプションを追加
--with-zlib-dir=/usr/local/lib \
***4 [#i2e7d2f2]
 If configure fails try --with-xpm-dir=<DIR>
 If configure fails try --with-freetype-dir=<DIR>
 configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.

 以下オプションを追加
 --with-freetype-dir=/usr/lib \

***5 [#p5018ce2]
 If configure fails try --with-xpm-dir=<DIR>

 以下インストール
 yum install libXpm-devel

 以下オプション追加
 --with-xpm-dir=/usr/lib64

***6 [#jaead365]
 configure: error: freetype2 not found!

 以下インストール
 yum install freetype-devel

 以下オプション追加
 --with-freetype-dir=/usr/lib64

***7 [#w318f955]
 checking for FreeType 1 support... no - FreeType 2.x is to be used instead
 configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.

 以下インストール
 yum install t1lib t1lib-devel

***8 [#iaa62825]
 httpd: Syntax error on line 222 of /etc/httpd/conf/httpd.conf: Syntax error on line 31 of  /etc/httpd/conf.d/nikko.web-life.co.jp.conf: Cannot load /etc/httpd/modules/libphp51.so into server: /etc/httpd/modules/libphp51.so: undefined symbol: sapi_globals

 以下を実行
 cd /root/src/php-5.1.6
 make distclean

***configure: error: Kerberos libraries not found. [#q28363ec]
 yum install krb5-devel

***configure: error: mysql configure failed. [#f8ec7352]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS