标签:move 安装 备份 lob ice 使用 常用 roo emd
CentOS
1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、之后运行yum makecache生成缓存
[root@gitlab-docker second]# mkdir -p ~/.pip
[root@gitlab-docker second]# vi ~/.pip/pip.conf
[global]
index-url = https://pypi.doubanio.com/simple/
gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
gem sources -l
安装加速
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
{
"registry-mirrors": ["https://okjbj3m0.mirror.aliyuncs.com"]
}
echo "DOCKER_OPTS=--registry-mirror=https://dom4w2gh.mirror.aliyuncs.com" | tee -a /etc/default/docker
sed -i "s|ExecStart=/usr/bin/docker daemon|ExecStart=/usr/bin/docker daemon --registry-mirror=https://dom4w2gh.mirror.aliyuncs.com|g" /etc/systemd/system/docker.service
sed -i "s|ExecStart=/usr/bin/docker daemon|ExecStart=/usr/bin/docker daemon --registry-mirror=https://dom4w2gh.mirror.aliyuncs.com|g" /etc/systemd/system/multi-user.target.wants/docker.service
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-‘EOF‘
{
"registry-mirrors": ["https://okjbj3m0.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
标签:move 安装 备份 lob ice 使用 常用 roo emd
原文地址:https://www.cnblogs.com/ops-sylar/p/8861616.html