Linux 操作系统修改源的方法总结【持续更新】

有时候CentOS默认的yum源不一定是国内镜像,导致yum在线安装及更新速度不是很理想。这时候需要将yum源设置为国内镜像站点。国内主要开源的开源镜像站点应该是网易和阿里云了。

一、centos系统

修改CentOS默认yum源为mirrors.163.com

1、首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo

[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、进入yum源配置文件所在的文件夹

[root@localhost ~]# cd /etc/yum.repos.d/

3、下载163的yum源配置文件到上面那个文件夹内

CentOS7

[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

4、运行yum makecache生成缓存

[root@localhost yum.repos.d]# yum makecache

5、这时候再更新系统就会看到以下mirrors.163.com信息

[root@localhost yum.repos.d]# yum -y update

已加载插件:fastestmirror, refresh-packagekit, security

设置更新进程Loading mirror speeds from cached hostfile

* base: mirrors.163.com

* extras: mirrors.163.com

* updates: mirrors.163.com

二、kali(ubuntu)系统

步骤如下:

vim  /etc/apt/sources.list
删除原来的内容
10 dd

拷贝下面内容

#163网易 Kali源
deb http://mirrors.163.com/debian wheezy main non-free contrib 
deb-src http://mirrors.163.com/debian wheezy main non-free contrib 
deb http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib 
deb-src http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib 
deb-src http://mirrors.163.com/debian-security wheezy/updates main non-free contrib 
deb http://mirrors.163.com/debian-security wheezy/updates main non-free contrib

下面执行更新操作

执行 apt-get update 命令即可更新源

执行 apt-get upgrade 更新软件

然后安装下载更新,使用如下命令

apt-get dist-upgrade

#linux内核更新
apt-get install linux-headers-$(uname -r)
 

修改kali 字体重叠

apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy

全局最大化 ---- 安装vmware-tools

三、麒麟 桌面 V10(龙芯)apt-get 源

添加apt-get 源证书

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F49EC40DDCE76770

更换 麒麟 桌面 V10(龙芯)apt-get 源

deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 main restricted universe multiverse
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1-2203-updates main restricted universe multiverse
deb http://archive2.kylinos.cn/deb/kylin/production/PART-V10-SP1/custom/partner/V10-SP1 default all

在系统的/etc/apt/sources.list文件中,根据不同版本填入以下内容

#4.0.2桌面版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2-desktop main restricted universe multiverse

#4.0.2-sp1桌面版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp1-desktop main restricted universe multiverse

#4.0.2-sp2桌面版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp2-desktop main restricted universe multiverse

#4.0.2服务器版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2-server main restricted universe multiverse

#4.0.2-sp1服务器版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp1-server main restricted universe multiverse

#4.0.2-sp2服务器版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp2-server main restricted universe multiverse

#4.0.2-sp2 FT2000+服务器版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp2-server-ft2000 main restricted universe multiverse

#4.0.2-sp3版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp3 main restricted universe multiverse

#4.0.2-sp4版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 4.0.2sp4 main restricted universe multiverse

#V10版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.0 main restricted universe multiverse

#V10.1版本:
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 main restricted universe multiverse

也可以去里面找
http://archive.kylinos.cn/kylin/KYLIN-ALL/ COPY

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

tiny丶

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值