centos7手动更新源

来源:互联网 发布:小米网络收音机改软件 编辑:程序博客网 时间:2024/05/16 17:33
centos7默认最小化安装,所以很多的软件没有,然而系统自带的是国外的源,所以必须要更新国内的源,打开
http://mirrors.163.com/.help/centos.html
选择centos7,下载的文件中有如下的内容
# CentOS-Base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client.  You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead.##[base]name=CentOS-$releasever - Base - 163.com#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=osbaseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/gpgcheck=1gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7#released updates[updates]name=CentOS-$releasever - Updates - 163.com#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updatesbaseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/gpgcheck=1gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that may be useful[extras]name=CentOS-$releasever - Extras - 163.com#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extrasbaseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/gpgcheck=1gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever - Plus - 163.combaseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7



在/etc/目录下创建CentOS-Base.repo这个文件(一般都有,但是我这里不知道为什么没有了),然后把前面网站上下载的文件中的内容黏贴过来,保存

yum clean all


yum makecache

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 来月经前游泳了怎么办 快来完事游泳了怎么办 游泳时来月经了怎么办 经期第7天游泳了怎么办 来月经已经游了泳怎么办 月经来了要游泳怎么办 三个月宝宝趴着不会抬头怎么办 我的月经不完怎么办 游泳时怎么办能浮出水面 游泳时眼镜起雾怎么办 练瑜伽手臂变粗怎么办 孕妇喝了芬达怎么办 宫口开了但头高怎么办 整天坐着肚子越来越大怎么办 坐久了屁股变大怎么办 屁股久坐的黑印怎么办 练瑜伽小腿变粗怎么办 练瑜伽腿粗了怎么办 练完瑜伽腿粗怎么办 肚子大屁股大腿粗怎么办 甲状腺偏大弥漫性欠均匀怎么办 大腿后侧拉伤了怎么办 腰和臀部都疼怎么办 瑜伽后弯后腰疼怎么办? 吃了大蒜肝痛怎么办 练瑜伽前躯不行怎么办 月子里碰冷水了怎么办 月子手碰凉水了怎么办 月子里碰了冷水怎么办 顺产后下面会痛怎么办 产后肚子瘦不下来怎么办 出月子后臀部很疼怎么办 做月子时臀部疼怎么办 月子臀部大腿疼困怎么办 产后抱孩子腰疼怎么办 剖腹产后5年小肚子很大怎么办 压力大工作忙瘦了怎么办? 哺乳乳房一大一小怎么办 哺乳期乳房一大一小怎么办 上班之后奶少了怎么办 出了月子还流恶露怎么办?