Preparation. Log in as the default shell user and configure PHP for APC.
sudo nano /opt/local/etc/php.ini edit /opt/local/etc/php.ini on webservers find: ;extension=apc.so change to: extension=apc.so
At the very bottom of your existing /opt/local/etc/php.ini file you need to add the following entry for APC.
[APC] ;specifies the size for each shared memory segment 8MB to start apc.shm_size=8 ;max amount of memory a script can occupy apc.max_file_size=1M apc.ttl=0 apc.gc_ttl=3600 ; means we are always atomically editing the files apc.file_update_protection=0 apc.enabled=1 apc.enable_cli=0 apc.cache_by_default=1 apc.include_once_override=0 apc.localcache=0 apc.localcache.size=512 apc.num_files_hint=1000 apc.report_autofilter=0 apc.rfc1867=0 apc.slam_defense=0 apc.stat=1 apc.stat_ctime=0 acp.ttl=7200 apc.user_entries_hint=4096 apc.user_ttl=7200 apc.write_lock=1
Download the APC package from http://pecl.php.net/package/APC. In side that package there is a file called “apc.php”
Place apc.php in your default web directory so you can go to http://yoursite.com/apc.php There you will see a nice APC dashboard that has lots of handy features.
sudo svcadm restart http