Preparing the configuration file for CentOS


The patch downloader utility for CentOS uses the configuration file that includes the following details:

  • Definition of a proxy server (if one is used)
  • Temporary directory on the server that is used by the utility during download
  • Filter definitions

The utility downloads the metadata and payloads for CentOS based on the information specified in the configuration file.

To prepare the configuration file

Do the following:

  1. Log in to the CentOS system.
  2. Edit the sample XML configuration file (sample-rpmlinux-downloader.config) for use as the configuration file.
  3. (Optional) Add the proxy server information using the following XML tags:

  4. Add download information using the following XML tags:

  5. Modify filters in the <subscription> tag. These filters define patches that are included for download.

    Example of a filter
    <filter type="channel" os-type="CENTOS" download-method="REPOSYNC" is-parent="true">
                 <name>CentOs (v. 7 for 64-bit x86_64)</name>
                 <os>CENTOS7</os>
                 <arch>x86_64</arch>
         <child-channels>
            <name>CentOs-Base-7-x64</name>
            <name>CentOs-Updates-7-x64</name>
             <name>CentOs-7-x64</name>
           </child-channels>
    </filter>
    <filter download-method="REPOSYNC" os-type="CENTOS">
            <name>CentOs-Base-7-x64</name>
           <os>CENTOS7</os>
          <arch>x86_64</arch>
          <label>CentOs-Base-7-x64</label>
          <url>http://mirror.centos.org/centos/7/os/x86_64/</url>
    </filter>
    <filter download-method="REPOSYNC" os-type="CENTOS">
            <name>CentOs-7-x64</name>
           <os>CENTOS7</os>
          <arch>x86_64</arch>
          <label>CentOs-7-x64</label>
          <url>http://mirror.centos.org/centos/7/x86_64/</url>
    </filter>
  6. Save the file.

    The following file shows some sample data and parameter descriptions (sample-rpmlinux-downloader.config):

    Sample configuration file
    <?xml version="1.0" encoding="UTF-8"?>
    <rpmlinux-downloader-config>
      <config>
         <!--<proxy-settings>
    <port>8080</port>
    <host>127.0.0.1</host>
    <username>user</username>
    <password></password>
    <domain-name></domain-name>
    <proxy-type>ntlm-v2</proxy-type>
    <protocol>http</protocol>
    </proxy-settings>-->
         <temporary-location>/tmp</temporary-location>
         <payload-repository-location>/home/repo/</payload-repository-location>
         <!-- The default value for download-request-retries will be 10 if no value is specified -->
         <download-request-retries>10</download-request-retries>
         <download-request-timeout>180000</download-request-timeout>
         <downloader-parallel-threads>10</downloader-parallel-threads>
         <os-type>CENTOS</os-type>
      </config>
      <subscription>
         <filter>
            <os>CENTOS7</os>
            <arch>x86_64</arch>
            <channel-label>base</channel-label>
            <channel-url>http://mirror.centos.org/centos/7/os/x86_64/</channel-url>
         </filter>
      </subscription>
    </rpmlinux-downloader-config>

What's next

Run the patch downloader utility that uses the configuration file to download the patches. For details, see Running the Patch Downloader utility for rpmLinux.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*