1 Preliminary Note
I have tested this on a Fedora 8 server where Apache2 and PHP5 are already installed and working. I'll use Apache's default document root /var/www/html in this tutorial for demonstration purposes. Of course, you can use any other vhost as well, but you might have to adjust the path to the info.php file that I'm using in this tutorial.
2 Checking PHP5's Current State
First, before we install APC, let's find out about our PHP5 installation. To do this, we create the file info.php in our document root /var/www/html:- vi /var/www/html/info.php
check phpinfo
3 Installing APC
- yum install php-pear
- yum install php-devel httpd-devel
- yum groupinstall 'Development Tools'
- yum groupinstall 'Development Libraries'
- pecl install apc
Now that APC is installed, we create the configuration file /etc/php.d/apc.ini. We must at least add the line extension=apc.so in there; all other configuration options are optional. You can find a list of all available configuration options on http://de2.php.net/manual/en/ref.apc.php.
- vi /etc/php.d/apc.ini
extension=apc.so
apc.enabled=1
apc.shm_size=30
- /etc/init.d/httpd restart
No comments:
Post a Comment