- Yum up some packages:
yum install php-pear php-devel httpd-devel
- Install APC using pear (the pear installer is smarter than the pecl installer):
When the installer asks about APXS, say ‘no’.pear install pecl/apc
- Tell PHP to load APC:
echo extension=apc.so > /etc/php.d/apc.ini
- Restart Apache:
/sbin/service httpd graceful
Installing PHP APC On RHEL/CentOS
13 Responses to “Installing PHP APC On RHEL/CentOS”
-
Thanks. Very simple, very clear, very complete directions. Are you sure you are a linux guy? They are going to revoke your group membership privileges if you don’t make these directions either partially incomplete or somewhat arcane.
-
Many thanks. I agree with Mark. After seeing so many ridiculously complicated explanations of the above simple process I can only say again – thank you for you help and effort.
-
Hi Casey,
Can you explain why you choose “no” for APXS?Thanks,
-mike -
Thanks for this!
-
Very clear.
Good job. -
@Mike: Because there had to be at least one unexplained, obscure thing in a Linux related post?
Casey, I’d love to know the answer to Mike’s question as well. Did testing having answered ‘yes’ reveal subtle weirdness? Did things blow up spectacularly? Or does that let you avoid pulling in httpd-devel and all the compiler-related dependencies that that brings in?
Cheers (and add my thanks to the list!),
Justin
-
I had to add the line below to my php.ini to get APC to load on RHEL with PHP 5.2.
apc.rfc1867 = 1
-
The first command should be
yum install php-pear php-devel httpd-devel pcre-devel
-
I couldnt get this working sadly, APC does not show up on my PHP 5.1.6
Ive tried adding enable=apc.so to my /etc/php.d/apc.ini and when that didnt work to my /etc/php.ini
Not quite sure whats up but if I figure it out Ill post more.
-
When I try to Run the below Command it GIves an Error as Follows;
Suggest me the to FIX this Issue;———————————————————————————————————————–
[root@ns1 ~]# pear install pecl/apc
downloading APC-3.1.6.tgz …
Starting to download APC-3.1.6.tgz (148,835 bytes)
……………………………done: 148,835 bytes
49 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
/usr/bin/phpize: /tmp/tmpMLjpYV/APC-3.1.6/build/shtool: /bin/sh: bad interpreter: Permission denied
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.ERROR: `phpize’ failed
———————————————————————————————————————–How to Resolve this..