使えるねっとのVPSにAPCをインストール
5 / 19 / 2009

yumがインストールされている。そして、

# pecl install APC

を使ってインストールしたい。

# yum install php-pear
# yum -y install php-devel
# yum -y install automake

インストールしてみると、

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 92160 bytes) in /usr/share/pear/PEAR/PackageFile/v2/Validator.php on line 1831

メモリた足りないと言われたので、/usr/share/pear/pearcmd.phpに@ini_set(‘memory_limit’, ’16M’); と書く。

configure: error: no acceptable C compiler found in $PATH

今度はCコンパイラが無いと言われる

# yum install gcc gcc-c++

三度目の正直。

Sorry, I was not able to successfully run APXS.  Possible reasons:

1.  Perl is not installed;
2.  Apache was not compiled with DSO support (–enable-module=so);
3.  ‘apxs’ is not in your path.  Try to use –with-apxs=/path/to/apxs
The output of /var/tmp/pear-build-root/APC-3.0.19/?yes follows
/tmp/tmpXvVSb8/APC-3.0.19/configure: line 3232: /var/tmp/pear-build-root/APC-3.0.19/?yes: No such file or directory
configure: error: Aborting
ERROR: `/tmp/tmpXvVSb8/APC-3.0.19/configure –with-apxs=?yes’ failed

んーよくわからない。

# yum -y install httpd-devel
# yum install apr-devel

今度こそ。

Build process completed successfully
Installing ‘/var/tmp/pear-build-root/install-APC-3.0.19//usr/lib64/php/modules/apc.so’
install ok: channel://pecl.php.net/APC-3.0.19
You should add “extension=apc.so” to php.ini

出来た!php.iniにextension=apc.soを追加する。

#  /etc/init.d/httpd restart

Apacheを再起動して、phpinfo()で確認。

無事動いた!

参考にしたサイト:
http://d.hatena.ne.jp/ir9Ex/20081019/1224366629
http://labs.uechoco.com/blog/2008/04/phppecl.html
http://yosiwo.lowtech.ne.jp/item/375
http://plaza.rakuten.co.jp/chibimatsuzaki/diary/200812260000/

Tags: , ,

コメントする

Grow!

About this entry

使えるねっとのVPSにAPCをインストール

Posted in 5 / 19 / 2009

Tags: , ,

Bookmark

Share