KNOWNHOST KNOWLEDGE BASE

Hosting Question? Find the Solution - Browse our Guides, Articles, and How-To's

How To Install OpCache on DirectAdmin with CustomBuild?

Category: DirectAdmin
Tags: # # #

If you need to install Opcache, you can use this guide to accomplish this. You need first to 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 the below command to check (## represents the PHP version) for each PHP version you have installed,

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

Learn, How To Install OpCache on DirectAdmin with CustomBuild ?


Installation Via the CustomBuild GUI Plugin

1. First, to login into DirectAdmin control panel visit, 

https://your-domain.com:2222 or https://IP-address:2222 or https://server-hostname:2222.

login-into-directadmin

2. Navigate to Extra Features → CustomBuild 2.0.

navigate to custom build

3. Navigate to Build Software.

navigate to build software custombuild directadmin

3. Next, locate “Build opcache” in the list, and then click the button “Build“.

locate opcache build custombuild

4. System will start the installation of OpCache, you should be able to see the progress of completion on the popup.

how to install opcache directadmin gui

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.

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

Example,

/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

Conclusion

Now that we’ve gone over how to install OpCache on DirectAdmin with CustomBuild.

KnownHost offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team ready to help you with requests should you need our assistance. You’re not using KnownHost for the best webhosting experience? Well, why not? Check with our Sales team to see what can KnownHost do for you in improving your webhosting experience.