Automatic Update Tool (mlupdater) Manual


  1. Contents

    1. Contents
    2. What is mlupdater?
    3. MLUpdater License
    4. License server
    5. Updater functions
    6. Manual updater (mlupdater)
    7. Automatic updater (mlupdaterd)
    8. Distribution server
    9. Configuration file
    10. Notes
    11. FAQ
    12. APPENDIX


  2. What is mlupdater?

    MIRACLE LINUX system is comprised of several hundreds of packages. When serious problems such as security holes and bugs are discovered, MIRACLE LINUX will release update packages which address these vulnerabilitoes. These packages will be distributed at the MIRACLE LINUX site (http://www.miraclelinux.com).

    Conventionally, in prior to applying these patches, users are asked to download required packages by themselves. However, "mlupdater" alleviates this effort by downloading and installing a set of latest packages all at once.

    "mlupdater" includes 90 days of free period following to the OS installation, and during the period you are free to launch "mlupdater" as much as you like.
    This period can be extended by purchasing MLUpdater license from NEC, who will issue a license valid for a certain period depending on their support scheme. (See III. License for details)


    Even in cases where all the servers in your network cannot establish connections with external networks due to security restrictions, the servers can use mlupdater to apply fixes from a distribution server, by creating a mirror server of the MIRACLE LINUX distribution server in your local network. CD-R or USB-drives should be used for creating a mirror server.

    * "mlupdater" supports MIRACLE LINUX V2.1 onwards.


  3. License

    A license is required in order to use mlupdater.
    When mlupdater is installed, you are provided with 90 days of trial period for using mlupdater. Please note that the license will be expired after the period.
    MLUpdater license password will be issued from NEC. Please contact NEC for details how to get your license.
    There are two kinds of licenses are available, you should choose one which is more appropriate for the use of your servers.

    1. Standalone license

      This license allows mlupdater to be used on a single host machine. The license password is stored in the /etc/mlupdater/mlupdater.conf file in the each host.

    2. License server license

      License server license is attractive when 2 or more machines are used in the system.
      With the standalone license, you need to configure mlupdater on each of your machine with its unique license password. With the license server license, a license password is required for the single host machine which runs the license server.
      The license password is stored in the /usr/share/mllm/mllm.lic file of the license server.
      This license is required for a delegate server.


  4. License server

    When you run the updater with a standalone license, it will verify its license stored in its local environment. License server licenses are all managed on a single license server. When mlupdater initialises, it will connect to the license server, and grab a single license. The license will be released when mlupdater terminates.

    A license server is also required for a delegate server.

    1. License file (/usr/share/mllm/mllm.lic) format

      The format of the license file is as follows:

      MLUPD:license number:license term:license password
      

      Please enter the exact character string issued from the MIRACLE LINUX mlupdater license issuance page or our partners who provide equivalent service.

    2. License server startup

      Start the license server by executing the following command:

      mllmd-1.1.x or earlier
      # mllmd &
      
      mllmd-1.2.x or later
      # service mllmd start
      
    3. Logging

      All logs relates to license will be recorded in /var/log/messages.


  5. Updater functions

    "mlupdater" comes with the following functions:


  6. Manual updater (mlupdater)

    The manual updater (mlupdater) looks up the latest packages available, download those selected by users and apply them to the system. You can select packages to update interactively on screen.

    mlupdater refers to configurations set at /etc/mlupdater/mlupdater.conf.

    Steps below descibe how to use mlupdater:

    1. Startup

      Run mlupdater from the terminal by type the following to your terminal:

      # mlupdater
      

      mlupdater can be launched with the test mode by specifying -t option. Updating will not be performed when its in the test mode.

      # mlupdater -t
      

      When mlupdater initializes, the select mode screen will be displayed as shown below.

      Choose "PACKAGE UPDATE" or "DOWNLOAD ONLY", and click the "NEXT" button.

      • PACKAGE UPDATE will download and update packages.
      • DOWNLOAD ONLY will only download packages.

    2. Downloading update information

      When mlupdater initialises, it connects to the package distribution server and retrieve the update information list.

      From the list, mlupdater determines if newer packages are available at package distribution server. Wait for several minutes to complete.



    3. Package selection

      When the comparison has completed, it makes a list of packages you can update or install. By default, packages exist in the system are selected as update candidates.
      All the selections can be cleared by pressing the "Clear" button.

      You can select the package by placing a cursor to it and pressing space bar. Press the space bar again on a selected package when you want to deselect it.

      When a package is selected, the checkbox state will change to the following:







      ValueState
      UPackage will be installed in update mode.
      IPackage will be installed in install mode. This state is active when you select a package which is not installed in the system or a package specified as auto_update.install_packages in /etc/mlupdater/mlupdater.conf.
      DThe package is required for resolving dependencies for another packages.

      Additionally, following symbols are assigned to the listed package data:

      ValueState
      *Earlier package exists in the system.
      -Earlier package not installed in the system.

      When the package selection has been done, press the "NEXT" button to proceed.

    4. Downloading and installing

      mlupdater downloads the selected set of packages from a distribution server.

      If package downloads are completed successfully, the package installations begin. If "DOWNLOAD ONLY" was selected at the start, mlupdater terminates here.

      Choose whether or not to update packages included in the Developer CD.



    5. Completion

      Choose whether to leave or delete the downloaded packages in your local environment.

      When all procedures have completed successfully, the following screen will be displayed. The manual updater will log information to /tmp/mlupd.log. Please check this file for your confirmation.




    6. Troubleshooting

      1. Network errors
        The default distribution server is set to mlpkgsrv.miraclelinux.com. In the event of a network error, such as DNS look-up failure, the following screen will be displayed.
        Please check whether the Internet settings are configured correctly.

      2. Server maintenance
        When mlpkgsrv.miraclelinux.com is down for maintenance, the following screen will be displayed.
        If this screen is displayed, please wait for a while and run mlupdater again.

      3. HTTP timeouts
        When an HTTP timeout occurs due to the heavy network traffic or the underperformance of a proxy server, the following screen will be displayed.
        If you encounter this problem, you can set a longer timeout period for the http.timeout value in /etc/mlupdater/mlupdater.conf.

      4. Package update errors
        If a downloaded file is corrupted, or if resolving a package dependency fails, the following screen will be displayed.
        The manual updater will log information to /tmp/mlupd.log; please verify the details.

        The following mlupd.log is an example of dependency resolution failure.

        error: Failed dependencies:
        	kernel-smp = 2.6.9-11.25AX is needed by ocfs2-2.6.9-11.AXsmp-1.0.8-1.3AX.i386
        




  7. Automatic updater (mlupdaterd)

    The automatic updater mode works based on the settings in the /etc/mlupdater/mlupdater.conf configuration file.

    1. Setup

      Set auto_update.enable in /etc/mlupdater/mlupdater.conf to "yes."
      (If it is set to "no," it allows only download packages.)

      auto_update.enable              = yes
      
    2. Startup

      Run the following with the root user:

      # mlupdaterd
      

      The program will download and update or install packages in accordance with your settings.

    3. Termination

      The automatic updater automatically terminates when it completes its operations.

    4. Log file checking

      It is recommended to check the log file generated by the automatic updater. At default setting, the log file will be kept in /var/log/mlupdater.log.

    5. Registration in crontab

      mlupdater in automatic mode can be executed periodically by registering in crontab.

      # crontab -l > /tmp/cron.ent
      # echo '0 1 * * 1 /usr/sbin/mlupdaterd' >> /tmp/cron.ent
      # crontab /tmp/cron.ent
      # rm -f /tmp/cron.ent
      
    6. Running the manual updater (optional basis)

      When auto_update.enable is set to "no," or the kernel package is included in auto_update.exclude_packages, only automatic package download will be carried out, and packages will be stored in a directory under /var/mlupdater/pub.
      Running the manual updater enables you to avoid the waiting time for download by harnessing the automatically downloaded packages.


  8. Distribution server

    If there are multiple MIRACLE LINUX systems in your environment, you can choose one of them as a distribution server to download necessary packages from MIRACLE LINUX site, and let all the remaining servers to refer to this distribution server. Because the remaining hosts will get packages from this delegate, network traffic between the LAN and WAN can be reduced.

    Even in cases where no servers in network are connected to external networks, the servers can use mlupdater connecting to a distribution server by creating a mirror server of the MIRACLE LINUX download server via CD-R or USB hard disk.

    Distribution servers can have three possible operations: "automatic distribution server", "manual distribution server", "delegate server."

    1. Automatic distribution server

        An automatic distribution server works by running the automatic updater (mlupdaterd) and an HTTP server (httpd).
        * It can be used only when the automatic distribution server and the clients have the same versions and architecture.

      1. Preparing the automatic distribution server.
        • Modify updater.server in /etc/mlupdater/mlupdater.conf as follows:
          updater.server          = mlpkgsrv.miraclelinux.com
          
        • Make the download directory accessible via HTTP.
          # ln -s /var/mlupdaterd/pub /var/www/html/pub
          
      2. Configure the automatic distribution server to be resolved with its hostname mlpkgsrv.

        Add mlpkgsrv to e.g. DNS, NIS, or LDAP. At this point, set the same IP address as the delegate host.

      3. Run mlupdaterd and httpd on the automatic distribution server.

        # mlupdaterd
        # service httpd start
        

        * If you want to run mlupdaterd periodically, register mlupdaterd with e.g. crontab.

      4. Run the manual updater (mlupdater) or the automatic updater (mlupdaterd) on the other hosts.

        The IP address of the automatic distribution server needs to be resolved by its hostname mlpkgsrv.


    2. Manual distribution server

        To make a host works as a manual distribution server, prepare the necessary directory structure via the HTTP server (httpd) with a CD-R or USB hard disk.
        This operating configuration is applicable when the manual distribution server is isolated from external networks and cannot connect directly to the MIRACLE LINUX package download server, or when the manual distribution server and the clients do not have the same versions or architecture.

      1. Copy the files to the manual distribution server.

          Download and copy the required directory contents from MIRACLE LINUX's ftp.miraclelinux.com server to the manual distribution server.

        • MIRACLE LINUX Standard Edition V2.1
          Using http or ftp, copy all the files from ftp.miraclelinux.com/pub/Miracle/ia32/standard/2.1/updates/RPMS to /var/mlupdater/pub/Miracle/ia32/standard/2.1/updates/RPMS.
        • MIRACLE LINUX V3.0 - Asianux Inside
          Using http or ftp, copy all the files from ftp.miraclelinux.com/pub/Miracle/ia32/standard/3.01/updates/RPMS to /var/mlupdater/pub/Miracle/ia32/standard/3.0/updates/RPMS.
        • MIRACLE LINUX V3.0 - Asianux Inside for x86_64
          Using http or ftp, copy all the files from ftp.miraclelinux.com/pub/Miracle/x86_64/standard/3.0/updates/RPMS to /var/mlupdater/pub/Miracle/x86_64/standard/3.0/updates/RPMS.
        • MIRACLE LINUX V4.0 - Asianux Inside
          Using http or ftp, copy all the files from ftp.miraclelinux.com/pub/Miracle/ia32/standard/4.0/updates/RPMS to /var/mlupdater/pub/Miracle/ia32/standard/4.0/updates/RPMS.



        • MIRACLE LINUX V4.0 - Asianux Inside for x86_64
          Using http or ftp, copy all the files from ftp.miraclelinux.com/pub/Miracle/x86_64/standard/4.0/updates/RPMS to /var/mlupdater/pub/Miracle/x86_64/standard/4.0/updates/RPMS.
        • MIRACLE LINUX V4.0 One - Asianux Inside
          The same as MIRACLE LINUX V4.0 - Asianux Inside.
        • MIRACLE LINUX V4.0 One - Asianux Inside for x86_64
          The same as MIRACLE LINUX V4.0 - Asianux Inside for x86_64.

      2. Make the download directory accessible via HTTP.
        # ln -s /var/mlupdaterd/pub /var/www/html/pub
        
      3. Configure the IP address of the manual distribution server to be resolved by the hostname mlpkgsrv.

        Add mlpkgsrv to e.g. DNS, NIS, or LDAP. At this point, set the IP address to same as the manual distribution server.

      4. Run httpd on the manual distribution server.

        # service httpd start
        
      5. Run the manual updater (mlupdater) or the automatic updater (mlupdaterd) on the other hosts.

        The IP address of the manual distribution server should be configured so that it can be resolved by mlpkgsrv.


    3. Delegate server

        Set up the delegate server host as a distribution server by running the license server (mllmd), the automatic updater (mlupdaterd), and the HTTP server (httpd).
        * It can only be used when the delegate server and the clients have the same versions and architecture.

      1. Prepare the delegate server.
      2. Configure the IP address for the license server and the distribution server to be resolved with the hostnames mllicsrv and mlpkgsrv respectively.

        Add mllicsrv and mlpkgsrv to e.g. DNS, NIS, or LDAP. At this time, set the IP addresses to that of the delegate host.

      3. Run mllmd, mlupdaterd, and httpd on the delegate server.

        mllmd startup, for mllmd-1.1.x or earlier
        # mllmd &
        
        mllmd startup, for mllmd-1.2.x or later
        # service mllmd start
        
        mlupdaterd and httpd startup
        # mlupdaterd
        # service httpd start
        

        * If you want to run mlupdaterd periodically, register mlupdaterd in e.g. crontab.



      4. Run the manual updater (mlupdater) or the automatic updater (mlupdaterd) on the other hosts.

        The delegate server should be configured so that mlupdater is able to resolve its IP address from names mllicsrv and mlpkgsrv .


  9. Configuration file

    The mlupdater configuration file is /etc/mlupdater/mlupdater.conf. The settings for each parameter in this file are as follows:

    1. License settings
      Parameter nameDefault valueManualAutoUse
      licpw.server mllicsrv Yes Yes Specifies the hostname or IP address where the license server (mllmd) is running. Its IP address should able to be resolved from its hostname. When the hostname "mllicsrv" resolves the IP address, the updater recognizes the host as the license server.
      If the specified hostname does not exist, the updater searches the "mllicsrv" host. If that fails, the updater will use the license password configured in the following licpw.entry.
      licpw.entry 90-day use password Yes Yes Specifies the license password for the standalone license.
      If the license server license acquition from the license server fails, the updater will attempt to use the license written here.

    2. Package distribution server settings
      Parameter nameDefault valueManualAutoUse
      updater.server mlpkgsrv.miraclelinux.com Yes Yes Specifies the hostname or IP address of the package distribution server.
      When the license server license acquired, and the hostname "mlpkgsrv" resolves its IP address, the updater automatically recognizes the host as the package distribution server.
      updater.port 80 Yes Yes Specifies the package distribution server port number.
      When a license server license has not been obtained, the value set here will be ignored, and 80 will be used.

    3. Server connection settings
      Parameter nameDefault valueManualAutoUse
      http.timeout 900 Yes Yes Specifies the timeout duration in seconds for connection to the package distribution server via the HTTP protocol. This is a timeout period for mlupdater to determine the connection failure.


    4. Proxy server settings
      Parameter nameDefault valueManualAutoUse
      proxy.server None Yes Yes Specifies the hostname or IP address of the proxy server.
      mlupdater needs to obtain the IP address from its hostname.
      proxy.port 3128 Yes Yes Specifies the proxy server port number.
      proxy.user None Yes Yes Specifies the user name when using a proxy server for authentication.
      proxy.passwd None Yes Yes Specifies the password when using a proxy server for authentication.

    5. Mail transfer function settings
      Parameter nameDefault valueManualAutoUse
      mail.enable yes No Yes Specifies whether or not to receive mails for automatic updater logs.
      "yes" or "no" are the option.
      mail.server localhost No Yes Specifies the hostname or IP address of the SMTP server.
      mail.to root@localhost No Yes Specifies the mail receiver's address.
      mail.from root@localhost No Yes Specifies the sender's address in the "From:" field of the mail.

    6. Manual download function settings
      Parameter nameDefault valueManualAutoUse
      manual_update.select_mode all Yes No Specifies whether MLUpdater should select candidate packages to-be-installed upon its initialization.

      "all": select all the packages currently installed in the system.
      "none": do not select any package
      "conf": refer to the parameters set by auto_update.packages and auto_update.exclude_packages and follow the configurations specified.

      Note: packages specified in auto_update.exclude_packages will not be updated even if they are required for resolving dependencies.

    7. Automatic download function settings
      Parameter nameDefault valueManualAutoUse
      auto_download.enable yes No Yes Specifies whether or not to enable the automatic downloading.
      "yes" or "no" are the option.
      auto_download.path /var/mlupdater Yes Yes Specifies the path to store the downloaded update packages with an absolute path name.
      auto_download.packages .* No Yes Specifies the names of the packages to be downloaded automatically. Regular expressions can be used for the package names. To specify multiple names, split them with "," (comma). [*1]
      auto_download.exclude_packages None No Yes Specifies the names of packages which are not to be downloaded automatically. Regular expressions can be used for the package names. To specify multiple names, split them with "," (comma). [*1]
      auto_download.dev_cd yes No Yes Specifies whether or not to download packages included on the Developer CD. "yes" or "no" are the options.
      auto_download.del_upon_comp no No Yes Specifies whether or not to delete the downloaded packages following to its update.
      "yes" or "no" are the available options.

      [*1] When a package is specified in both auto_download.packages and auto_download.exclude_packages, auto_download.exclude_packages has got its preference over auto_download.packages and hence it is going to be excluded from the downloading list.





    8. Automatic update settings
      Parameter nameDefault valueManualAutoUse
      auto_update.enable no No Yes Specifies whether or not to enable the automatic update function.
      "yes" or "no" can be specified.
      auto_update.packages .* No [*2] Yes Specifies the names of the packages to automatically update. Regular expressions can be used for the package names. To specify multiple names, split them with "," (comma). [*1]
      auto_update.exclude_packages kernel.*, php.*, tomcat.*, samba.*, postgresql.*, ^ocfs2.* No [*2] Yes Specifies the names of packages which are not automatically updated. Regular expressions can be used for the package names. To specify multiple names, split them with "," (comma). [*1]
      auto_update.install_packages kernel$, kernel-smp$, kernel-enterprises$, kernel-hugemem$, ^kernel-.*-*driver-aarich$, ^kernel-.*-*driver-a320raid$, ^kernel-.*-largesmp$,^ocfs2$ Yes Yes Specifies the packages to install in install mode instead of updating them. Regular expressions can be used for the package names. To specify multiple names, split them with "," (comma). The packages marked as the default packages in this table will be installed rather than updated, even if their entries are deleted from the configuration file.

      [*1] When one package is specified simultaneously in auto_update.packages and auto_update.exclude_packages, auto_update.exclude_packages is adopted.

      [*2] The parameters auto_update.packages and auto_update.exclude_packages may be used for manual updating if the parameter manual_update.select_mode set to "conf".













    9. Log file settings
      Parameter nameDefault valueManualAutoUse
      log.path /var/log/mlupdater.log No Yes Specifies the filename of the log file with an absolute path name.
      log.rotate_enable yes No Yes Specifies whether or not to enable the log file rotation (replacement) function.
      "yes" or "no" can be specified.
      log.rotate_size 32 No Yes Specifies the file size in KB for log rotation.
      log.rotate_count 16 No Yes Specifies the number of saved log files for log rotation.
      Previous log files are saved with the file name ".n" [n=1,2,3,...]as specified in log.path.
      log.compress_enable yes No Yes Specifies whether or not to compress previous log files at its rotation. The files are compressed in gzip format, and can be extracted with commands such as zcat.

    10. Parameter server settings
      * This function has not been implemented yet.
      Parameter nameDefault valueManualAutoUse
      param.priority remote Yes Yes Obtain the mlupdater.conf settings from mlprmsrv instead of the local mlupdater.conf. In this case, the hostname "mlprmsrv" must be resolved. "remote" (obtain from mlprmsrv) or "local" (use the local file) can be specified.

  10. Notes

    See the following notes:

    1. Some problems may occur at the resolution of dependencies.

      Depending on your system environment, package dependency resolution may fail. When it fails, the package download can be carried out normally, but updating fails. As the downloaded files are saved, please update manually with rpm commands.
      * When using the php-oracle package in MIRACLE LINUX V2.1.

    2. About kernel updates

      The kernel is always installed in install mode, but in some cases, new entries are not added to /etc/lilo.conf. Please check /etc/lilo.conf, and if required, edit the file manually and run the lilo command.
      * When using MIRACLE LINUX V2.1.

    3. About updates related to service

      For the use of automatic updates, it may be advisable to avoid automatic updates for packages related to the services it provides. Some packages require data migration.




  11. mlupdater FAQ


      Q1. Unable to use mlupdater due to the error "License expired".
      A. Initial 90-day term for mlupdater is calculated from the date when the OS was installed.
      When the hardware clock is adjusted after the installation, the starting date of the calculation goes wrong. If you need to adjust the hardware clock, please carry out before installing the OS.

      Q2. What is the difference between the automatic and manual updaters?
      A. The automatic updater is executed based on mlupdater.conf.
      The manual updater runs interactively at the terminal.

      Q3. Which package contains mlupdater?
      A. mlupd-XXX.rpm.

      Q4. Where are the automatic/manual updater log files?
      A. Automatic updater (mlupdaterd) to /var/log/mlupdater.log
      Manual updater (mlupdater) to /tmp/mlupd.log

      Q5. Where is the configuration file?
      A. /etc/mlupdater/mlupdater.conf.

      Q6. Where is the license password installed?
      A. It is entered under "licpw.entry=" in mlupdater.conf.

      Q7. How do I start mlupdater?
      A. Run /usr/sbin/mlupdater at the terminal (Console or a virtual console).

      Q8. Can it be used when not running under X?
      A. It can also be used from a virtual console. Consequently, it can also be used via ssh.

      Q9. Where can I get mlupdater?
      A. It is included on the bundled Develper CD-ROM, and the latest version of the mlupdater program is available at the following URL:
      http://www.miraclelinux.com/update/linux/list.php?package_name=mlupd

      Q10. Can mlupdater be updated with mlupdater?
      A. Yes.

      Q11. What is the relationship between the license server and the distribution server?
      A. There is no dependency between the license server and the distribution server.
      Either or both functions can run on a single machine.
      For more details, see the license server and distribution server sections of this guide.

      Q12. How to extend the expiration date of the license password?
      A. To extend the license password term when you renew the contract, apply for a new license password and enter it under "licpw.entry=" in mlupdater.conf.



      Q13. Can I receive the automatic updater results via email?
      A. By setting in mlupdater.conf, the results can be sent via email .

      Q14. What if an mlupdater error occurs?
      A. See the troubleshooting section.
      Deal with the error after checking the appropriate log contents.
      Refer to /var/log/mlupdater.log for Automatic updater.
      Refer to /tmp/mlupd.log for manual updater.

      We recommend you to use the latest mlupdater, check if there is any update for mlupd-XXX.rpm in the distribution server

      Q15. MIRACLE LINUX is not connected to the Internet due to security restrictions. Can I use mlupdater to carry out updates?
      A. Yes, updates can be performed by using a manual distribution server.

      Q16. Can clients of multiple versions and architectures use a single delegate server?
      A. Yes, this is possible by using a delegate server and manual distribution server at the same time.

      Q17. After running mlupdater, the machine will not start after rebooting.
      A. "mlupdater" may have updated the kernel package.
      Select the old kernel with the boot loader (e.g. grub/lilo) when boot up.


  12. APPENDIX

      Special hostnames used by the updater

      HostnameServices usedUse
      mlpkgsrvmlupdaterd, httpdThe default hostname for the distribution server.
      mllicsrvmllmdThe default hostname for the license server.
      mlprmsrv--The default hostname for the parameter server.
      * Function not currently provided.

July 14, 2006 Added manual_update.select_mode and modified few parameters default values in Automatic update settings
April 14, 2006 Added mlupdater FAQ
April 10, 2006 Manual updater troubleshooting addition
March 29, 2006 Revised distribution server usage method and manual updater operation
January 31, 2005 Addition regarding http.timeout
October 07, 2003 Initial version

Copyright 2002-2006, MIRACLE LINUX CORPORATION ALL Rights Reserved.