概述 当 OCI-Start 项目的自动救援功能成功执行后,需要对被救援的实例进行系统初始化操作。本文档提供了一套完整的初始化脚本和操作流程,确保救援后的系统能够正常运行并保持最新状态。 使用说明 救援成功后,登录到被救援的实例,然后直接粘贴以下脚本并按回车执行。该脚本设计为一键执行,无需任何预配置或依赖安装。 初始化脚本
bash << 'EOF'
export DEBIAN_FRONTEND=noninteractive
export NEEDRESTART_MODE=a
export NEEDRESTART_SUSPEND=1
apt upgrade -y && apt full-upgrade -y && apt --purge autoremove -y &&
echo 'deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free' > /etc/apt/sources.list &&
apt update && apt upgrade --without-new-pkgs -y && apt full-upgrade -y && apt update &&
apt install lsb-release sudo wget curl -y &&
wget -O upgrade_and_init.sh https://raw.githubusercontent.com/doubleDimple/shell-tools/master/upgrade_and_init.sh &&
chmod +x upgrade_and_init.sh &&
./upgrade_and_init.sh
EOF
复制直接粘贴即可
本文作者:doubleDimple
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!