Question about installing / configuring APC
First installed APC via:
pecl install apc
That seemed to work okay. But then I read somewhere that you didn't need PECL and could just do:
apt-get install php-apc
So I did this too. It asked if I wanted to keep my apc.ini file and I said yes.
Have I screwed anything up? Should I have uninstalled the PECL stuff?
Also, right now I've got my apc.ini looking like this:
extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.optimization=0
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.numfileshint=1024
apc.mmapfilemask=/tmp/apc.XXXXXX
apc.enable_cli=1
apc.stat=on
apc.stat=1
Are there any recommended settings for better performance? I'm using a Drupal 6.x site.
THANKS.
5 Replies
So, IMO, yes, it'd be better to kill it and use the prepackages module, which will be always in sync with your (also prepackaged) PHP runtime.
Of course, Debian 5 offers APC 3.0.19 with back-ported security fixes, while the current version you can compile off PECL is 3.1.4… but, is the newer version worth the "compile manually, keep secured and up to date manually" hassle?
pecl uninstall apc
aptitude purge php-apc
aptitude install php-apc
should do the trick… make sure you don't have any lingering references to apc in the main php.ini, and edit /etc/php5/
All this assuming you can live with a bit of downtime in case of something going bad. >.>;
Good luck!
PS. The reinstall of the repo version with aptitude might be actually unnecessary… but it's a way to start from hopefully-clean state.