環境準備
Podman Version: 4.4.4
Rancher 2.7.3
# Start Rancher
sudo podman run -d --restart=unless-stopped -p 80:80 -p 443:443 -e TZ=Asia/Taipei --privileged --name=rancher rancher/rancher:v2.7.3
# Check
sudo podman ps -a
# 將images tar 傳到Container
sudo podman cp rancher-2.7.3.tar rancher:/var/lib/rancher/
# 還原tar 成images
sudo podman exec -it rancher ctr -n k8s.io image import rancher-2.7.3.tar
# Get rancher password
sudo podman logs rancher 2>&1 | grep "Boot"Hosts
echo "
192.168.61.10 RMS
192.168.61.11 m1
192.168.61.21 w1
192.168.61.22 w2
" | sudo tee -a /etc/hostsSet ssh env
Create rancher auto-restart bash script
Create systemctl config
Last updated