标签: shell

运维之路

linux初部署shell脚本

#!/bin/bashcp-a/etc/apt/sources.list/etc/apt/sources.list.bak2#保存备份文件sed-i"s@http://.*archive.ubuntu.com@http://mirrors.huaweicloud.com@g"/etc/apt/sources.list#替换源sed-i"s@http://.*security.ubuntu.com@http://mirrors.huaweicloud.com@g"/etc/apt/sources.list#替换源apt-getupdate#更新源aptinstalldocker.io-y#安装dockersystemctlstartdocker#启动dockersystemctlenabledocker#开机自启动docker-v#查看docker安装是否成功sudogroupadddockersudogpasswd-a${USER}dockersudoservicedockerrestartwgethttp://slhl.shyyhy.com/daemon.jsonmvdaemon.json/etc/docker/daemon.json#更换国内源#vim/etc/docker/daemon.json#{#"registry-mirrors":

Title - Artist
0:00