rpm in linux

Commands --rpm Oct 16 2021

upgrade and install

		1. **-U   (upgrade) **  an upgrade operation means if you have install a version of package and this command will remove the old version and install the latest version .if you not install the package before ,it will install a new one
		2. **-i   (install)**  an install operation installs packages,but it may be install all kinds of the version package that you do not want ,therefor ,it had batter to install by **-U**     *it can upgrade or install many packages at one time*
rpm –U jikes-1.16-1.i386.rpm
rpm –i jikes-1.16-1.i386.rpm

check the installed package

-q (query) an query operation that ask the RPM database is installed the package or not

rpm –q jikes

getting feedback during installation and upgrades

-h (hence) the -h option to the rpm commands prints out # signs. Maybe it will take a long time to update an package,so it is important to show it is running .it is just a sign

rpm -Uh  jikes-1.16-1.i386.rpm
rpm -ih  jikes-1.16-1.i386.rpm

-v (verbose) the verbose operation will tell you the command to print out verbose information .Although

rpm -Uhv jikes-1.16-1.i386.rpm

rpm -Uhv is the most common used commands to install a package

taking a test drive

–test the --test command tells the rpm command to test the process of installing or upgrading but not to install the file. e.g.

rpm -U --test jikes-1.16-1.i386.rpm
package jikes-1.16-1 is already installed  # just  a mode
chap4.txt: not an rpm package (or package manifest):  # have not install yet

installing in different directories

–prefiex : the command allows you to install the package in a different location .the basic format of the command with --prefilx option is

rpm -U --prefix /new/directory package.rpm

query all files of an installed package

-ql: query list all files of an packages

rpm  -ql a.rpm 

query recent installed packages

-qa: query all

rpm -qa --last
rpm -qa    # query all the packages installed

remove a rpm package

-e: (erase): 剔除,v means Vbose all kinds of ,详细的信息,vv means the vbose of vbose that installed

rpm -evv nx 

query a file that belongs which rpm package

-qf: query from

[root@tecmint]# rpm -qf /usr/bin/htpasswd

httpd-tools-2.2.15-15.el6.centos.1.i686

query the information of installed rpm installed package

-qi query information

[root@tecmint]# rpm -qi vsftpd

Name        : vsftpd				   Relocations: (not relocatable)
Version     : 2.2.2				   Vendor: CentOS
Release     : 11.el6				   Build Date: Fri 

查看二进制可执行程序是动态链接(dynamically linked)还是静态链接(statically linked)

file  filename

查看一个动态链接的二进制可执行程序具体调用了哪些外部函数库

ldd 可执行程序文件名

reference

  1. https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch03s02.html
  2. https://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/#:~:text=RPM%20%28Red%20Hat%20Package%20Manager%29%20is%20an%20default,manage%20system%20software%20packages%20in%20Unix%2FLinux%20operating%20systems.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值