标签:
- [root@C6_6_N1 ~]# rpm -ql cronolog
- /usr/bin/cronosplit
- /usr/sbin/cronolog
- /usr/share/doc/cronolog-1.6.2
- /usr/share/doc/cronolog-1.6.2/AUTHORS
- /usr/share/doc/cronolog-1.6.2/COPYING
- /usr/share/doc/cronolog-1.6.2/ChangeLog
- /usr/share/doc/cronolog-1.6.2/NEWS
- /usr/share/doc/cronolog-1.6.2/README
- /usr/share/doc/cronolog-1.6.2/TODO
- /usr/share/info/cronolog.info.gz
- /usr/share/man/man1/cronolog.1m.gz
- /usr/share/man/man1/cronosplit.1m.gz
- [root@rpm Packages]# rpm -q zsh
- package zsh is not installed
- [root@rpm Packages]# rpm -qa
- [root@rpm Packages]# rpm -qf /etc/fstab
- setup-2.8.14-20.el6_4.1.noarch
- [root@rpm Packages]# rpm -qpi zsh-4.3.10-7.el6.x86_64.rpm
- [root@rpm Packages]# rpm -qpc zsh-4.3.10-7.el6.x86_64.rpm
- [root@rpm Packages]# rpm -q zsh --changelog
- * Mon Aug 05 2013 James Antill <james.antill@redhat.com> - 4.3.10-7
- - Change {NAME:OFFSET:LENGTH} substitution feature to ignore KSH_ARRAYS option.
- - Fixup tests.
- - Resolves: rhbz#820530
- [root@rpm Packages]# rpm -q xz --provides
- xz = 4.999.9-0.5.beta.20091007git.el6
- xz(x86-64) = 4.999.9-0.5.beta.20091007git.el6
- [root@rpm Packages]# rpm -q xz --requires
- /bin/sh
- libc.so.6()(64bit)
- libc.so.6(GLIBC_2.2.5)(64bit)
- libc.so.6(GLIBC_2.3)(64bit)
- libc.so.6(GLIBC_2.3.4)(64bit)
- libc.so.6(GLIBC_2.4)(64bit)
- libc.so.6(GLIBC_2.6)(64bit)
- libc.so.6(GLIBC_2.7)(64bit)
- liblzma.so.0()(64bit)
- libpthread.so.0()(64bit)
- libpthread.so.0(GLIBC_2.2.5)(64bit)
- rpmlib(CompressedFileNames) <= 3.0.4-1
- rpmlib(FileDigests) <= 4.6.0-1
- rpmlib(PayloadFilesHavePrefix) <= 4.0-1
- rtld(GNU_HASH)
- xz-libs = 4.999.9-0.5.beta.20091007git.el6
- rpmlib(PayloadIsXz) <= 5.2-1
- [root@rpm Packages]# rpm -ivh zsh-4.3.10-7.el6.x86_64.rpm
- warning: zsh-4.3.10-7.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
- Preparing... ########################################### [100%]
- 1:zsh ########################################### [100%]
- [root@rpm Packages]# rpm -ivh zsh-4.3.10-7.el6.x86_64.rpm --replacepkgs
- Preparing... ########################################### [100%]
- 1:zsh ########################################### [100%]
- [root@rpm Packages]# rpm -ivh zsh-4.3.10-7.el6.x86_64.rpm --test
- Preparing... ########################################### [100%]
- [root@rpm Packages]# rpm -q zsh
- package zsh is not installed
- [root@rpm Packages]# rpm -ivh gcc-4.4.7-11.el6.x86_64.rpm
- error: Failed dependencies:
- cloog-ppl >= 0.15 is needed by gcc-4.4.7-11.el6.x86_64
- cpp = 4.4.7-11.el6 is needed by gcc-4.4.7-11.el6.x86_64
- [root@rpm Packages]# rpm -ivh gcc-4.4.7-11.el6.x86_64.rpm --nodeps
- Preparing... ########################################### [100%]
- 1:gcc ########################################### [100%]
- [root@rpm Packages]# rpm -e zsh
- warning: /etc/zlogin saved as /etc/zlogin.rpmsave
- [root@rpm Packages]# rpm -Uvh zsh-4.3.10-7.el6.x86_64.rpm
- Preparing... ########################################### [100%]
- 1:zsh ########################################### [100%]
- [root@rpm Packages]# rpm -q zsh
- zsh-4.3.10-7.el6.x86_64
- [root@rpm Packages]# rpm -q bash
- bash-4.1.2-15.el6_4.x86_64
- [root@rpm Packages]# rpm -Fvh bash-4.1.2-29.el6.x86_64.rpm
- Preparing... ########################################### [100%]
- 1:bash ########################################### [100%]
- [root@rpm Packages]# rpm -q bash
- bash-4.1.2-29.el6.x86_64
- [root@rpm Packages]# rpm -Fvh zsh-4.3.10-7.el6.x86_64.rpm
- [root@rpm Packages]# rpm -q zsh
- package zsh is not installed
- [root@rpm Packages]# vim /etc/zlogin
- [root@rpm Packages]# rpm -V zsh
- S.5....T. c /etc/zlogin
- [root@rpm Packages]# rpm -ivh zsh-4.3.10-7.el6.x86_64.rpm
- warning: zsh-4.3.10-7.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
- Preparing... ########################################### [100%]
- 1:zsh ########################################### [100%]
- [root@rpm cdrom]# rpm --import RPM-GPG-KEY-CentOS-6
- [root@rpm Packages]# rpm -ivh zsh-4.3.10-7.el6.x86_64.rpm --replacepkgs
- Preparing... ########################################### [100%]
- 1:zsh ########################################### [100%]
- [root@rpm base]# rpm -q gpg-pubkey
- package gpg-pubkey is not installed
- [root@rpm base]# rpm --import /media/cdrom/RPM-GPG-KEY-CentOS-6
- [root@rpm base]# rpm -q gpg-pubkey
- gpg-pubkey-c105b9de-4e0fd3a3
- [root@rpm base]# rpm -q gpg-pubkey
- gpg-pubkey-c105b9de-4e0fd3a3
- [root@rpm base]# rpm -e gpg-pubkey-c105b9de-4e0fd3a3
- [root@rpm base]# rpm -q gpg-pubkey
- package gpg-pubkey is not installed
[root@rpm ~]# rpm --initdb
[root@rpm ~]# rpm --rebuilddb
yum repolist 列出所有仓库
yum list all 列出所有的软件(包含未安装仓库上可用的)
yum list installed 列出所有已安装的软件
yum list available 列出仓库上的软件
yum grouplist 列出包组
yum install PACKAGE_NAME ... 安装程序包
yum install PACKAGE-VERSION 如果要安装指定的版本的程序
yum reinstall PACKAGE_NAME 重装指定的程序包
yum update PACKAGE_NAME 升级程序包
yum update PACKAGE-VERSION 如果有多个版本的升级包可用,且仅期望升级到指定版本:
yum downgrade PACKAGE_NAME 降级
yum check-update 检查可用升级
yum remove|erase PACKAGE_NAME 卸载程序包依赖于指定程序包的其它包,会被一并卸载
yum list 列出所有包
yum info PACKAGE_NAME 显示包的信息
yum search KEYWORD 根据关键字模糊查询包名或包的sumary信息包含此KEYWORD的相关列表;
yum provides|whatprovides /path/to/somefile 查询包所提供的功能
yum grouplist 显示所有包组
yum groupinfo "GROUP_NAME" 显示某包组的相关信息:
yum groupinstall "GROUP_NAME" 安装包组
yum install @GROUP_NAME
yum groupremove "GROUP_NAME" 卸载包组
yum remove @"GROUP_NAME"
yum groupupdate "GROUP_NAME" 升级包组:
yum localinstall /path/to/rpm_package_file ...
yum install /path/to/rpm_package_file ... CentOS7上使用
[Sohu]
name=SohuRepo
baseurl=http://mirrors.sohu.com/centos/$releasever/os/$basearch
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
cost=900
Downloading Packages:
zsh-4.3.10-7.el6.x86_64.rpm
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from http://mirrors.sohu.com/centos/6/os/x86_64/RPM-GPG-KEY-CentO
Importing GPG key 0xC105B9DE:
Userid: "CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
From : http://mirrors.sohu.com/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: n
标签:
原文地址:http://www.cnblogs.com/kwstars/p/4628531.html