Centos-7修改yum源为国内的yum源

阅读数:290 评论数:0

跳转到新版页面

分类

Linux

正文

以centos7为例 ,以 修改为阿里的yum源

1. 备份本地yum源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak 

2.获取阿里yum源配置文件

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 

#如果wget不可用,可使用
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 

中标麒麟V7

sed -i  's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo

3.更新cache

 yum makecache

4.查看

 yum -y update 



相关推荐

一、概述 yum是yellow dog updater,modified的简称,是rpm软件包管理器,用python写成,可以安装、移除、升级rpm包,检查并自动解决依赖性。 yum使用的软件仓库除了

1,CentOS默认源里没有ntfs3g,想要添加ntfs支持,需要自己下载编译安装或者加源yum安装。我这里使用的是添加aliyun的epel源来yum安装的方式。 2,添加ep

一、概述 Yum全称为Yellowdog Updater,Modified,是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器。 它基于rpm包管理,能够从指定的服务器自

# download source code from http://www.mplayerhq.hu/design7/dload.html & extract wget -cS http://www

一、基本格式 yum [option] [查询工作项目] [相关参数] #其中~代表软件包 #安装软件: yum install ~ #删除软件: yum remove ~ # 安装本地rpm

一、概述 1、locale中语言环境变量LANG 在Linux中通过locale来设置程序运行的不同语言环境,locale由ANSI C提供支持。locale的命名规则为<语言>_<地区>.<字符集编

一、概述 Centos7 默认使用的是firewall作为防墙。 1.firewalld (防火墙服务) #启动: systemctl start firewalld #关闭: systemctl

[root@VM_167_46_centos etc]# free -h total used free shared buff/cache available Mem: 993M 253M 334

1. 进入目录 cd /etc/sysconfig/network-scripts/ <p

对于 CentOS 7,有 KDE Plasma Workspaces 和 Gnome Desktop 两大桌面环境。 要安装 KDE 桌面环境(使用的是 Plasma 作为默认的