阿里云作为yum源操作
阿里云提供的yum镜像地址为:https://opsx.alibaba.com/mirror
找到自己的使用系统,点击帮助,可以查看更换说明
替换centOS的yum源,如下图
具体操作:
CentOS
、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS
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
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
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
、之后运行yum makecache生成缓存
相关链接
官方主页: http://www.centos.org/
邮件列表: http://www.centos.org/modules/tinycontent/index.php?id=16
论坛: http://www.centos.org/modules/newbb/
文档: http://www.centos.org/docs/
Wiki: http://wiki.centos.org/
替换fedora的yum源
具体操作,如下:
配置方法
、备份
mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.backup
mv /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo.backup
、下载新的fedora.repo和fedora-updates.repo 到/etc/yum.repos.d/
fedora
wget -O /etc/yum.repos.d/fedora.repo http://mirrors.aliyun.com/repo/fedora.repo
或者
curl -o /etc/yum.repos.d/fedora.repo http://mirrors.aliyun.com/repo/fedora.repo
fedora updates
wget -O /etc/yum.repos.d/fedora-updates.repo http://mirrors.aliyun.com/repo/fedora-updates.repo
或者
curl -o /etc/yum.repos.d/fedora-updates.repo http://mirrors.aliyun.com/repo/fedora-updates.repo
、之后运行sudo yum makecache生成缓存
相关链接
官方主页: http://fedoraproject.org/
邮件列表: http://fedoraproject.org/wiki/Communicate
论坛: http://forums.fedoraforum.org/
文档: http://docs.fedoraproject.org/
Wiki: http://fedoraproject.org/wiki/
镜像列表: http://mirrors.fedoraproject.org/publiclist
替换ubunt的yum源:
具体操作:
ubuntu
域名说明
对于阿里云ECS用户,可以直接使用内部域名访问,而对于非云用户则需要使用公网域名 mirrors.aliyun.com 来访问。
图形界面配置
新手推荐使用图形界面配置: 系统设置 -> 软件和更新 选择下载服务器 -> "mirrors.aliyun.com"
手动更改
用你熟悉的编辑器打开:
/etc/apt/sources.list 替换默认的
http://archive.ubuntu.com/ 为
mirrors.aliyun.com 以Ubuntu 14.04. LTS为例,最后的效果如下:
deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse ## Not recommended
# deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
ubuntu 16.04 配置如下
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
ubuntu 18.04(bionic) 配置如下
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
参考链接
官方主页: http://www.ubuntu.com/
邮件列表: http://www.ubuntu.com/support/community/mailinglists
论坛: http://ubuntuforums.org/
中文论坛: http://forum.ubuntu.org.cn/
Wiki: https://wiki.ubuntu.com/
帮助: https://help.ubuntu.com/
同样的道理,替换其他系统yum源(阿里作为yum源的操作)
阿里云作为yum源操作的更多相关文章
- 更改yum网易 阿里云的yum源。
一,鉴于用国外的Yum源,速度比较慢,所以想到将国外的yum源,改为国内的Yum源,著名的有网易 阿里云源.如何更改呢? 二,更改yum源为网易的. 首先备份/etc/yum.repos.d/Cent ...
- CemtOS7更改yum网易 阿里云的yum源。
一,鉴于用国外的Yum源,速度比较慢,所以想到将国外的yum源,改为国内的Yum源,著名的有网易 阿里云源.如何更改呢? 二,更改yum源为网易的. 首先备份/etc/yum.repos.d/Cent ...
- 更改yum网易、阿里云的yum源
更改yum源为网易的. 首先备份/etc/yum.repos.d/CentOS-Base.repomv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos ...
- CentOS7用阿里云Docker Yum源在线安装Docker 17.03.2
参考文档 安装步骤 删除已安装的Docker 配置阿里云Docker Yum源 安装指定版本 启动Docker服务 参考文档 官方Docker安装文档:https://docs.docker. ...
- CentOS7用阿里云Docker Yum源在线安装Docker
一.参考文档 官方Docker安装文档:https://docs.docker.com/install/linux/docker-ce/centos 阿里云Docker安装文档:https://yq. ...
- CentOS 7 配置阿里云本地yum源
删除原有的yum源: rm -f /etc/yum.repos.d/* 重新下载阿里云的yum源: wget -O /etc/yum.repos.d/CentOS-Base.repo http://m ...
- 如何在 Centos7 中使用阿里云的yum源
如何在 Centos7 中使用阿里云的yum源 1. 备份原来的yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Ba ...
- centos配置ADSL拨号 配置阿里云的yum源
如果系统yum源有问题可以更改yum源配置阿里云的yum源1)下载repo文件 wget http://mirrors.aliyun.com/repo/Centos-7.repo(没有 wget命令可 ...
- CentOS7使用阿里云的yum源
替换成阿里云的yum源速度更快一些,替换很简单,简单记录一下步骤 1.备份原来的yum源 sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repo ...
随机推荐
- Linux中如何通过设备号找到设备
关于Linux中的设备文件,设备文件用来为操作系统和用户提供它们代表的设备接口.所有的Linux设备文件均位于/dev目录下,是根(/)文件系统的一个组成部分,因为这些设备文件在操作系统启动过程中必须 ...
- ECS服务器搭建Discuz 邮箱设置,报错处理
背景 自己想做个网站,没那么多精力,然后就看到了discuz.万网买了一个月的ecs Windows server 2008 r2 服务器,就开始着手安装环境.论坛! 建站 第一次使用discuz论坛 ...
- shell编程-语句(八)
if else判断语句 if语句 语法格式1: if 条件 then 语句1 语句2 ... 语句n fi 语法格式2: 常用于终端命令提示符中 if [条件]:then 语句:fi if else语 ...
- SQL WHERE 子句
WHERE 子句 如需有条件地从表中选取数据,可将 WHERE 子句添加到 SELECT 语句. 语法 SELECT 列名称 FROM 表名称 WHERE 列 运算符 值 释意:选取 [列] 来自 [ ...
- java 根据实体对象生成 增删改的SQL语句 ModelToSQL
package com.xxx.utils; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import jav ...
- Linux CFS调度器之负荷权重load_weight--Linux进程的管理与调度(二十五)
1. 负荷权重 1.1 负荷权重结构struct load_weight 负荷权重用struct load_weight数据结构来表示, 保存着进程权重值weight.其定义在/include/lin ...
- Windows Server 2016-Windows Server Backup功能
一.Windows Server Backup 介绍: Windows Server Backup 是一种功能,它提供了一组向导和其他工具,大概从WinSer2008开始Win Ser Backup引 ...
- MySQL 数据库 简单操作命令 (部分总结)
1.查看进程方式查看数据库 ps - ajx|grep mysql 2.登录 MySQL mysql -u用户名 -p密码 3.开启服务 sudo service mysql start 4.停止服务 ...
- 排序算法之希尔排序的思想以及Java实现
1 基本思想 shell排序又称之为缩小增量排序,基本思想是,先将待排序序列分割成若干个特殊的子表,分别进行插入排序,当整个表中元素"基本有序"时,再对全体记录进行一次直接插入排序 ...
- Lingo求解线性规划案例4——下料问题
凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 造纸厂接到定单,所需卷纸的宽度和长度如表 卷纸的宽度 长度 5 7 9 10000 30000 20000 工 ...