Installing DSO with mod_ruid2 using EasyApache 4

Dynamic Shared Object (DSO) is an Apache module that is used to handle PHP scripts. It is one of a few PHP Handlers available to choose from. Its major benefits are speed and the ability to use OpCode caching. When implemented with the Apache module, Mod_Ruid2, DSO can be utilized more securely. In this guide, you will learn how to install DSO with Mod_Ruid2 using EasyApache 4.

Installing DSO with ModRuid2

  1. WHM login screen, Username root, Password field filled, and Log in button highlightedLog into WHM as root.
  2. easy entered into WHM search fieldType ‘easy‘ into the search field in the top left of WHM.
  3. WHM Software EasyApache 4 menu option highlightedUnder the Software category, click on EasyApache
  4. EA4 Currently Installed Packages Customize button highlightedIn the Currently Installed Packages section, click on the Customize button.
  5. mod_mpm_prefork Apache Module toggle button highlightedFor Apache MPM click on the toggle button next to mod_mpm_prefork.

    Apache Module conflict warning message Yes button highlighted

    If prompted, click the Yes button to proceed with this selection and then click the Next button.

  6. Apache Modules mod_ruid2 search field and toggle button highlightedFrom the Apache Modules section, use the search box to locate mod_ruid2 and click the toggle button to select it for installation. Click the Next button.
  7. PHP Versions selected toggle buttons highlightedSelect the PHP version(s) you would like to install by clicking on the toggle button(s). Click the Next button to continue.
  8. PHP Extensions php56-php search and toggle button highlightedUse the search box to locate php##-php, where ‘##’ is replaced by the PHP version number that you want to use DSO as the handler for (e.g. for PHP 5.6 ‘php56-php’). Click on the toggle button to select it for installation.

    PHP Extensions conflict warning message, Yes button highlighted

    If prompted, click the Yes button to proceed with this selection and then click the Next button to proceed.

  9. OPTIONAL: Select any desired Ruby modules. Click the Next button.
  10. EasyApache 4 Review sectionReview the changes to be made and then click on the Provision button to begin installing and configuring DSO components.

Once complete, you will receive a successful message:

Confirm DSO Available

Once you have provisioned the EasyApache profile as described in the section above, follow the steps below to confirm that DSO is now available for the PHP version you selected.

  1. Connect to your server as root via an SSH connection.
  2. Run the following command:

    /usr/local/cpanel/bin/rebuild_phpconf –available

You should see the following output after running that command:

root@localhost ~ $ /usr/local/cpanel/bin/rebuild_phpconf --available 
ea-php56: cgi dso none

Set DSO as PHP Handler

Once you have confirmed that the DSO handler is installed and available on your server, you can proceed to enable it from the Command Line Interface (CLI) or Web Host Manager (WHM).

Via CLI

  1. Connect to your server as root via an SSH connection.
  2. Run the following command, replacing ‘##’ with PHP version number DSO was installed for (e.g. for PHP 5.6 ‘–ea-php56=dso’):

    /usr/local/cpanel/bin/rebuild_phpconf –ea-php##=dso

Via WHM

  1. WHM login screen, Username root, Password field filled, and Log in button highlightedLog into WHM as root.
  2. WHM Search field multiphp entered and highlightedType ‘multiphp‘ into the search field in the top left of WHM.
  3. WHM Software MultiPHP Manager menu option highlightedUnder the Software category, click on MultiPHP Manager.
  4. MultiPHP Manager PHP Handlers tab highlightedClick on the PHP Handlers tab.
  5. PHP Version list Edit button highlighted next to ea-php56Next to the PHP version you want DSO for, select Edit under the Actions column.
  6. PHP Handler drop-down menu dso highlightedSelect DSO from the drop-down menu under the PHP Handler column.
  7. PHP Handler Apply button highlightedFinally, click the Apply button.

Congratulations! You are now running the PHP handler DSO. If you want to learn more about how to use EA4, be sure to check out our guide on installing PHP extensions using EasyApache4.

JB
John-Paul Briones Content Writer II

John-Paul is an Electronics Engineer that spent most of his career in IT. He has been a Technical Writer for InMotion since 2013.

More Articles by John-Paul

Was this article helpful? Join the conversation!