How to Install APC on a Linux Server

January 14, 2023 / cPanel & WHM

In this article, you will find out how to install APC on a Linux server. A free and open opcode cache for PHP is called the Alternative PHP Cache (APC). Its objective is to offer a strong, open, and free framework for caching PHP intermediate code.

  1. To download the up-to-date APC from pecl, execute the following commands:
    # cd /usr/local/src/
    # wget http://pecl.php.net/get/APC
  2. Use the following command to compile and unzip the downloaded APC:
    # tar -xvf APC
    # cd APC-*
    # phpize
    # ./configure
    # make && make install
  3. You must now enable the extension in your server’s php.ini file. The command below will display the precise server’s php.ini file.
    # php -i | grep php.ini

    Add “extension=apc.so” & restart apache.

  4. Use the command below to see if it was properly compiled, or create a phpinfo and look at the results.
    # php -i | grep apc

In such a manner, you can install APC on a Linux server. If you need help, please post your question on our web hosting forums. A member of our community will likely have an answer for you. Reach out to our support team for any queries.

Dominos Search