zoukankan      html  css  js  c++  java
  • linux centos7下yum常用操作

    1.yum查询想要安装的包

      
    yum search nginx

    2.查看软件包的详细信息

    yum info nginx

    3.加快yun速度,使用yum-plugin-fastestmirror

    yum -y install yum-plugin-fastestmirror

    4.yum安装命令

    yum install 'package_name'

    -y 默认确认安装

    yum -y install 'package_name'

    5.列出所有已安装的软件包

    yum list installed

    过滤出包含 nginx的

    yum list installed |grep nginx

    6.yum卸载命令

    yum remove 'package_name'

    7.更换阿里云作为yum源

    • 备份当前yum源

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

    • 更换阿里云作为yum源

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

    -更换阿里元作为EPEL源 (扩展源) EPEL 是yum的一个软件源,里面包含了许多基本源里没有的软件

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

    • 运行以下命令生成缓存

    yum clean all

    • 生成缓存

    yum makecache

  • 相关阅读:
    函数式宏定义与普通函数
    linux之sort用法
    HDU 4390 Number Sequence 容斥原理
    HDU 4407 Sum 容斥原理
    HDU 4059 The Boss on Mars 容斥原理
    UVA12653 Buses
    UVA 12651 Triangles
    UVA 10892
    HDU 4292 Food
    HDU 4288 Coder
  • 原文地址:https://www.cnblogs.com/daikainan/p/14284881.html
Copyright © 2011-2022 走看看