1. yum makecache:将服务器上的软件包信息在本地缓存,以提高 搜索安装软件的速度。
  2. yum update:更新所有的rpm
  3. yum upgrade:大规模的版本升级,与yum update不同的是,连旧的淘汰的包也升级

centos7源:

一下文件放到Centos-Base.repo当中,把原先的这个文件改个备份名不动

  1. # CentOS-Base.repo
  2. #
  3. # The mirror system uses the connecting IP address of the client and the
  4. # update status of each mirror to pick mirrors that are updated to and
  5. # geographically close to the client. You should use this for CentOS updates
  6. # unless you are manually picking other mirrors.
  7. #
  8. # If the mirrorlist= does not work for you, as a fall back you can try the
  9. # remarked out baseurl= line instead.
  10. #
  11. #
  12.  
  13. [base]
  14. name=CentOS-$releasever - Base
  15. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
  16. baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/os/$basearch/
  17. gpgcheck=1
  18. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  19.  
  20. #released updates
  21. [updates]
  22. name=CentOS-$releasever - Updates
  23. # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  24. baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/updates/$basearch/
  25. gpgcheck=1
  26. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  27.  
  28. #additional packages that may be useful
  29. [extras]
  30. name=CentOS-$releasever - Extras
  31. # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
  32. baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/extras/$basearch/
  33. gpgcheck=1
  34. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  35.  
  36. #additional packages that extend functionality of existing packages
  37. [centosplus]
  38. name=CentOS-$releasever - Plus
  39. # mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
  40. baseurl=http://mirrors.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
  41. gpgcheck=1
  42. enabled=0
  43. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

然后运行yum makecache

centos7源以及相关的一些命令的更多相关文章

  1. centos7源码编译安装lamp/lnmp

    centos7源码编译安装lamp/lnmp 进程:是包工头(相当于是个门,只管开门关门,不管门内的事儿) 线程:是各种工种(cpu调度的是线程) 进程 是一件事情, 线程 是 同一个时间范围内 同时 ...

  2. centos7源码安装mysql5.7.19

    centos7源码包安装mysql5.7 5.7.20安装方法和5.7.19的一样. 1.安装前准备 清空环境.安装相应的软件包 1>关闭防火墙和SELinux 2>配置yum源(阿里云, ...

  3. Centos7源码编译安装PHP7.2(生产环境)

    安装PHP依赖包,否则在编译的过程中可能会出现各种报错 # Centos 安装epel-release源并将系统包更新到最新版本 $ yum install epel-release-y $ yum ...

  4. 建立局域网内使用的CentOS7源

    建立局域网内使用的CentOS7源 by 无若    1. 在CentOS下建立匿名的FTP访问服务 CentOS 7下安装配置pure-ftpd,并使用匿名用户登录 Pure-FTPd是Linux上 ...

  5. centos7源码安装Python3的前提条件

    centos7源码安装Python3的前提条件: # yum -y install openssl-devel bzip2-devel expat-devel gdbm-devel readline- ...

  6. 【linux】centos7终端中文显示乱码,命令返回中文乱码

    centos7终端中文显示乱码,命令返回中文乱码 1.查看服务器编码的命令 1.1 echo $LANG 1.2 locale 1.3 查看终端xshell编码 如果以上的三点依旧保持一致,而依旧乱码 ...

  7. Linux服务器相关性能的命令

    Linux服务器相关性能的命令 一.查看服务器性能信息的相关命令 1.cpu信息查看 cpu分为物理cpu和逻辑cpu 物理cpu:实际物理服务器插槽上cpu的个数,可以通过physical id不重 ...

  8. OpenHarmony移植案例: build lite源码分析之hb命令__entry__.py

    摘要:本文介绍了build lite 轻量级编译构建系统hb命令的源码,主要分析了_\entry__.py文件. 本文分享自华为云社区<移植案例与原理 - build lite源码分析 之 hb ...

  9. centos7 yum相关的常用命令

    [root@mini1 ~]# history |grep yum 40 yum repolist 42 cd /etc/yum.repos.d/ 49 yum clean all 50 yum re ...

随机推荐

  1. docker 私有仓库镜像的存储位置

    docker 私有仓库的镜像 是存储在5739360d1030 registry "docker-registry" 3 days ago Up 28 hours 0.0.0.0: ...

  2. 接口返回json

    use Mojolicious::Lite; use JSON qw/encode_json decode_json/; # /foo?user=sri get '/api' => sub { ...

  3. Android Resource介绍和使用

    1. 相关文件夹介绍 文件 取值方式 string.xml getResource().getString(resourceId)或者getResource().getText(resourceId) ...

  4. Android的应用程序的异常处理2

    1.自定义一个类(MaApp)继承Application 2.在清单文件中的Application选项菜单对应的name属性中添加MyApp 3.重写application中的onCreate方法 4 ...

  5. oracle 11g导入导出

    数据的导入 1 将D:\daochu.dmp 中的数据导入 TEST数据库中.   imp system/manager@TEST  file=d:\daochu.dmp    上面可能有点问题,因为 ...

  6. 安装 GitStack 提示 80 端口 被 SYSTEM PID4 占用

    任务管理器 - 服务 W3SVC - World Wide Web Publishing Service  停止服务.

  7. Hyper-v 安装CentOS

    http://www.cnblogs.com/dunitian/p/4976077.html

  8. Spring总结——控制反转,注入(配置和注解两种方式)

    一.Spring的容器: 1.什么是控制反转:传统的方法,当某个java对象A需要调用对象B时,是由调用者(对象A)通过new关键字来创建对象B的(也可以说类A依赖类B),而在Spring中,则是由s ...

  9. JS 操作日期

    var myDate = new Date(); myDate.getYear(); //获取当前年份(2位) myDate.getFullYear(); //获取完整的年份(4位,1970-???? ...

  10. ThinkPHP第二十四天(JQuery常用方法、TP自动验证)

    ---恢复内容开始--- 1.JQuery常用方法 A:JS中可以用json格式数据当做数组使用,如var validate={username:false,pwd:false,pwded:false ...