yum常用命令下

一 升级
yum -y update 包名
选项:
-update:升级
-y:自动回答yes
注意:不能执行yum -y update,否则系统会挂
 
二 实战
[root@localhost ~]# yum -y update gcc
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
No packages marked for update
 
三 卸载
yum -y remove 包名
选项:
-remove:卸载
-y:自动回答yes
注意:
1、服务使用最小化安装,用什么软件安装什么,尽量不卸载。
2、用yum卸载很危险,它会将依赖也卸载,可能10次卸载,2到3次到导致系统崩溃。
 
四 YUM软件组管理命令
yum grouplist
列出所有可用的软件组列表
yum groupinstall 软件组名
安装指定软件组,组名可以由grouplist查询出来
yum groupremove 软件组名
卸载指定软件组
 
五 实战
[root@localhost ~]# yum grouplist
Loaded plugins: fastestmirror, langpacks
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
Available Environment Groups:
Minimal Install
Compute Node
Infrastructure Server
File and Print Server
Basic Web Server
Virtualization Host
Server with GUI
GNOME Desktop
KDE Plasma Workspaces
Development and Creative Workstation
Available Groups:
Compatibility Libraries
Console Internet Tools
Development Tools
Graphical Administration Tools
Legacy UNIX Compatibility
Scientific Support
Security Tools
Smart Card Support
System Administration Tools
System Management
Done
[root@localhost ~]# echo $LANG
en_US.UTF-8
[root@localhost ~]# LANG=zh_CN.UTF-8
[root@localhost ~]# yum group list
已加载插件:fastestmirror, langpacks
没有安装组信息文件
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
可用的环境分组:
最小安装
基础设施服务器
计算节点
文件及打印服务器
基本网页服务器
虚拟化主机
带 GUI 的服务器
GNOME 桌面
KDE Plasma Workspaces
开发及生成工作站
可用组:
传统 UNIX 兼容性
兼容性程序库
图形管理工具
安全性工具
开发工具
控制台互联网工具
智能卡支持
科学记数法支持
系统管理
系统管理工具
完成

猜你喜欢

转载自cakin24.iteye.com/blog/2391973