31 lines
1.3 KiB
Bash
31 lines
1.3 KiB
Bash
|
|
|
|
|
|
|
|
yum remove docker net-tools iputils bind-utils lsof curl wget vim mtr htop
|
|
|
|
mv octopus-agent_linux_arm64 /usr/local/bin/octopus-agent
|
|
chmod +x /usr/local/bin/octopus-agent
|
|
|
|
host_list=(172.31.2.7 172.31.2.8 172.31.2.9)
|
|
|
|
host_list=(172.31.2.8 172.31.2.9)
|
|
for server in "${host_list[@]}";do
|
|
echo "current ip is $server"
|
|
# ssh root@${server} "printf 'firewall\n' | octopus-agent --mode=bastion"
|
|
# ssh root@${server} "printf 'sysconfig\n' | octopus-agent --mode=bastion"
|
|
# ssh root@${server} "printf 'swap\n' | octopus-agent --mode=bastion"
|
|
# ssh root@${server} "printf 'selinux\n' | octopus-agent --mode=bastion"
|
|
# ssh root@${server} "printf 'sshkey\n' | octopus-agent --mode=bastion"
|
|
# ssh root@${server} "printf 'docker\n' | octopus-agent --mode=bastion"
|
|
#ssh root@${server} "mkdir /root/wdd"
|
|
# scp /root/wdd/disk.sh root@${server}:/root/wdd/
|
|
# ssh root@${server} "bash /root/wdd/disk.sh && lsblk"
|
|
# ssh root@${server} "yum install -y rpcbind net-tools iputils bind-utils lsof curl wget vim mtr htop docker docker-compose"
|
|
scp /etc/docker/daemon.json root@${server}:/etc/docker/
|
|
ssh root@${server} "systemctl restart docker && sleep 3 && docker info"
|
|
done
|
|
|
|
docker container stop $(docker ps -qa)
|
|
printf "y/n" | docker container prune
|
|
docker image rmi $(docker image ls -qa) --force |