{"id":85273,"date":"2023-12-16T22:00:08","date_gmt":"2023-12-16T14:00:08","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=85273"},"modified":"2023-12-16T22:00:08","modified_gmt":"2023-12-16T14:00:08","slug":"rpm-use-all","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/rpm-use-all.html","title":{"rendered":"rpm\u4f60\u4e0d\u77e5\u9053\u7684\u4e8b"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nRPM\u662fLinux\u7cfb\u7edfcentos\u7cfb\u5217\u7684\u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u901a\u8fc7rpm\u53ef\u4ee5\u5feb\u901f\u7684\u5b89\u88c5\u8f6f\u4ef6\uff0c\u5728\u5b66\u4e60\u548c\u5de5\u4f5c\u7ecf\u5e38\u7528\u5230\u7684\u5305\u7ba1\u7406\u7cfb\u7edf\u4e4b\u4e00\u3002\u4e0b\u9762\u6211\u4eec\u5c31\u6765\u8be6\u7ec6\u4e86\u89e3\u4e0brpm\u7684\u4f7f\u7528--rpm\u4f60\u4e0d\u77e5\u9053\u7684\u4e8b\u3002
\n<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
1\uff0c\u5982\u4f55\u4f7f\u7528 rpm \u521d\u59cb\u5316\u6570\u636e\u5e93\uff1f<\/strong><\/div>\n

\u901a\u8fc7rpm \u547d\u4ee4\u67e5\u8be2\u4e00\u4e2arpm \u5305\u662f\u5426\u5b89\u88c5\u4e86\uff0c\u4e5f\u662f\u8981\u901a\u8fc7rpm \u6570\u636e\u5e93\u6765\u5b8c\u6210\u7684\uff1b\u6240\u4ee5\u6211\u4eec\u8981\u7ecf\u5e38\u7528\u4e0b\u9762\u7684\u4e24\u4e2a\u547d\u4ee4\u6765\u521d\u59cb\u5316rpm \u6570\u636e\u5e93\uff1b<\/p>\n

\r\n[root@feiyu ~]# rpm --initdb\r\n[root@feiyu ~]# rpm --rebuilddb    \u6ce8\uff1a\u8fd9\u4e2a\u8981\u82b1\u597d\u957f\u65f6\u95f4\uff1b\r\n<\/pre>\n

\u6ce8\uff1a\u8fd9\u4e24\u4e2a\u53c2\u6570\u662f\u6781\u4e3a\u6709\u7528\uff0c\u6709\u65f6rpm \u7cfb\u7edf\u51fa\u4e86\u95ee\u9898\uff0c\u4e0d\u80fd\u5b89\u88c5\u548c\u67e5\u8be2\uff0c\u5927\u591a\u662f\u8fd9\u91cc\u51fa\u4e86\u95ee\u9898\u3002<\/p>\n

2\uff0c\u67e5\u8be2\u7cfb\u7edf\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\uff1f<\/strong><\/div>\n
\r\n[root@feiyu ~]# rpm -qa |more\r\n<\/pre>\n
3\uff0c\u67e5\u8be2\u4e00\u4e2a\u5df2\u7ecf\u5b89\u88c5\u7684\u6587\u4ef6\u5c5e\u4e8e\u54ea\u4e2a\u8f6f\u4ef6\u5305,\uff1f<\/strong><\/div>\n

\u8bed\u6cd5\uff1a rpm -qf \u8f6f\u4ef6\u540d<\/p><\/blockquote>\n

\r\n[root@feiyu ~]# rpm -qf `which nmon`\r\nnmon-14i-8.el6.x86_64\r\n<\/pre>\n
4\uff0c\u67e5\u8be2\u5df2\u5b89\u88c5\u8f6f\u4ef6\u5305\u90fd\u5b89\u88c5\u5230\u4f55\u5904\uff1f<\/strong><\/div>\n

\u8bed\u6cd5\uff1arpm -ql \u8f6f\u4ef6\u540d<\/p><\/blockquote>\n

\r\n[root@feiyu ~]# rpm -ql nmon\r\n\/usr\/bin\/nmon\r\n\/usr\/share\/doc\/nmon-14i\r\n\/usr\/share\/doc\/nmon-14i\/Documentation.txt\r\n\/usr\/share\/man\/man1\/nmon.1.gz\r\n<\/pre>\n
5\uff0c\u600e\u6837\u67e5\u8be2\u4e00\u4e2a\u5df2\u5b89\u88c5\u8f6f\u4ef6\u5305\u7684\u4fe1\u606f\uff1f<\/strong><\/div>\n

\u8bed\u6cd5\u683c\u5f0f\uff1a rpm -qi \u8f6f\u4ef6\u540d<\/p><\/blockquote>\n

\r\n[root@feiyu ~]# rpm -qi nmon\r\n<\/pre>\n
6\uff0c\u67e5\u770b\u4e00\u4e0b\u5df2\u5b89\u88c5\u8f6f\u4ef6\u7684\u914d\u7f6e\u6587\u4ef6<\/strong><\/div>\n

\u8bed\u6cd5\u683c\u5f0f\uff1arpm -qc \u8f6f\u4ef6\u540d<\/p><\/blockquote>\n

\r\n[root@feiyu ~]# rpm  -qc vsftpd\r\n\/etc\/logrotate.d\/vsftpd\r\n\/etc\/pam.d\/vsftpd\r\n\/etc\/vsftpd\/ftpusers\r\n\/etc\/vsftpd\/user_list\r\n\/etc\/vsftpd\/vsftpd.conf\r\n<\/pre>\n
7\uff0c\u67e5\u770b\u4e00\u4e2a\u5df2\u7ecf\u5b89\u88c5\u8f6f\u4ef6\u7684\u6587\u6863\u5b89\u88c5\u4f4d\u7f6e\uff1a<\/strong><\/div>\n

\u8bed\u6cd5\u683c\u5f0f\uff1a rpm -qd \u8f6f\u4ef6\u540d<\/p><\/blockquote>\n

\r\n[root@feiyu ~]# rpm  -qd nmon\r\n\/usr\/share\/doc\/nmon-14i\/Documentation.txt\r\n\/usr\/share\/man\/man1\/nmon.1.gz\r\n<\/pre>\n
8\uff0c\u67e5\u770b\u4e00\u4e0b\u5df2\u5b89\u88c5\u8f6f\u4ef6\u6240\u4f9d\u8d56\u7684\u8f6f\u4ef6\u5305\u53ca\u6587\u4ef6\uff1b<\/strong><\/div>\n

\u8bed\u6cd5\u683c\u5f0f\uff1a rpm -qR \u8f6f\u4ef6\u540d<\/p><\/blockquote>\n

\r\n[root@feiyu ~]# rpm  -qR  nmon\r\n<\/pre>\n

\u67e5\u8be2\u5df2\u5b89\u88c5\u8f6f\u4ef6\u7684\u603b\u7ed3\uff1a\u5bf9\u4e8e\u4e00\u4e2a\u8f6f\u4ef6\u5305\u5df2\u7ecf\u5b89\u88c5\uff0c\u6211\u4eec\u53ef\u4ee5\u628a\u4e00\u7cfb\u5217\u7684\u53c2\u6570\u7ec4\u5408\u8d77\u6765\u7528\uff1b\u6bd4\u5982 rpm -qil \uff1b\u6bd4\u5982<\/p>\n

\r\n[root@feiyu ~]# rpm  -qil  nmon\r\n<\/pre>\n
9\uff0c\u5bf9\u4e8e\u672a\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u7684\u67e5\u770b\uff1a<\/strong><\/div>\n

\u67e5\u770b\u4e00\u4e2a\u8f6f\u4ef6\u5305\u7684\u7528\u9014\u3001\u7248\u672c\u7b49\u4fe1\u606f\uff1b<\/p>\n

\u8bed\u6cd5\uff1a rpm -qpi file.rpm<\/p><\/blockquote>\n

\r\n[root@feiyu ~]# rpm -qpi glibc-2.15-60.el6.x86_64.rpm \r\n<\/pre>\n
10\uff0c\u67e5\u770b\u4e00\u4ef6\u8f6f\u4ef6\u5305\u6240\u5305\u542b\u7684\u6587\u4ef6\uff1b<\/strong><\/div>\n

\u8bed\u6cd5\uff1a rpm -qpl file.rpm<\/p><\/blockquote>\n

\r\n[root@feiyu ~]# rpm -qpl glibc-2.15-60.el6.x86_64.rpm \r\n<\/pre>\n
11\uff0c\u67e5\u770b\u8f6f\u4ef6\u5305\u7684\u6587\u6863\u6240\u5728\u7684\u4f4d\u7f6e\uff1b<\/strong><\/div>\n

\u8bed\u6cd5\uff1a rpm -qpd file.rpm<\/p><\/blockquote>\n

\r\n[root@feiyu ~]# rpm -qpd glibc-2.15-60.el6.x86_64.rpm \r\n<\/pre>\n
12\uff0c\u67e5\u770b\u4e00\u4e2a\u8f6f\u4ef6\u5305\u7684\u914d\u7f6e\u6587\u4ef6\uff1b<\/strong><\/div>\n

\u8bed\u6cd5\uff1a rpm -qpc file.rpm<\/p><\/blockquote>\n

\r\n[root@feiyu ~]# rpm -qpc glibc-2.15-60.el6.x86_64.rpm \r\n<\/pre>\n
13\uff0c\u67e5\u770b\u4e00\u4e2a\u8f6f\u4ef6\u5305\u7684\u4f9d\u8d56\u5173\u7cfb \u8fd9\u4e2a\u662f\u5bf9\u4e8e\u6ca1\u6709\u5b89\u88c5\u7684rpm\u7684\u6700\u5b9e\u7528\u7684\u547d\u4ee4<\/strong><\/div>\n
\r\n
\u8bed\u6cd5\uff1a rpm -qpR file.rpm<\/blockquote>\r\n[root@feiyu ~]# rpm -qpR glibc-2.15-60.el6.x86_64.rpm\r\n<\/pre>\n
14\uff0c\u5bf9\u4e8esrc.rpm\u5305 \u7684\u5b89\u88c5\u5904\u7406\u65b9\u6cd5\uff1a<\/strong><\/div>\n
\u7b2c\u4e00\u79cd:\u7f16\u8bd1\u4e3arpm\u5305.<\/strong><\/span><\/div>\n
1\uff0c[root@feiyu ~]# rpm  -i vsftpd-2.2.2-11.el6_3.1.src.rpm\r\n \r\n2\uff0c[root@feiyu ~]# cd  rpmbuild\/SPECS\/\r\n     [root@feiyu SPECS]# ls -l\r\n     total 24\r\n     -rw-r--r--. 1 root root 21472 Feb 13  2013 vsftpd.spec\r\n \r\n3\uff0c[root@feiyu SPECS]# rpmbuild -bb vsftpd.spec\r\n<\/pre>\n

\u8fd9\u65f6\uff0c\u5728 ..\/RPMS\/\uff08\u6839\u636e\u5177\u4f53\u5305\u7684\u4e0d\u540c) \u5728\u8fd9\u4e2a\u76ee\u5f55\u4e0b\uff0c\u6709\u4e00\u4e2a\u65b0\u7684rpm\u5305\uff0c\u8fd9\u4e2a\u662f\u7f16\u8bd1\u597d\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002\u6267\u884c\uff1arpm -i new-package.rpm\u5373\u53ef\u5b89\u88c5\u5b8c\u6210\u3002<\/p>\n

\u7b2c\u4e8c\u79cd:\u7f16\u8bd1\u6210\u6e90\u7801\u5305<\/strong><\/span><\/div>\n
1.\u3000[root@feiyu ~]# rpm  -i vsftpd-2.2.2-11.el6_3.1.src.rpm\r\n \r\n2.\u3000[root@feiyu ~]# cd  rpmbuild\/SPECS\/\r\n \r\n3.\u3000[root@feiyu SPECS]# rpmbuild -bp vsftpd.spec \r\n \r\n4.\u3000[root@feiyu SPECS]# cd ..\/BUILD\/vsftpd-2.2.2\/ \r\n \r\n5.\u3000[root@feiyu vsftpd-2.2.2]# .\/configure   \u8fd9\u4e00\u6b65\u548c\u7f16\u8bd1\u666e\u901a\u7684\u6e90\u7801\u8f6f\u4ef6\u4e00\u6837\uff0c\u53ef\u4ee5\u52a0\u4e0a\u53c2\u6570\r\n \r\n6.\u3000[root@feiyu vsftpd-2.2.2]# make\r\n \r\n7.\u3000[root@feiyu vsftpd-2.2.2]# make install\r\n<\/pre>\n
\u9644:RPM\u547d\u4ee4\u5e38\u7528\u53c2\u6570<\/strong><\/div>\n
--initdb\uff1a\u521d\u59cb\u5316\u6570\u636e\u5e93\r\n \r\n--rebuilddb\uff1a\u4ece\u5df2\u5b89\u88c5\u5305\u7684\u5934\u4fe1\u606f\u4e2d\u91cd\u5efa\u6570\u636e\u5e93\u7684\u53cd\u8f6c\u5217\u8868\r\n \r\n-q\uff1a\u5728\u7cfb\u7edf\u4e2d\u67e5\u8be2\u8f6f\u4ef6\u6216\u67e5\u8be2\u6307\u5b9arpm\u5305\u7684\u5185\u5bb9\u4fe1\u606f\r\n \r\n-i\uff1a\u5728\u7cfb\u7edf\u4e2d\u5b89\u88c5\u8f6f\u4ef6\r\n \r\n-U\uff1a\u5728\u7cfb\u7edf\u4e2d\u5347\u7ea7\u8f6f\u4ef6\r\n \r\n-e\uff1a\u5728\u7cfb\u7edf\u4e2d\u5378\u8f7d\u8f6f\u4ef6\r\n \r\n-h\uff1a\u7528#(hash)\u7b26\u663e\u793arpm\u5b89\u88c5\u8fc7\u7a0b\r\n \r\n-v\uff1a\u8be6\u8ff0\u5b89\u88c5\u8fc7\u7a0b\r\n \r\n-c\uff1a\u5217\u51fa\u6240\u6709\u914d\u7f6e\u6587\u4ef6\r\n \r\n-d \uff1a\u5217\u51fa\u6240\u6709\u6587\u6863\u6587\u4ef6\r\n \r\n-l\uff1a\u5217\u51fa\u5305\u5185\u7684\u6240\u6709\u6587\u4ef6\r\n \r\n\uff0divh\uff1a\u5b89\u88c5\u663e\u793a\u5b89\u88c5\u8fdb\u5ea6--install--verbose--hash\r\n \r\n\uff0dUvh\uff1a\u5347\u7ea7\u8f6f\u4ef6\u5305--Update\uff1b\r\n \r\n\uff0dqf\uff1a\u67e5\u627e\u6307\u5b9a\u6587\u4ef6\u5c5e\u4e8e\u54ea\u4e2aRPM\u8f6f\u4ef6\u5305[Query File]\uff1b\r\n \r\n-p\uff1a\u8868\u660e\u5bf9RPM\u5305\u8fdb\u884c\u67e5\u8be2\uff0c\u901a\u5e38\u548c\u5176\u5b83\u53c2\u6570\u540c\u65f6\u4f7f\u7528\uff0c\u5982\uff1a\r\n \r\n-qlp\uff1a\u67e5\u8be2\u67d0\u4e2aRPM\u5305\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u5217\u8868\r\n \r\n-qip\uff1a\u67e5\u8be2\u67d0\u4e2aRPM\u5305\u7684\u5185\u5bb9\u4fe1\u606f\r\n<\/pre>\n
\n

\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/www.tianfeiyu.com\/?p=1271<\/a>\u539f\u521b\uff1a\u7530\u98de\u96e8<\/span><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/rpm-use-all.html<\/a>\u7f16\u8f91\uff1a\u9676\u6b66\u6770\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb RPM\u662fLinux\u7cfb\u7edfcentos\u7cfb\u5217\u7684\u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u901a\u8fc7rpm\u53ef\u4ee5\u5feb\u901f\u7684\u5b89\u88c5\u8f6f\u4ef6\uff0c\u5728\u5b66\u4e60\u548c\u5de5\u4f5c\u7ecf\u5e38\u7528\u5230\u7684 […]<\/p>\n","protected":false},"author":63,"featured_media":85283,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-85273","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/85273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=85273"}],"version-history":[{"count":11,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/85273\/revisions"}],"predecessor-version":[{"id":288955,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/85273\/revisions\/288955"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/85283"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=85273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=85273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=85273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}