安装rpm软件
# rpm -ivh /mnt/Packages/lrzsz0.12.2036.el7.x86_64.rpm
# rpm --help-i,--install install package(s)
-v,--verbose 详细 provide more detailed output
-h,--hash print hash marks as package installs (good with -v)#安装时打印散列标记#号
安装时,解决依赖关系:
# rpm -ivh /mnt/Packages/mariadb-server-5.5.44-2.el7.x86_64.rpm --nodeps
rpm查询功能
# rpm -q zsh #查询单个zsh包是否安装zsh-5.0.2-14.el7.x86_64
# rpm -qa | grep httpd #查询是否安装了httpd相关的软件包
# rpm -ql zsh |more(查询zsh这个软件安装后,产生了那些文件和目录)
zsh 这个命令是由哪个软件包安装的?
# rpm -qf `which zsh`
zsh-5.0.2-14.el7.x86_64
在软件没有安装之前进行查看
# rpm -qpl /mnt/Packages/lrzsz-0.12.20-36.el7.x86_64.rpm
warning:
/mnt/Packages/lrzsz-0.12.20-36.el7.x86_64.rpm:
Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
/usr/bin/rb
/usr/bin/rx
/usr/bin/rz
/usr/bin/sb
/usr/bin/sx
/usr/bin/sz
/usr/share/locale/de/LC_MESSAGES/lrzsz.mo
/usr/share/man/man1/rz.1.gz
/usr/share/man/man1/sz.1.gz
升级:
# rpm -Uvh/mnt/Packages/lrzsz-0.12.20-36.el7.x86_64.rpm
卸载:
# rpm -e zsh 只写软件包的名称,不用写软件包
强制卸载
# yum -y install httpd
# rpm -e mailcap --nodeps