Centos
CentOS1、备份mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/CentOS 5wget -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.repoCentOS 6wget -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.repoCentOS 7wget -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.repo3、之后运行yum makecache生成缓存
PYPI
[[email protected] second]# mkdir -p ~/.pip[[email protected] 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 Accelerator
Installation acceleration
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/dockersudo tee /etc/docker/daemon.json <<-‘EOF‘{ "registry-mirrors": ["https://okjbj3m0.mirror.aliyuncs.com"]}EOFsudo systemctl daemon-reloadsudo systemctl restart docker
Common use of Linux accelerators