4.2. yum - Yellowdog Updater Modified

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:
+关注继续查看

4.2.1. install

yum -y install package
			

reinstall

yum -y reinstall package
			

4.2.2. localinstall

yum localinstall 可以代替 rpm -ivh 并且会自己安装依赖包

# yum localinstall asymptote-2.08-1.fc12.i686.rpm
			

4.2.3. list

			
yum list
			
			

列出已经安装的包

			
yum list installed

yum list installed | wc -l

yum list installed ntp

yum list installed mysql\*
			
			
yum list updates
yum list extras
			

4.2.4. search

yum search mysql
			

4.2.5. update / upgrade

check update

			
[root@development ~]# yum check-update
[root@development ~]# yum -y update
			
			

upgrade

# yum upgrade
			

4.2.6. remove

#yum remove httpd
			

4.2.7. installed

# yum list installed
			

4.2.8. group

4.2.8.1. grouplist

[root@localhost ~]#  yum grouplist
Loaded plugins: fastestmirror
Setting up Group Process
Loading mirror speeds from cached hostfile
 * addons: mirrors.163.com
 * base: mirrors.163.com
 * extras: mirrors.163.com
 * updates: mirrors.163.com
Installed Groups:
   Administration Tools
   Development Libraries
   Dialup Networking Support
   Editors
   Mail Server
   Network Servers
   Office/Productivity
   Server Configuration Tools
   System Tools
   Text-based Internet
   Web Server
   Yum Utilities
Available Groups:
   Authoring and Publishing
   Base
   Beagle
   Cluster Storage
   Clustering
   DNS Name Server
   Development Tools
   Emacs
   Engineering and Scientific
   FTP Server
   FreeNX and NX
   GNOME Desktop Environment
   GNOME Software Development
   Games and Entertainment
   Graphical Internet
   Graphics
   Horde
   Java
   Java Development
   KDE (K Desktop Environment)
   KDE Software Development
   KVM
   Legacy Network Server
   Legacy Software Development
   Legacy Software Support
   Mono
   MySQL Database
   News Server
   OpenFabrics Enterprise Distribution
   PostgreSQL Database
   Printing Support
   Ruby
   Sound and Video
   Tomboy
   Virtualization
   Windows File Server
   X Software Development
   X Window System
   XFCE-4.4
Done

				

4.2.8.2. groupinfo

# yum groupinfo "Server Configuration Tools"
Loaded plugins: fastestmirror
Setting up Group Process
Loading mirror speeds from cached hostfile
 * addons: centos.ustc.edu.cn
 * base: centos.ustc.edu.cn
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn

Group: Server Configuration Tools
 Description: This group contains all of CentOS's custom server configuration tools.
 Default Packages:
   system-config-httpd
   system-config-nfs
   system-config-printer-gui
   system-config-samba
   system-config-securitylevel
   system-config-services
 Optional Packages:
   system-config-bind
   system-config-boot
   system-switch-mail-gnome
				

4.2.8.3. groupinstall

#yum groupinstall 'X Window System'  -y

安装GNOME桌面环境
#yum groupinstall  'GNOME Desktop Environment' -y

安装KDE桌面环境
#yum groupinstall 'KDE (K Desktop Environment)' -y
				

4.2.8.4. groupremove

卸载GNOME桌面环境
#yum groupremove "GNOME Desktop Environment"

卸载KDE桌面环境
#yum groupremove "KDE (K Desktop Environment)"
				
yum groupremove "GNOME Desktop Environment" "Games and Entertainment" "Graphical Internet" "Graphics" "Office/Productivity" "Printing Support" "Sound and Video" "Web Server" "X Window System"
				

4.2.9. 查看包的依赖关系

# yum deplist libcurl
			

4.2.10. provides / whatprovides

查询pg_config命令在那一个包中

# yum provides "*/pg_config"
			
# yum provides "*/libpq-fe.h"
			
# yum whatprovides mysql_config			
			

4.2.11. YUM 源管理

列出所有yum源

# yum repolist all
			

查看启用YUM源

# yum repolist enabled
			

查看禁用YUM源

# yum repolist disabled
			

禁用YUM源

# yum-config-manager --disable mysql-connectors-community
			

启用YUM源

sudo yum-config-manager --enable mysql57-community-dmr
			

或者修改/etc/yum.repos.d/文件也能实现相同的作用 enabled=0 为禁用 enabled=1启用

Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>comments powered by Disqus





原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
21天前
|
人工智能 网络协议 安全
yum出现Could not retrieve mirrorlist解决方法
在centos中使用yum安装软件时可能出现Could not retrieve mirrorlist,这种情况一般是网络出现问题。 方法/步骤
30 0
|
9月前
|
Ubuntu 开发工具 git
apt install git:Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/git/git-man_2.17.1-1ubuntu0.11_all.deb 404 Not Found [IP: 91.189.91.39 80]
213 0
apt install git:Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
|
10月前
|
KVM 虚拟化
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
|
12月前
|
Linux Go
centos8 appstream大坑Failed to download metadata for repo appstream: Cannot prepare internal mirrorlis
centos8 appstream大坑Failed to download metadata for repo appstream: Cannot prepare internal mirrorlis
200 0
|
12月前
|
Ubuntu
apt-get update时卡在 [0%]waiting for headers
apt-get update时卡在 [0%]waiting for headers
|
Ubuntu 网络安全 开发工具
Ubuntu E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? 错误
Ubuntu E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? 错误
548 0
|
Linux Perl
Failed to download metadata for repo 'epel'
Failed to download metadata for repo 'epel'
596 0
Failed to download metadata for repo 'epel'
|
Docker 容器
【Docker】安装镜像报错warning: /var/cache/yum/x86_64/7/extras/packages/epel-release-7-11.noarch.rpm: Header
【Docker】安装镜像报错warning: /var/cache/yum/x86_64/7/extras/packages/epel-release-7-11.noarch.rpm: Header
322 0
【Docker】安装镜像报错warning: /var/cache/yum/x86_64/7/extras/packages/epel-release-7-11.noarch.rpm: Header
|
缓存 网络协议 Linux
CentOS8 yum install 报错Cannot prepare internal mirrorlist: No URLs in mirrorlist解决(替换yum源)
CentOS8 yum install 报错Cannot prepare internal mirrorlist: No URLs in mirrorlist解决(替换yum源)
CentOS8 yum install 报错Cannot prepare internal mirrorlist: No URLs in mirrorlist解决(替换yum源)
yum install 命令报错Could not retrieve mirrorlist
yum install 命令报错Could not retrieve mirrorlist
232 0
yum install 命令报错Could not retrieve mirrorlist
相关产品
云迁移中心
推荐文章
更多