yanxi

centos 更新yum源
更改系统yum源 1.首先要备份源 cd /etc/yum.repos.d mv Centos-Base.repo...
扫描右侧二维码阅读全文
30
2018/01

centos 更新yum源

更改系统yum源

1.首先要备份源

cd /etc/yum.repos.d
mv Centos-Base.repo Centos-Base.repo.backup

2.下载更新源(查看当前系统的版本centos 5 ;centos 6 ....)

wget -O ./CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

/ -O 大写,下载指定aliyun源,同时重命名下载的文件。/

3.清除缓存,重建缓存

yum clean all
yum makecache

4.软件包的更新检测及更新

yum check-update  #Check for available package updates
yum update
yum upgrade

#更新指定的rpm包,如更新kernel和kernel source
yum update kernel kernel-source
  • yum -y update 升级所有包,改变软件设置和系统设置,系统版本内核都升级。
  • yum -y upgrade升级所有包,不改变软件设置和系统设置,系统版本升级,内核不改变。

5.列出可用的安装包yum list 与 yum search

yum list |grep lrzsz
lrzsz.x86_64                                0.12.20-36.el7             @base
yum search lrzsz
============== N/S matched: lrzsz ==============
lrzsz.x86_64 : The lrz and lsz modem communications programs

6.列出包的依赖项

deplist List a package's dependencies

yum deplist openssl

7.显示包的详细信息(版本、大小、是否安装、等)

yum info lrzsz

lrzsz

8.卸载软件包

erase Remove a package or packages from your system

yum erase lrzsz
yum remove lrzsz

9.重新安装软件包

yum reinstall lrzsz
Last modification:January 5th, 2019 at 01:25 pm
If you think my article is useful to you, please feel free to appreciate

Comment here is closed