Page tree
Skip to end of metadata
Go to start of metadata

For cPanel & WHM version 60

Overview

Use the /scripts/update_local_rpm_versions script to update the /var/cpanel/rpm.versions.d/local.versions file. These updates override the /usr/local/cpanel/etc/rpm.versions file and change how the rpm.versions system manages RPMs.

For more information about how files in the /var/cpanel/rpm.versions.d/ directory override the /usr/local/cpanel/etc/rpm.versions file, read our RPM Targets documentation.

Note:

Because YAML is space-sensitive, misspelled words are common when system administrators edit a file manually. For this reason, we encourage system administrators to use the /scripts/update_local_rpm_versions script to edit the /var/cpanel/rpm.versions.d/local.versions file.

Override management of an RPM target

To use the /scripts/update_local_rpm_versions script to override the rpm.versions system's management of an RPM target, perform the following steps:

  1. Run the following command, where target represents the name of the RPM target, and state represents installed, uninstalled, or unmanaged:

    /scripts/update_local_rpm_versions --edit target_settings.target state 

    For example, to set the pure-ftpd target to the unmanaged state, run the following command:

    /scripts/update_local_rpm_versions --edit target_settings.pure-ftpd unmanaged 
  2. To confirm that the target now uses the desired state, run the following command:

    cat /var/cpanel/rpm.versions.d/local.versions 

    The system displays the current state next to the target name. If, for example, you set the pure-ftpd target to unmanaged, the /var/cpanel/rpm.versions.d/local.versions file will resemble the following example:

    file_format: 
      version: 2
    install_targets: {}
     
    rpm_groups: {}
     
    rpm_locations: {}
     
    srpm_sub_packages: {}
     
    srpm_versions: {}
    target_settings:
      pure-ftpd: unmanaged
    url_templates: {}
  3. Run the following command to apply your changes to the rpm.versions system:

    /scripts/check_cpanel_rpms --fix

    Important:

    You must run this command to apply the changes to the rpm.versions system.

Note:

To set FTP services to unmanaged, run these commands for both the pure-ftpd and proftpd RPM targets.

Return an RPM target to the cPanel-provided behavior

To return an RPM target to the default behavior that cPanel provides in the /usr/local/cpanel/etc/rpm.versions file, perform the following steps:

  1. Run the following command, where target represents the name of the RPM target:

    /scripts/update_local_rpm_versions --del target_settings.target

    For example, to return the pure-ftpd target to the cPanel-provided settings, run the following command:

    /scripts/update_local_rpm_versions --del target_settings.pure-ftpd

    Note:

    When you use this command, you return that RPM target to its default value in the /usr/local/cpanel/etc/rpm.versions file (either installed or uninstalled).

  2. To confirm that the settings in the /var/cpanel/rpm.versions.d/local.versions file no longer override the cPanel-provided defaults for the RPM target, run the following command:

    cat /var/cpanel/rpm.versions.d/local.versions 

    The /var/cpanel/rpm.versions.d/local.versions file will no longer list that RPM target.

  3. Run the following command to apply your changes to the rpm.versions system:

    /scripts/check_cpanel_rpms --fix

    Important:

    You must run this command to apply the changes to the rpm.versions system.

Note:

To return FTP services to the managed state, run these commands for both the pure-ftpd and proftpd targets.

Additional documentation

There is no content with the specified labels

There is no content with the specified labels

There is no content with the specified labels

There is no content with the specified labels