云主机脚本

hello.sh

#!/bin/bash
echo "nameserver 114.114.114.114" >> /etc/resolv.conf
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io -y
mkdir -p /opt/docker/h5ai
systemctl start docker
systemctl enable docker
docker run -d -p 80:80 -v /opt/docker/h5ai:/h5ai --name h5ai  --restart=always  ilemonrain/h5ai:full
echo 123 | passwd --stdin root
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
systemctl restart sshd
bash
posted @ 2022-06-14 15:33  supermao12  阅读(62)  评论(0编辑  收藏  举报