Archives

You are currently viewing archive for May 2006
May
15
Category: PHP
Posted by: fuku
公式サイトからeAcceleratorをダウンロード

1.解凍

[root@res-system.com~]# tar -zxvf eaccelerator-0.9.4.tar.gz 



2.phpize を実行 注:環境によっては場所が違うのでwhichコマンドで調べる

[root@res-system.com~]# which phpize
/usr/local/bin/phpize

[root@res-system.com~]# which phpize
/usr/local/bin/phpize

[root@res-system.com~]# /usr/local/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025


※configure ファイルが作成される

3.コンパイル

[root@res-system.com~]# ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/bin/php-config
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc

--省略--

checking whether stripping libraries is possible... yes
configure: creating ./config.status
config.status: creating config.h

[root@res-system.com~]# make
[root@res-system.com~]# make install

[root@res-system.com~]# ln -s /usr/local/lib/php/extensions/no-debug-non-zts-20050922/eaccelerator.so /usr/local/lib/php/extensions/eaccelerator.so




4.php.iniに追加

[eaccelerator]
zend_extension="/usr/local/lib/php/extensions/eaccelerator.so"
eaccelerator.shm_size = "32"
eaccelerator.cache_dir = "/var/cache/php-eaccelerator"
eaccelerator.enable = "1"
eaccelerator.optimizer = "1"
eaccelerator.check_mtime = "1"
eaccelerator.debug = "0"
eaccelerator.filter = ""
eaccelerator.shm_max = "0"
eaccelerator.shm_ttl = "0"
eaccelerator.shm_prune_period = "0"
eaccelerator.shm_only = "0"
eaccelerator.compress = "1"
eaccelerator.compress_level = "9"
eaccelerator.keys = "shm_and_disk"
eaccelerator.sessions = "shm_and_disk"
eaccelerator.content = "shm_and_disk"


May
15
Category: PHP
Posted by: fuku
内容

[root@res-system.com~]# /usr/local/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.



原因

autoconf(configure スクリプトを自動生成するツール)が見つからないというエラー



解決

autoconfのインストール

GNUサイトからautoconf-2.59.tar.gzを取得しインストール




# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.59.tar.gz
# tar zxvf autoconf-2.59.tar.gz
# ./configure --prefix=/usr
# make
# make install


May
13
Category: PHP
Posted by: fuku
PHPサイトからダウンロード

[root@res-system.com~]#./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-xml --enable-xslt --with-dom=/usr/lib --with-dom-exslt=/usr/lib --with-dom-xslt=/usr/lib --with-xsl=/usr/lib --with-xslt-sablot --with-gd --with-zlib --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --with-mysql=/usr --with-imap-ssl=/usr/bin/openssl



以下のエラーについては、

configure: error: cannot find output from lex; giving up
->flex をインストール

configure: error: xml2-config not found. Please check your libxml2 installation.
->libxslt-devel をインストール

Cannot find MySQL header files under /usr.
->mysql-devel をインストール

configure: error: libpng.(a|so) not found.
->libpng-devel をインストール