centos 7 初始化脚本 常用服务
作者:
大罗马的太阳 | 来源:发表于
2017-01-02 21:37 被阅读244次yum -y install wget
mv -f /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache
yum update -y
yum -y install git zsh nano
#安装oh-my-zsh
curl -L http://install.ohmyz.sh | sh
#安装docker
curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -
#设置docker registry 镜像
sudo cp -n /lib/systemd/system/docker.service /etc/systemd/system/docker.service
sudo sed -i "s|ExecStart=/usr/bin/dockerd|ExecStart=/usr/bin/dockerd --registry-mirror=https://1234abcd.mirror.aliyuncs.com|g" /etc/systemd/system/docker.service
#设置docker 自启动服务
systemctl enable docker.service
systemctl daemon-reload
systemctl restart docker.service
#验证docker
docker run --rm hello-world
本文标题:centos 7 初始化脚本 常用服务
本文链接:https://www.haomeiwen.com/subject/rmqgvttx.html
网友评论