Update: this article is for Ubuntu Dapper Drake (6.06). If you are using later versions, or other Linux distributions, then visit the following links:. APC is a op-code cache for PHP that eliminates the parsing and compiling of script(s) for every page hit. Unlike Zend, it is truly free, and seems to have a lot of commuity momentum behind it lately. As with all optimizations, there is a trade off. APC can use more memory on your server than without it.
Nov 8, 2008 - I just installed Debian onto one of my old computers to use it as a server. I am trying to. E: Package apache2 has no installation candidate. While attempting to install openssh-server on Ubuntu 14.04 64-bit, I get the following error: Package openssh-server is not available but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'openssh-server' has no installation candidate.
The instructions below assumes that you have full control of your server, whether a physical dedicated server or a virtual private server. Although one can always compile from source, this is more time consuming than using Debian's excellent apt-get. Here is how I did it on two machines, with one more to go. Getting the packages 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 Preparing for pecl 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 Running pecl Next we use pecl to download, compile and install APC. Pecl install apc My development server is now an AMD Athlon 64, using a 64-bit kernel. It had 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 same Ubuntu version on my Pentium III test server does not have this error at all. It has the same Apache and PHP versions as well.
Others have this problem, and the workaround as provided in, is to adjust the memory inside the script (it does not work in the php.ini). Edit the /usr/share/php/pearcmd.php, and add: @iniset('memorylimit', '16M'); Configuration Now you can run the above pecl command once more. Now, all you need to do is to add the following to the /etc/php5/apache2/php.ini file: extension=apc.so Now, restart Apache using: /etc/init.d/apache2 restart Now you have a code cache that should speed up Drupal, and you can benefit. To upgrade APC in the future, use the commands: pecl upgrade apc Followed by: /etc/init.d/apache2 restart More info APC is not the only op-code cache / accelerator. You can read more in.
There is also a. Links and Resources. home page. provided the outline for the procedure above. provides an alternative method. APC makes a huge difference.
Contents:. Comments Submitted by on Thu, 2006/06/15 - 07:06. Regarding apt-get vs. Aptitude, it is just a matter of preference.
They both do the same thing, but from a different interface. I am an old UNIX hand (almost 20 years now), so the command line is my preferred interface, not GUIs or TUIs (Text User interface). As for lighttpd, I ran it on my test server for a while, and it basically works.
Memory footprint is less than Apache, but there are a few rough edges (no mechanism for per directory/per user.htaccess equivalent). I reverted back to Apache. I plan to write the details of how to configure lighty for Drupal, since that part may be useful for others.
The following packages have unmet dependencies: apache2-threaded-dev: Depends: libaprutil1-dev but it is not installable Resolving dependencies. The following actions will resolve these dependencies: Install the following packages. Libpq-dev 8.3.3-0ubuntu0.8.04 (hardy-updates). Downgrade the following packages: libpq5 8.3.3-1gutsy1 (now) - 8.3.3-0ubuntu0.8.04 (hardy-updates) Score is -71 Accept this solution? Y/n/q/?
y Downgrade? Oh, it's from the previous core version. I guess there may be a reason for that. No idea what pq5 is anyway.
So I crossed my fingers and let it run. And all is now sweet in Hardy-Heron. Thanks to both of you!
Cloudflare module depends on apache2-api-20120211 but there is no installation candidate for it. What is apache2-api package for? There is no information anywhere regarding this except that apache2-bin provides it on releases? Also there is a PPA for. How should I deal with this for Precise (12.04)?
![Candidates Candidates](/uploads/1/2/5/5/125518136/830468728.png)
Any thoughts? I could just extract the deb file and modify control file of the clouldflare package and remove apache2-api-20120211 from Depends, rebuild and install. I'm not sure if that would break anything.
Even if it doesn't break anything, next-time there is an update from cloulflare, I'll have to repackage it all over again.