rpm、yum、编译安装轻松管理centos7程序包(12)
- UID
- 1066743
|
rpm、yum、编译安装轻松管理centos7程序包(12)
三、yum命令
yum [options] [command] [package ...]
OPTIONS:
a、安装
install package1 [package2] [...]
# yum install httpd -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-40.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-40.el7.centos for package: httpd-2.4.6-40.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-40.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-40.el7.centos.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package httpd-tools.x86_64 0:2.4.6-40.el7.centos will be installed
................
Installed:
httpd.x86_64 0:2.4.6-40.el7.centos
Dependency Installed:
apr.x86_64 0:1.4.8-3.el7 apr-util.x86_64 0:1.5.2-6.el7
httpd-tools.x86_64 0:2.4.6-40.el7.centos
Complete!
# rpm -q httpd
httpd-2.4.6-40.el7.centos.x86_64
reinstall package1 [package2] [...] (重新安装)
# 次处与安装没有不同,不做演示,一般用于程序出问题时使用,次处重新安装时不会重新覆盖配置文件。
b、查看
repolist:显示当前系统上仓库列表
# yum repolist
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
repo id repo name status
base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com 9,007
extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.com 226
updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun.com 940
repolist: 10,173
list:显示仓库中所有程序包
# yum list
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Installed Packages
GConf2.x86_64 3.2.6-8.el7 @anaconda
ModemManager.x86_64 1.1.0-6.git20130913.el7 @anaconda
ModemManager-glib.x86_64 1.1.0-6.git20130913.el7 @anaconda
NetworkManager.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7
@anaconda
NetworkManager-adsl.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7
@anaconda
NetworkManager-bluetooth.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7
@anaconda
NetworkManager-glib.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7
@anaconda
NetworkManager-libnm.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7
@anaconda
NetworkManager-team.x86_64 1:1.0.0-14.git20150121.b4ea599c.el7
@anaconda
OpenIPMI-libs.i686 2.0.19-11.el7 base
OpenIPMI-libs.x86_64 2.0.19-11.el7 base
OpenIPMI-modalias.x86_64 2.0.19-11.el7 base
OpenIPMI-perl.x86_64 2.0.19-11.el7 base
OpenIPMI-python.x86_64 2.0.19-11.el7 base
PackageKit.i686 1.0.7-5.el7.centos base
PackageKit.x86_64 1.0.7-5.el7.centos base
PackageKit-browser-plugin.x86_64 1.0.7-5.el7.centos base
PackageKit-command-not-found.x86_64 1.0.7-5.el7.centos base
PackageKit-cron.x86_64 1.0.7-5.el7.centos base
PackageKit-glib.i686 1.0.7-5.el7.centos base
PackageKit-glib.x86_64 1.0.7-5.el7.centos base
PackageKit-glib-devel.i686 1.0.7-5.el7.centos base
PackageKit-glib-devel.x86_64 1.0.7-5.el7.centos base
PackageKit-gstreamer-plugin.x86_64 1.0.7-5.el7.centos base
PackageKit-gtk3-module.i686 1.0.7-5.el7.centos base
PackageKit-gtk3-module.x86_64 1.0.7-5.el7.centos base
PackageKit-hif.x86_64 1.0.7-5.el7.centos base
PackageKit-yum.x86_64 1.0.7-5.el7.centos base
@anaconda:表示安装系统时安装的程序包
base:表示来自base仓库的包
info:查看程序包详细信息
# yum info httpd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Installed Packages
Name : httpd
Arch : x86_64
Version : 2.4.6
Release : 40.el7.centos
Size : 9.4 M
Repo : installed
From repo : base
Summary : Apache HTTP Server
URL : http://httpd.apache.org/
License : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
: web server.
provides:查看指定的特性(可以是某文件)是由哪个程序包所提供。 |
|
|
|
|
|