步骤一:确认目前正在使用的解释器是 /bin/bash
# echo $SHELL
/bin/bash
步骤二:设置多久以后会自动退出
# export TMOUT=30
(补充:这里以设置 30 秒后会自动退出为例)
# echo $SHELL
/bin/bash
# export TMOUT=30
(补充:这里以设置 30 秒后会自动退出为例)
# satellite-maintain service stop
(补充:这里以备份虚拟环境下的 Red Hat Satellite 为例)
# poweroff
(步骤略)
(步骤略)
# satellite-maintain upgrade list-versions
# satellite-maintain upgrade check --target-version 6.10.z
(注意:如果是升级 Red Hat Satellite 的话就指定最新的版本,如果是给 Red Hat Satellite 打补丁的话就选择当前的版本)
(补充:这里以指定 6.10.z 版本的 Red Hat Satellite 为例)
# satellite-maintain upgrade run --target-version 6.10.z
(
注意:
1) 只有当预检测升级 Red Hat Satellite 或给 Red Hat Satellite 打补丁成功后才能接着执行此步骤
2) 如果是升级 Red Hat Satellite 的话就指定最新的版本,如果是给 Red Hat Satellite 打补丁的话就选择当前的版本
)
(补充:这里以指定 6.10.z 版本的 Red Hat Satellite 为例)
# satellite-maintain service stop
# reboot
# service iptables save
# iptables-save > /root/iptables_save
(补充:这里以将 iptables 防火墙规则导出到 /root/iptables_save 文件为例)
# vim /etc/systemd/system/iptables_save.service
创建以下内容:
[Unit]
Description=iptables_save
After=default.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/iptables-restore < /root/iptables_save
[Install]
WantedBy=default.target
(补充:这里以创建 systemctl 管理文件 /etc/systemd/system/iptables_save.service 将 /root/iptables_save 文件里的内容导入到 iptables 防火墙为例)
# systemctl daemon-reload
# chmod u+x /etc/systemd/system/iptables_save.service
(补充:这里以给 systemctl 管理文件 /etc/systemd/system/iptables_save.service 添加执行权限为例)
# systemctl enable iptables_save.service
(补充:这里以开机自启 iptables_save.service 服务为例)
# iptables-save > /root/iptables_save
(补充:这里以将 iptables 防火墙规则导出到 /root/iptables_save 文件为例)
# iptables-restore < /root/iptables_save
(补充:这里以将 /root/iptables_save 文件里的内容导入到 iptables 防火墙为例)
# snmpwalk -v3 -u siemens -l authNoPriv -a MD5 -x DES -A '<user>' -X '<password>' localhost