[CONTENT] SUSE Repository Mirroring Tool (RMT) mirror schedule configuration

Content One: Configure the mirror schedule

1.1 Modify /etc/systemd/system/multi-user.target.wants/rmt-server-sync.timer file

# vi /etc/systemd/system/multi-user.target.wants/rmt-server-sync.timer

Modify all content as follows:

[Unit]
Description=RMT Sync timer

[Timer]
OnCalendar=*-*-01 01:00:00
RandomizedDelaySec=9h
Unit=rmt-server-sync.service

[Install]
WantedBy=multi-user.target

(Note: here is an example with setting the mirror schedule to the 1st of every month)

1.2 Apply the settings to make them take effect

# systemctl restart rmt-server-sync.timer
# systemctl restart rmt-server-mirror.timer

Content Two: Disable the mirror schedule

2.1 Disable the mirror schedule

# systemctl disable --now rmt-server-sync.timer
# systemctl disable --now rmt-server-mirror.timer
# systemctl daemon-reload

2.2 Manual Mirror

# rmt-cli sync
# rmt-cli mirror

Or:

# rmt-cli sync ; rmt-cli mirror

[DEBUG] SUSE Repository Mirroring Tool (RMT) resolve client use SUSEConnect command output ‘Error: Registration server returned ‘Internal Server Error’ (500)’ or ‘SUSEConnect error: trying to send a keepalive from a system not yet registered. Register this system first’

Error Reporting Command

# SUSEConnect --url

or:

# SUSEConnect --de-register

Error Code

Error: Registration server returned 'Internal Server Error' (500)

or:

SUSEConnect error: trying to send a keepalive from a system not yet registered. Register this system first

Solution 1: Make sure the /tmp directory has enough space

Step One: Make sure the /tmp directory has enough space

# df -h

At this point, ensure that the directory occupancy is not 100% based on the output content.

Step Two: Restart rmt-server

# systemctl restart rmt-server

Solution 2: Change the cache directory

Step One: Make new cache directory

# mkdir /var/rmttmp

(Note: here is an example with making the new cache directory named /var/rmttmp)

Step Two: Change the owner of the new cache directory

# chown -R _rmt:nginx /var/rmttmp

(Note: here is an example with changing the owner of directory named /var/rmttmp)

Step Three: Change the

# systemctl edit rmt-server-mirror.service

Change partial content as follow:

[Service]
Environment=
Environment="LOG_TO_JOURNALD=1" "LANG=en" "TMPDIR=/var/rmttmp/"

(Note: here is an example with setting the new cache directory to /var/rmttmp/)

Step Four: Restart rmt-server-mirror.service

# systemctl daemon-reload
# systemctl restart rmt-server-mirror.service

Reference

https://support.scc.suse.com/s/kb/RMT-mirroring-fails-when-tmp-runs-out-of-disk-space?language=en_US

[内容] SUSE Repository Mirroring Tool (RMT) 服务端的设置 (软件源) (自定义软件源版)

正文:

内容一:显示自定义软件源

# rmt-cli repos custom list

内容二:启用自定义软件源

# rmt-cli repos custom add <URL> <Customize Name>

内容三:删除自定义软件源

# rmt-cli repos custom remove <Customize Name>

参考文献:

https://documentation.suse.com/sles/15-SP4/single-html/SLES-rmt/index.html#sec-rmt-tools-rmt-cli

[步骤] SLES 软件库的启用和禁用

注意:

在启用或禁用 SLES 的软件库前,要先注册此 SLES

正文:

步骤一:显示所有可用软件库

# SUSEConnect --list-extensions

步骤二:启用软件库

# SUSEConnect -p sle-module-live-patching/15.3/x86_64

(补充:这里以启用 sle-module-live-patching/15.3/x86_64 软件库为例)

步骤三:禁用软件库

# SUSEConnect -d -p sle-module-basesystem/15.3/x86_64

(补充:这里以禁用用 sle-module-live-patching/15.3/x86_64 软件库为例)

[内容] SUSE Repository Mirroring Tool (RMT) 服务端的设置 (软件源) (SUSE 官方软件源版)

正文:

内容一:显示 SUSE 官方软件源

1.1 显示所有的 SUSE 官方软件源

# rmt-cli products list --all

1.2 显示所有已经启用的 SUSE 官方软件源

# rmt-cli products list

1.3 显示所有指定版本且指定架构的 SUSE 官方软件源

# rmt-cli products list --all --version=15.4 --arch=x86_64

(补充:这里以显示所有 15.4 版本且 x86_64 架构的 SUSE 软件源为例)

1.4 显示所有已启用指定版本且指定架构的 SUSE 软件源

# rmt-cli products list --version=15.4 --arch=x86_64

(补充:这里以显示所有已其应用 15.4 版本且 x86_64 架构的 SUSE 软件源为例)

内容二:启用 SUSE 官方软件源

2.1 启用某个 SUSE 官方软件源

# rmt-cli products enable <id>

或者:

# rmt-cli products enable <string>

2.2 开启所有指定版本且指定架构的 SUSE 官方软件源

# for i in `rmt-cli products list --all --version=15.4 --arch=x86_64 | awk '{print $2}' | egrep -v '\||ID|^$'`;do rmt-cli products enable $i;done

(补充:这里以开启所有 15.4 版本且 x86_64 架构的 SUSE 软件源)

内容三:取消启用 SUSE 官方软件源

3.1 取消启用某个 SUSE 官方软件源

# rmt-cli products disable <id>

或者:

# rmt-cli products disable <string>

3.2 取消所有指定版本且指定架构的 SUSE 官方软件源

# for i in `rmt-cli products list --all --version=15.4 --arch=x86_64 | awk '{print $2}' | egrep -v '\||ID|^$'`;do rmt-cli products disable $i;done

(补充:这里以取消开启所有 15.4 版本且 x86_64 架构的 SUSE 官方软件源)

参考文献:

https://documentation.suse.com/sles/15-SP4/single-html/SLES-rmt/index.html#sec-rmt-tools-rmt-cli