- Yum up some packages:
``` yum install php-pear php-devel httpd-devel
</td> </tr> </table> </div> 2. Install APC using pear (the pear installer is smarter than the pecl installer): When the installer asks about APXS, say ‘no’. </p> <div class="wp_syntax"> <table> <tr> <td class="code"> ``` pear install pecl/apc
</td> </tr> </table> </div>
- Tell PHP to load APC:
``` echo extension=apc.so > /etc/php.d/apc.ini
</td> </tr> </table> </div> 4. Restart Apache: <div class="wp_syntax"> <table> <tr> <td class="code"> ``` /sbin/service httpd graceful
</td> </tr> </table> </div>
JSON on RHEL & PHP 5.1.6
Stuck with PHP 5.1.6 on RHEL or even CentOS (and a sysadmin who insists on using packages)? Need JSON? I did. The solution is easy:
yum install php-devel<br /> pecl install json
The pecl install failed when it hit an 8MB memory limit, and I was clueless about how to fix it until I learned that the pecl installer ignores the
php.ini
. Turns out the best solution is to use the pear installer (which does followphp.ini
settings):pear install pecl/json
Be Better Dork: Command Line Stuff
Be geeky and look at the Apache modules:
``` /usr/sbin/httpd -l Compiled in modules: core.c prefork.c http_core.c mod_so.c ``` Set your path:
``` PATH=$PATH:/usr/sbin export PATH ```
- Tell PHP to load APC: