[转帖]yum与apt-get的区别以及两者更新源(阿里/网易【163】)
yum与apt-get的区别以及两者更新源(阿里/网易【163】)
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/one_super_dreamer/article/details/78485187 学习一下 感觉挺好的.
一般来说著名的linux系统基本上分两大类:
1.RedHat系列:Redhat、Centos、Fedora等
2.Debian系列:Debian、Ubuntu等
RedHat 系列
1 常见的安装包格式 rpm包,安装rpm包的命令是“rpm -参数”
2 包管理工具 yum
3 支持tar包
Debian系列
1 常见的安装包格式 deb包,安装deb包的命令是“dpkg -参数”
2 包管理工具 apt-get
3 支持tar包
apt-get更新源
在使用apt-get update的时候,出现如下错误时:
E: Some index files failed to download, they havebeen ignored, or old ones used instead.
可以将目录下/var/lib/apt/lists/partial/所有的文件清掉,再次运行apt-get update即可!
1、复制原文件备份
sudo cp /etc/apt/source.list /etc/apt/source.list.bak
2、编辑源列表文件
sudo vim /etc/apt/source.list
3、将原来的列表删除,添加如下内容
阿里
deb http://mirrors.aliyun.com/ubuntu/ vivid mainrestricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universemultiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universemultiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universemultiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universemultiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid main restricted universemultiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-security main restricteduniverse multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricteduniverse multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricteduniverse multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricteduniverse multiverse
网易
deb http://mirrors.163.com/ubuntu/lucid main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/lucid main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/lucid-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/lucid-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/lucid-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/lucid-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/lucid-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/lucid-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/lucid-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/lucid-updates universe main multiverse restricted
4、运行sudo apt-get update
5、运行sudo apt-get upgrade
yum更新源
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
CentOS 6
wget -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
3、之后运行yum makecache生成缓存
[转帖]yum与apt-get的区别以及两者更新源(阿里/网易【163】)的更多相关文章
- 替换CENTOS自带的yum源为网易163镜像源
首先确保你的系统是centos5或者centos6 先备份你系统自带的repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/Cent ...
- CentOS 7 更新源 – 使用国内 163 yum 源
突然想起试试 Docker,在一台计算机上安装了 CentOS 7,准备开工,突然想起还需要做一件事情,更改源,不然安装肯定会很慢,网上搜索了一下,文章很多,但是会出一些问题,所以将自己的成功的日志写 ...
- CentOS修改yum更新源
1. 在修改前先备份该文件 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 2. 修改更新源配置文 ...
- Redis系列二(yum切换为网易163)
这个可能和Redis没有直接的关系... 是我在yum install的时候发现centos的yum实在是太慢,上网查了下.网易163有个yum镜像,为了让CentOS6使用速度更快的YUM更新源,可 ...
- Linux中yum和apt-get用法及区别
Linux中yum和apt-get用法及区别 一般来说著名的linux系统基本上分两大类: 1.RedHat系列:Redhat.Centos.Fedora等 2.Debian系列:Debi ...
- yum和apt-get有什么区别
一般来说著名的linux系统基本上分两大类: 1.RedHat系列:Redhat.Centos.Fedora等 2.Debian系列:Debian.Ubuntu等 RedHat 系列 1 常见的安装包 ...
- yum或apt基本源设置指南
关于: 管理Linux服务器的运维或开发人员经常需要安装软件,最常用方式应该是通过Linux系统提供的包管理工具来在线安装,比如centos的yum,ubuntu或debian的apt-get.当然这 ...
- [Linux] yum和apt-get用法及区别
一般来说著名的linux系统基本上分两大类: 1.RedHat系列:Redhat.Centos.Fedora等 2.Debian系列:Debian.Ubuntu等 RedHat 系列 1 常见的安装包 ...
- Linux RPM、YUM、APT包管理工具
⒈rpm包的管理 1)介绍 rpm是一种用于互联网下载包的打包及安装工具,它包含在某些Linux分发版中,它生成具有.RPM扩展名的文件,RPM是RedHat Package Manager(RedH ...
随机推荐
- FtpHelper.cs
网上找了好多,感觉还是自己这个使用起来方便点,记录一下! using System; using System.Collections; using System.IO; using System.L ...
- 两种dp模型
两个常见模型 bzoj 4321 题意:编号为1~n的人排成一排,问有多少种排法使得任意相邻两人的编号之差不为1或-1. n<=1000 排列计数问题:考虑把数从小到大插入的过程进行dp. 设 ...
- Python相关分析—一个金融场景的案例实操
哲学告诉我们:世界是一个普遍联系的有机整体,现象之间客观上存在着某种有机联系,一种现象的发展变化,必然受与之关联的其他现象发展变化的制约与影响,在统计学中,这种依存关系可以分为相关关系和回归函数关系两 ...
- c++中类的初次接触
下面是我写的简单的代码,初次接触c++中的类,c++真的是博大精深啊,学习c++的路还很长,加油! /*q1.cpp*/ //一个简单的类极其实例化 #include<iostream> ...
- 预处理、const、static与sizeof-#pragma pack的作用
1:有如下代码: #include <iostream.h> #pragma pack(1) struct test{ char c; short s1; short s2; int i; ...
- 预处理、const、static与sizeof-用#define实现宏并求最大值和最小值
1:实现代码: #define MAX(x,y) (((x)>(y)) ? (x):(y)) #define MIN(x,y) (((x)>(y)) ? (x):(y)) 需要注意的几点: ...
- iSCSI存储技术
iSCSI(Internet Small Computer System Interface),Internet小型计算机系统接口,又称为IP-SAN,是一种基于因特网及SCSI-3协议下的存储技术, ...
- shell远程操作另外一台机器上数据
shell远程操作另外一台机器上的数据,有两种方式: 1 .配置免密登陆,2.使用sshpass 当前存在两台虚拟机,ip地址分别为:192.168.3.32 192.168.3.33 一.免密登陆操 ...
- 性能测试 | 系统运行缓慢,CPU 100%,Full GC次数过多问题排查
处理过线上问题的同学基本上都会遇到系统突然运行缓慢,CPU 100%,以及Full GC次数过多的问题.当然,这些问题的最终导致的直观现象就是系统运行缓慢,并且有大量的报警.本文主要针对系统运行缓慢这 ...
- python 牛顿迭代法
使用牛顿迭代法求方程 在x附近的一个实根. 赋值X,即迭代初值:用初值x代入方程中计算此时的f(x)=(a * x * x * x + b * x * x + c * x + d)和f’(x)=(3 ...