内容暂存

客户端使用暂存来预先下载软件包,然后再安装软件包。这样就可以在做好安排后立即开始安装软件包,从而减少维护时段占用的时间。

1. 启用内容暂存

You can manage content staging across your entire organization. In the SUSE Multi-Linux Manager Web UI, navigate to Admin  Organizations to see a list of available organizations. Click the name of an organization, and check the Enable Staging Contents box to allow clients in this organization to stage package data.

您必须以 SUSE Multi-Linux Manager 管理员身份登录才能创建和管理组织。

You can also enable staging at the command prompt by editing /etc/sysconfig/rhn/up2date, and adding or editing these lines:

stagingContent=1
stagingContentWindow=24

The stagingContentWindow parameter is a time value expressed in hours and determines when downloading starts. It is the number of hours before the scheduled installation or update time. In this example, content is downloaded 24 hours before the installation time. The start time for download depends on the selected contact method for a system.

下一次安排操作后,会自动下载但不安装软件包。将在安排的时间安装暂存的软件包。

2. 配置内容暂存

有两个参数用于配置内容暂存:

  • salt_content_staging_advance is the advance time for the content staging window to open, in hours. 它是距离安装开始的小时数,经过这段时间后即可开始下载软件包。

  • salt_content_staging_window is the duration of the content staging window, in hours. 这是在安装开始之前客户端必须将软件包暂存的一段时间。

For example, if salt_content_staging_advance is set to six hours, and salt_content_staging_window is set to two hours, the staging window opens six hours before the installation time, and remain open for two hours. No packages are downloaded in the four remaining hours until installation starts.

If you set the same value for both salt_content_staging_advance and salt_content_staging_window packages are able to be downloaded until installation begins.

Configure the content staging parameters in /usr/share/rhn/config-defaults/rhn_java.conf.

默认值:

  • salt_content_staging_advance: 8 hours

  • salt_content_staging_window: 8 hours

必须启用内容暂存才能让这些参数正常工作。