KNOWNHOST WIKI

User Tools

Site Tools


control-panels:directadmin:how-to-install-opcache-with-custombuild

How To Install OpCache on DirectAdmin with CustomBuild

If you need to install Opcache, you can use this guide to accomplish this. You need to first check if it is installed or not because it is common to adjust the Opcache configuration, and you do not want to reinstall it and lose any previous customizations you made. Thus, use this command to check (## represents the PHP version) for each PHP version you have installed:

  /usr/local/php##/bin/php -m  | grep -i opcache


Installation Via CLI

To install Opcache for DirectAdmin servers, use CustomBuild to manage the installation by running the following commands as the root user via SSH (remember that Knownhost uses port 2200 by default on all but our shared hosting plans):

  cd /usr/local/directadmin/custombuild
  ./build set opcache yes
  ./build opcache

You can confirm the installation (replace ## with the PHP version) like so:

  /usr/local/php##/bin/php -m  | grep -i opcache

Don't be alarmed if you see 'Zend OPcache' listed twice. This is normal output for this module when installed.

So, to check for PHP versions 5.6 and 7.3, you'd use the following commands:

  /usr/local/php56/bin/php -m  | grep -i opcache
  /usr/local/php73/bin/php -m  | grep -i opcache

Alternatively, to check for all PHP versions installed at once, just run the following:

  for each in $(ls -lah /usr/local/ | grep -Po 'php[\d][\d]'); do printf "$each :\n";  /usr/local/$each/bin/php -m  | grep -i opcache ;done


Installation Via the CustomBuild GUI Plugin

This CustomBuild plugin is not installed by default. If you need this plugin installed, follow our wiki guide The DirectAdmin CustomBuild GUI Plugin or contact the support team and we'll gladly install this plugin for you!

You can use the CustomBuild Plugin to build Opcache. To do so:

  1. Log into DirectAdmin as Admin
  2. Click the CustomBuild Plugin option
  3. Click the "Build Software" tab
  4. Locate "Build opcache" in the list, and then click the button "Build"


You should see a window open showing the progress of the build.


That's it! :)

control-panels/directadmin/how-to-install-opcache-with-custombuild.txt · Last modified: 2020/06/16 14:38 by Karson N.