Preparing the configuration file for Amazon Linux


The patch downloader utility for Amazon Linux runs only on Amazon Linux 2 server. The utility 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 Amazon Linux based on the information specified in the configuration file.

To prepare the configuration file

Do the following:

  1. Log in to the Amazon Linux 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>
       <os>AMAZON_LINUX</os>
       <arch>x86_64</arch>
       <channel-label>amzn2-core</channel-label>
       <channel-url>$awsproto://$amazonlinux.$awsregion.$awsdomain/2/$product/$target/$basearch/mirror.list</channel-url>
    </filter>
    <filter>
       <os>AMAZON_LINUX</os>
       <arch>x86_64</arch>
       <channel-label>amzn2extra-ecs</channel-label>
       <channel-url>$awsproto://$amazonlinux.$awsregion.$awsdomain/2/extras/ecs/latest/$basearch/mirror.list</channel-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>AMAZON_LINUX</os-type>
      </config>
      <subscription>      
    <filter>
       <os>AMAZON_LINUX</os>
       <arch>x86_64</arch>
       <channel-label>amzn2-core</channel-label>
       <channel-url>$awsproto://$amazonlinux.$awsregion.$awsdomain/2/$product/$target/$basearch/mirror.list</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*