Regarding apt-get vs. aptitude, it is just a matter of preference. They both do the same thing, but from a different interface.
Installing APC. First, we run apt-get to get what we need, if it is already not there.
apt-get update
apt-get install apache2-dev php5-dev php-pear make
I am using Apache2 and PHP5 on the development server. Adjust the versions above if necessary to match your environment.
Since I am using Apache2, the apxs is named differently, and pecl will fail if I do not work around this. So, I had to provide an apxs which is just a symbolic link.
ln -s /usr/bin/apxs2 /usr/bin/apxs
Next we use pecl to download, compile and install APC.
pecl install apc
Now, I am getting a strange problem running the above pecl command, with an error saying:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 143 bytes) in /usr/share/php/PEAR/PackageFile/v2.php on line 1772
Regarding apt-get vs. aptitude, it is just a matter of preference. They both do the same thing, but from a different interface.
Installing APC. First, we run apt-get to get what we need, if it is already not there.
I am using Apache2 and PHP5 on the development server. Adjust the versions above if necessary to match your environment.
Since I am using Apache2, the apxs is named differently, and pecl will fail if I do not work around this. So, I had to provide an apxs which is just a symbolic link.
Next we use pecl to download, compile and install APC.
Now, I am getting a strange problem running the above pecl command, with an error saying:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 143 bytes) in /usr/share/php/PEAR/PackageFile/v2.php on line 1772
The solution is:
Edit the /usr/share/php/pearcmd.php, and add:
@ini_set('memory_limit', '16M');