Installing APC on a server running Plesk

I needed to install APC on a Plesk VPS today, and thought i would share what i did. Following the guide in the blog below i made some additions for a few things that were missing.

Original Guide here.

I also happen to be running CentOS, version 6.

Following the same steps in the linked site, i will add the few that you need that were missed and hopefully this will help anyone else who had the same issues i did with this. (if your like me an impatient you can add -y for most of these to speed up the setup process, it just auto answer yes to any yes/no prompts [mostly do you want to download this? sort of things]).

SSH into your server, preferably with some kind of admin/root access, and then type in the following one at a time.

Now we need to install the following as some installations of CentOS don’t have this but you may require it to use some of the PECL extensions.

Now chances are being a web server your setup most likely won’t have a dev tool chain, so we need 2 more things before we install APC. We need a compiler and we need a makefile utility (make will do). But first you can check if you have them before going to the extent of downloading something you may not need, to check if you got them:

If any of the 2 above do not show any results and comes back with nothing then you do not have them and need to install them, if your missing just one then install the one your missing. You will need both of them for the next step, if it comes up with a directory then you have it installed. If not we will get them with:

Now we should be able to download and install APC (don’t use the -y option here):

Now we need to create the extensions configs, first we create the ini file we need:

Then edit the file in vi (i would recommend vi over nano/pico as they tend to glitch over ssh)

Now type this into the vi editor (you need to press ‘i’ before you can type):

So save this file press the escape key and then type :wq and press enter, which should save and quit vi. I choose to disable the cache by default because this setting will apply to all users of your server and it can be a pain if people don’t want it running, they can enable it for themselves in their own directories etc/apc.ini

Lastly we need to restart the http server.

3 thoughts on Installing APC on a server running Plesk

  1. unable to install apc :

     

  2. ^^ I used this command and then moved on:

  3. just one question, got to the end, but how do I verify that it is working?

Leave a Reply