APC = Alternative PHP Cache
php バージョン php-5.2.9
APC バージョン APC-3.1.2
phpはインストール済みとする。
tar xzvf APC-3.1.2.tgz
cd APC-3.1.2
phpize
./configure --enable-apc
(何か、configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.って言われてるよ。 ちーぃっ!!! って事で)
re2c-0.13.5.tar.gzをダウンロードしてきて
tar xvzf re2c-0.13.5.tar.gz
cd re2c-0.13.5
./configure
make all
make install
再度
cd ../APC-3.1.2
phpize
./configure
make all
make test
make install
ここで /usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so
が出来上がる。
php.iniの一番したに
[apc]
extension="/usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so"
apc.mode = mmap
apc.cachedir = /tmp
apc.check_compiled_source = 1
apc.check_mtime = 1
を追加する。
httpdをリスタート
phpinfoを呼び出すページを作って確認・・・・・・・
動いた・・・・・・orz
っで今までのテスト機でやったのでじゃー本番機でGoっと思ったら。
本番機はすべてyumとかrpmで構成されてる。。。。
再び ちーぃっ!!!って事で。。。
yum -y install php-pear (pecl)
yum -y install php-devel (phpize)
yum -y install httpd-devel (apxs)
で pecl install APC を実行
・・・・・・・
キター エラー
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 92160 bytes) in /usr/share/pear/PEAR/Dependency2.php on line 396
Allowed memory size of 8388608 bytes exhausted (tried to allocate 0 bytes)
php.iniのmemory_limitを増やしたが同じエラー
ここでgoogle大先生
pearcmd.phpの先頭に
@ini_set(’memory_limit’, ‘32M’);
とか付け加える。
再度
pecl install APC
OK 通った・・・・
/etc/php.d/apc.ini を新規作成して
extension = apc.so
として保存
httpdを再起動
phpinfoを実行してapcの項目を確認
以上。
php バージョン php-5.2.9
APC バージョン APC-3.1.2
phpはインストール済みとする。
tar xzvf APC-3.1.2.tgz
cd APC-3.1.2
phpize
./configure --enable-apc
(何か、configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.って言われてるよ。 ちーぃっ!!! って事で)
re2c-0.13.5.tar.gzをダウンロードしてきて
tar xvzf re2c-0.13.5.tar.gz
cd re2c-0.13.5
./configure
make all
make install
再度
cd ../APC-3.1.2
phpize
./configure
make all
make test
make install
ここで /usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so
が出来上がる。
php.iniの一番したに
[apc]
extension="/usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so"
apc.mode = mmap
apc.cachedir = /tmp
apc.check_compiled_source = 1
apc.check_mtime = 1
を追加する。
httpdをリスタート
phpinfoを呼び出すページを作って確認・・・・・・・
動いた・・・・・・orz
っで今までのテスト機でやったのでじゃー本番機でGoっと思ったら。
本番機はすべてyumとかrpmで構成されてる。。。。
再び ちーぃっ!!!って事で。。。
yum -y install php-pear (pecl)
yum -y install php-devel (phpize)
yum -y install httpd-devel (apxs)
で pecl install APC を実行
・・・・・・・
キター エラー
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 92160 bytes) in /usr/share/pear/PEAR/Dependency2.php on line 396
Allowed memory size of 8388608 bytes exhausted (tried to allocate 0 bytes)
php.iniのmemory_limitを増やしたが同じエラー
ここでgoogle大先生
pearcmd.phpの先頭に
@ini_set(’memory_limit’, ‘32M’);
とか付け加える。
再度
pecl install APC
OK 通った・・・・
/etc/php.d/apc.ini を新規作成して
extension = apc.so
として保存
httpdを再起動
phpinfoを実行してapcの項目を確認
以上。