码迷,mamicode.com
首页 > 系统相关 > 详细

linux常用加速器使用

时间:2018-04-17 12:00:03      阅读:434      评论:0      收藏:0      [点我收藏+]

标签:move   安装   备份   lob   ice   使用   常用   roo   emd   

Centos

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生成缓存

PYPI

[root@gitlab-docker second]# mkdir -p ~/.pip
[root@gitlab-docker second]# vi ~/.pip/pip.conf
[global]
index-url = https://pypi.doubanio.com/simple/

Ruby

gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
gem sources -l

Docker 加速器

安装加速

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
windows
{
  "registry-mirrors": ["https://okjbj3m0.mirror.aliyuncs.com"]
}
linux
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
ubuntu
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

linux常用加速器使用

标签:move   安装   备份   lob   ice   使用   常用   roo   emd   

原文地址:https://www.cnblogs.com/ops-sylar/p/8861616.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!