BuycPanel Blog

BuycPanel Blog

Latest news and updates

Custom RPMs: The Pre-Building and Pre-Installation Must-Dos

Posted by Jamison on 03 11 2016.

Red Hat Package Manager (RPM) enables cPanel users to quickly and easily deploy files. The system, when installed, creates rules and standards when it comes to installing other software, including the process that takes place during software installation on a system. And while cPanel and WHM servers already feature some pre-installed RPMs, you can still choose to install several others, so that you can update your systems easier and faster.

 

With cPanel now shipping many of both platforms’ third-party dependencies in the form of RPMs, the Linux-based control panel now offers users the ability to customize them. However, before you can do so, you should first know how to custom-build them. After customization, you then have to reinstall them. To do all these and install a custom RPM, log in as a root user through SSH.

 

The Must-Dos before Starting

 

There are certain things you have to perform first prior to building and…

Red Hat Package Manager (RPM) enables cPanel users to quickly and easily deploy files. The system, when installed, creates rules and standards when it comes to installing other software, including the process that takes place during software installation on a system. And while cPanel and WHM servers already feature some pre-installed RPMs, you can still choose to install several others, so that you can update your systems easier and faster.

 

With cPanel now shipping many of both platforms’ third-party dependencies in the form of RPMs, the Linux-based control panel now offers users the ability to customize them. However, before you can do so, you should first know how to custom-build them. After customization, you then have to reinstall them. To do all these and install a custom RPM, log in as a root user through SSH.

 

The Must-Dos before Starting

 

There are certain things you have to perform first prior to building and installing custom RPMs. This include installing the rpm-build package, enabling cPanel and WHM devel target, installing any required additional prerequisites, and ensuring that you install all of the cPanel and WHM-required RPMs.

 

RPM-Build Package Installation

 

Just in case you have not installed the rpm-build package yet, you can use this command: “yum install rpm-build” (do not include the quotation marks).

 

cPanel and WHM Devel Target Enabling

 

After installing the rpm-build package, you now have to proceed with the enabling of the cPanel and WHM devel target.

 

To ensure you have an enabled and updated devel target, you need to run some scripts first, including the “update_local_rpm_versions” and the “check_cpanel_rpms” scripts. This is a prerequisite for installing custom RPMs. The primary function of the devel target is to ensure proper installation of the RPMs’ devel versions, which both cPanel and WHM utilizes for local SRPM compilation.

 

Just use the following commands to execute these critical scripts:

 

  1. /scripts/update_local_rpm_versions –edit target_settings.cpanel-devel installed\
  2. /scripts/check_cpanel_rpms –targets cpanel-devel –fix

 

Note though, that in the event you have to rebuild some of the RPMs already provided by cPanel, you may have to install a few other RPMs that does not come as default during the initial cPanel & WHM installations.

 

Additional Prerequisites Installation

 

To create and install custom RPMs, you first need to meet all of the prerequisites of the RPM. Installing them usually comes as the first step. You will find all of the prerequisites of these RPMs located in the .spec file, complete with their own required version number.

 

cPanel and WHM-required RPMs Installation

 

Last, but not the least in this Custom RPMs: The Pre-Building and Pre-Installation guide is to execute this script: /scripts/sysup. Doing so will make certain you have installed all of the prerequisite RPMs on your server.

 

Successfully installing all of these RPMs on your server, after you run the above-mentioned script, will provide you with this message: “All Needed RPMS are installed.”

 

Sometimes though, a simple mistake can happen, which will result in an error message appearing. Read the message thoroughly and carefully review its details so you can correct the installation problems. This will help you avoid further issues once you start building and installing your custom RPMs.