rpm -ivh package.rpm
rpm -ivh --force package_name.rpm # ...conflict with...
rpm -ivh --nodeps package_name.rpm # ...is needed by .../ ...is not installed ...
rpm -i --force --nodeps package_name.rpm
---------------
how to install xxx.src.rpm
way_1
--
# rpm -i package.src.rpm
# cd /usr/src/redhat/SPECS
# rpmbuild -bp package.src.rpm
# cd /usr/src/redhat/BUILD/your-package/
# ./configure
# make
# make install
--
way_2
#rpm -i package.src.rpm
# cd /usr/src/redhat/SPECS
# rpmbuild -bb your-packages.specs #there is a new rpm package where /usr/src/redhat/RPM/i386/
# rpm -i new_package.rpm
-----------------
how to uninstall the software: proftpd-d1.2.8-1
rpm -e proftpd-1.2.8-1
rpm -e proftpd-1.2.8
rpm -e proftpd-
rpm -e proftpd
rpm -e --nodeps package_name #force to uninstall the package...
--------------------
how to get the rpm_package but uninstall it
rpm2cpio & cpio
#rpm2cpio xxx.rpm | cpio -vi
#rpm2cpio xxx.rpm | cpio -idmv
#rpm2cpio xxx.rpm | cpio --extract --make-directories
---
# sudo yum install --downloadonly <package-name> # default dir is the
/var/cache/yum/x86_64/[centos/fedora-version]/[repository]/packages
# sudo yum install --downloadonly <package-name> --downlaoddir=/tmp # set the default directory
note: centos/RHEL6 or before version, you should install the yum-plugin-downloadonly
# sudo yum install yum-plugin-downloadonly
---
sudo yum install yum-utils
sudo yumdownloader <package-name> #the default dir is current dir
--------------
how to check out the information about the linked package?
rpm -qa # list all rpm package
rpm -qa| grep sql
rpm -q mysql
rpm -ql package_name # find the package installing location
note: package_name is except the .rpm name
--------------------
which iptables ?
--------------------
rpm -qf `which software-name`
rpm -qif `which software-name` #return the information about the package_name
-------------------------
whereis ftptop
rpm -qf /usr/bin/ftptop
rpm -qf /usr/share/doc/proftpd-1.2.8/rfc/rfc0959.txt
来自: http://man.linuxde.net/rpm
--------------
RPM安装包必须存在,才能执行以下命令。
命令: rpm -qpi <rpm包名> --changelog |more
# rpm -qi kernel-PAE-2.6.18-194.32.1.el5 --changelog |more
yumdownloader iptables-services-1.4.21-16.el7.x86_64
----------------
查询:
rpm -q 查询 rpM
查询某包是否已经安装,以及检查安装的所有包,还可以查看某包的详细信息
rpm -q 包名:查询某包或某些包是否安装
rom -qa 包名;查询已经安装的所有包
rpm -qf /path/to/shmefile :查询某文件是由哪个包安装生成:
rpm -qpi 包文件路径:查询尚未安装的包文件相关信息
[query-options]
rpm -qi 包名 :查询某包的简要说明信息
rpm -ql 包名 :查询某包安装生成的文件列表:
rpm -qc 包名 :查询某包安装完成后的生成的配置文件
rpm -qd 包名 :获取某包安装完成后的帮助文档信息
rpm -q --changelog 包名 :查看某包制作时随版本变化的changelog信息
pm -q --provides 包名:查询某包提供的capabilities:
rpm -q --requires 包名:查询某包的依赖capabilities;
rpm -q --scripts 包名:查询某包安装或卸载时执行脚本
---------------
yum install 全部安装
yum install package1 安装指定的安装包package1
yum groupinsall group1 安装程序组group1