[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

[步骤] dnsmasq 的搭建 (DNS 服务)

步骤一:安装 dnsmasq

# yum install dnsmasq

步骤二:添加 DNS 配置

# vi /etc/dnsmasq.d/address.conf

创建以下内容:

all-servers
server=1.1.1.1
server=8.8.8.8

server=/cn/114.114.114.114

address=/test-gateway.com/192.168.100.1

host-record=gateway.com,192.168.100.1

(
补充:
1) 这里的 all-servers 代表同时解析下面所有的 DNS 记录
2) 这里的 server=1.1.1.1 和 server=8.8.8.8 代表上游 DNS 服务器使用 1.1.1.1 和 8.8.8.8
3) 这里的 server=/cn/114.114.114.114 代表以 cn 结尾的域名上游 DNS 使用 114.114.114.114
4) 这里的 address=/test-gateway.com/192.168.100.1 代表所有以 test-gateway.com 结尾的域名 (例如 one.test-gateway.com) 指向 IP 地址 192.168.100.1
5) 这里的 host-record=gateway.com,192.168.100.1 代表 gateway.com 域名指向 IP 地址 192.168.100.1
)

步骤三:重启 dnsmasq 服务

3.1 重启 dnsmasq 服务

# systemctl restart dnsmasq.service 

3.2 查看 dnsmasq 服务状态

# systemctl status dnsmasq.service
● dnsmasq.service - DNS caching server.
   Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2025-08-14 00:00:35 CST; 7s ago
 Main PID: 10412 (dnsmasq)
    Tasks: 1 (limit: 5781)
   Memory: 704.0K
   CGroup: /system.slice/dnsmasq.service
           └─10412 /usr/sbin/dnsmasq -k

Aug 14 00:00:35 tool1 dnsmasq[10412]: compile time options: IPv6 GNU-getopt DBus no-i18n IDN2 DHCP>
Aug 14 00:00:35 tool1 dnsmasq[10412]: using nameserver 114.114.114.114#53 for domain cn
Aug 14 00:00:35 tool1 dnsmasq[10412]: using nameserver 8.8.8.8#53
Aug 14 00:00:35 tool1 dnsmasq[10412]: using nameserver 1.1.1.1#53
Aug 14 00:00:35 tool1 dnsmasq[10412]: reading /etc/resolv.conf
Aug 14 00:00:35 tool1 dnsmasq[10412]: using nameserver 114.114.114.114#53 for domain cn
Aug 14 00:00:35 tool1 dnsmasq[10412]: using nameserver 8.8.8.8#53
Aug 14 00:00:35 tool1 dnsmasq[10412]: using nameserver 1.1.1.1#53
Aug 14 00:00:35 tool1 dnsmasq[10412]: ignoring nameserver 192.168.100.11 - local interface
Aug 14 00:00:35 tool1 dnsmasq[10412]: read /etc/hosts - 2 addresses 

步骤四:使用配置好的 dnsmasq 服务

# vi /etc/resolv.conf

将全部内容修改如下:

nameserver 192.168.100.11

(补充:这里的 192.168.100.11 指的是刚刚搭建 dnsmasq 服务的服务器的 IP 地址)

步骤五:测试 dnsmasq 服务

5.1 测试 DNS 正向解析

# nslookup test-gateway.com
Server:		192.168.100.11
Address:	192.168.100.11#53

Name:	test-gateway.com
Address: 192.168.100.1

(补充:这里以正向解析刚刚配置的域名 test-gateway.com 为例)

5.2 测试 DNS 反向解析

# arp 192.168.100.1
Address                  HWtype  HWaddress           Flags Mask            Iface
_gateway                 ether   52:54:00:ef:3a:4d   C                     eth0

(补充:这里以反向解析刚刚配置的 IP 地址 192.168.100.1 为例)