一、源、软件包

1.1 仓库地址

阿里源仓库:http://mirrors.aliyun.com (全)

163源仓库:http://mirrors.163.com/.help

清华源仓库:https://mirror.tuna.tsinghua.edu.cn/help/AOSP/

中科大源仓库:https://mirrors.ustc.edu.cn/help/ (全)

1.2 方法

1 centos
cd /etc/yum.repos.d
# 安装base reop源
sudo mv CentOS-Base.repo CentOS-Base.repo.bak
sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# 安装epel repo源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

# 清理缓存
yum clean all
# 重新生成缓存
yum makecache
2 ubuntu
# 首先将配置文件备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
# 获取阿里源文件
wget -O /etc/apt/sources.list 
# 更新源列表
sudo apt-get update
# 更新软件
sudo apt-get upgrade http://mirrors.aliyun.com/repo/ubuntu1204-lts.list
3 debian
4 docker

https://mirror.tuna.tsinghua.edu.cn/help/docker-ce/

5 flutter

https://mirror.tuna.tsinghua.edu.cn/help/flutter/

6 gitlab

https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/

7 mysql

https://mirror.tuna.tsinghua.edu.cn/help/mysql/

二、镜像仓库

docker

ubuntu,debian

/etc/default/docker
DOCKER_OPTS="--registry-mirror=https://docker.mirrors.ustc.edu.cn/"

centos

/etc/docker/daemon.json 
{
  "registry-mirrors": [
  	"https://docker.mirrors.ustc.edu.cn/",
  	"http://registry.docker-cn.com",
  	"http://f1361db2.m.daocloud.io",
  	"http://hub-mirror.c.163.com"
  ]
}

maven

https://developer.aliyun.com/mirror/maven?spm=a2c6h.13651102.0.0.3e221b11py9VR9

composer

composer config -g repos.packagist composer https://mirrors.tuna.tsinghua.edu.cn/packagist/index

npm

https://developer.aliyun.com/mirror/NPM?from=tnpm

三 update vs upgrade

yum update:升级所有包同时也升级软件和系统内核
yum upgrade:只升级所有包,不升级软件和系统内核
注意生产环境对软件版本和内核版本要求非常精确,别没事有事随便的进行yum update操作!!!!!

GitHub 加速计划 / li / linux-dash
9
1
下载
A beautiful web dashboard for Linux
最近提交(Master分支:7 个月前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐