{"id":45161,"date":"2023-04-03T06:01:41","date_gmt":"2023-04-02T22:01:41","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=45161"},"modified":"2023-04-03T06:01:41","modified_gmt":"2023-04-02T22:01:41","slug":"yum-configuration-installation","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/yum-configuration-installation.html","title":{"rendered":"\u8be6\u89e3 RHEL7.1 yum\u6e90\u914d\u7f6e\u4e0e\u8f6f\u4ef6\u5b89\u88c5"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nYum\uff08\u5168\u79f0\u4e3a Yellow dog Updater, Modified\uff09\u662f\u4e00\u4e2a\u5728Fedora\u548cRedHat\u4ee5\u53caCentOS\u4e2d\u7684Shell\u524d\u7aef\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u3002\u57fa\u4e8eRPM\u5305\u7ba1\u7406\uff0c\u80fd\u591f\u4ece\u6307\u5b9a\u7684\u670d\u52a1\u5668\u81ea\u52a8\u4e0b\u8f7dRPM\u5305\u5e76\u4e14\u5b89\u88c5\uff0c\u53ef\u4ee5\u81ea\u52a8\u5904\u7406\u4f9d\u8d56\u6027\u5173\u7cfb\uff0c\u5e76\u4e14\u4e00\u6b21\u5b89\u88c5\u6240\u6709\u4f9d\u8d56\u7684\u8f6f\u4ef6\u5305\uff0c\u65e0\u987b\u7e41\u7410\u5730\u4e00\u6b21\u6b21\u4e0b\u8f7d\u3001\u5b89\u88c5\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
1.yum\u6e90\u7684\u5de5\u4f5c\u539f\u7406<\/strong><\/div>\n

YUM\u662f\u201cYellow dog Update, Modified\u201d\u7684\u7f29\u5199\uff0c\u662f\u4e00\u4e2a\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\uff0c\u56e0\u4e3aLinux\u7cfb\u7edf\u5b58\u5728\u7279\u6709\u7684\u4f9d\u8d56\u5173\u7cfb\uff0cYUM\u5c31\u662f\u4e3a\u4e86\u89e3\u51b3\u4f9d\u8d56\u5173\u7cfb\u800c\u5b58\u5728\uff0cYUM\u6e90\u76f8\u5f53\u4e00\u4e2a\u76ee\u5f55\uff0c\u5f53\u6211\u4eec\u9700\u8981\u5b89\u88c5\u4f9d\u8d56\u8f6f\u4ef6\u65f6\uff0cYUM\u4ece\u6307\u5b9a\u7684\u5730\u65b9\u81ea\u52a8\u4e0b\u8f7dRPM\u5305\u5e76\u5b89\u88c5\uff0c\u80fd\u591f\u5f88\u597d\u7684\u89e3\u51b3\u4f9d\u8d56\u5173\u7cfb\u95ee\u9898\u3002<\/p>\n

YUM\u7684\u57fa\u672c\u5de5\u4f5c\u673a\u5236\uff1a\u5728\u670d\u52a1\u5668\u4e0a\u5b58\u653e\u4e86\u6240\u6709RPM\u8f6f\u4ef6\u5305\uff0c\u7136\u540e\u4ee5\u76f8\u5173\u7684\u529f\u80fd\u53bb\u5206\u6790\u6bcf\u4e2aRPM\u6587\u4ef6\u7684\u4f9d\u8d56\u6027\u5173\u7cfb\uff0c\u5c06\u8fd9\u4e9b\u6570\u636e\u8bb0\u5f55\u6210\u6587\u4ef6\u5b58\u653e\u5728\u670d\u52a1\u5668\u7684\u67d0\u7279\u5b9a\u76ee\u5f55\u5185\uff0c\u5982\u679c\u5ba2\u6237\u7aef\u9700\u8981\u5b89\u88c5\u67d0\u4e2a\u8f6f\u4ef6\u65f6\uff0c\u5148\u4e0b\u8f7d\u670d\u52a1\u5668\u4e0a\u8bb0\u5f55\u7684\u4f9d\u8d56\u6027\u5173\u7cfb\u6587\u4ef6\uff08\u53ef\u4ee5\u901a\u8fc7www\u8fc7FTP\u65b9\u5f0f\uff09\uff0c\u901a\u8fc7\u5bf9\u670d\u52a1\u5668\u7aef\u4e0b\u8f7d\u7684\u8bb0\u5f55\u6570\u636e\u8fdb\u884c\u5206\u6790\uff0c\u7136\u540e\u53d6\u5f97\u6240\u6709\u76f8\u5173\u7684\u8f6f\u4ef6\uff0c\u4e00\u6b21\u5168\u90e8\u4e0b\u8f7d\u4e0b\u6765\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n

2.\u5982\u4f55\u5b89\u88c5\u8f6f\u4ef6<\/strong><\/div>\n
yum list all                ##\u5217\u51fa\u6240\u6709\u5b89\u8f6c\u5305\r\nyum list installed          ###\u5217\u51fa\u5df2\u7ecf\u5b89\u88c5\u7684\r\nyum list available          ###\u5217\u51fa\u6ca1\u6709\u5b89\u88c5\u7684\r\nyum remove software         ###\u5378\u8f7d\u8f6f\u4ef6\r\nyum install software        ###\u5b89\u88c5\u8f6f\u4ef6\r\nyum search \u5173\u952e\u5b57            ###\u641c\u7d22\u4e0e\u5173\u952e\u5b57\u76f8\u5173\u7684\u8f6f\u4ef6\r\nyum whatprovides \u6587\u4ef6        ###\u641c\u7d22\u5305\u542b\u6b64\u6587\u4ef6\u7684\u5305\r\nyum reinstall software      ###\u4ece\u65b0\u5b89\u88c5\u8f6f\u4ef6\r\nyum localinstall \u7b2c\u4e09\u65b9\u8f6f\u4ef6  ##\u5b89\u88c5\u8be5\u8f6f\u4ef6\u5e76\u89e3\u51b3\u4f9d\u8d56\u5173\u7cfb\r\nyum info software           ###\u67e5\u8be2\u8f6f\u4ef6\u4fe1\u606f\r\nyum groups list             ###\u5217\u51fa\u8f6f\u4ef6\u7ec4\r\nyum groups install          ###\u5b89\u88c5\u7ec4\r\nyum groups remove           ###\u5378\u8f7d\u7ec4\r\nyum groups info             ###\u67e5\u770b\u7ec4\u4fe1\u606f<\/pre>\n
3.RHEL\u5b98\u65b9\u8f6f\u4ef6\u4ed3\u5e93\u7684\u5efa\u7acb<\/strong><\/div>\n
3.1\u4e0b\u8f7d\u955c\u50cf<\/strong><\/span><\/div>\n

\u5efa\u7acb\u5b98\u65b9\u8f6f\u4ef6\u4ed3\u5e93\u9700\u8981\u4e00\u4e2a\u4e0e\u672c\u673a\u5339\u914d\u7684\u955c\u50cf\uff0c\u5b9e\u9a8c\u7684\u4e3b\u673a\u662f rhel7.1\uff0c\u6240\u4ee5\u955c\u50cf\u4e5f\u662f\u6b64\u7248\u672c\u7684\u3002
\n\"\"<\/p>\n

3.2\u6302\u8f7d\u955c\u50cf<\/strong><\/span><\/div>\n

\u5c06\u955c\u50cf\u6302\u5728\u5728\u4e00\u4e2a\u76ee\u5f55\u4e2d\uff0cdf \u53ef\u4ee5\u67e5\u770b\u662f\u5426\u6302\u8f7d\u6210\u529f\u3002
\n\"\"<\/p>\n

3.3\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/strong><\/span><\/div>\n

\u8def\u5f84\uff1a\/etc\/yum.repos.d\/rhel-dvd.repo \u6587\u4ef6,\u7cfb\u7edf\u53ea\u4f1a\u8bfb\u53d6\u4ee5.repo\u7ed3\u5c3e\u6587\u4ef6,\u540d\u5b57\u65e0\u6240\u8c13\uff0cgpgcheck=0 \u5c31\u662f\u4e0d\u8fdb\u884cgpg\u68c0\u6d4b\uff0cgpg\u68c0\u6d4b\u662f\u4f7f\u7528yum\u5b89\u88c5\u8f6f\u4ef6\u5bf9\u8f6f\u4ef6\u8f93\u5165\u516c\u94a5\u8fdb\u884c\u9a8c\u8bc1\uff0c\u770b\u6765\u6e90\u662f\u5426\u5b89\u5168\uff0cBaseurl\u662f\u6307\u5b9a\u67e5\u627e\u89e3\u51b3\u4f9d\u8d56\u5173\u7cfb\u8f6f\u4ef6\u7684\u8def\u5f84\uff0c\u56e0\u4e3a\u8fd9\u662f\u672c\u5730yum\u914d\u7f6e\uff0c\u6240\u4ee5\u4f7f\u7528\u201cfile:\/\/\u201d, \/yum\u5c31\u662f\u521a\u624d\u955c\u50cf\u7684\u6302\u8f7d\u70b9
\n\"\"<\/p>\n

3.4\u5237\u65b0\u7f13\u5b58<\/strong><\/span><\/div>\n
yum clean all<\/pre>\n

\u4f7f\u914d\u7f6e\u751f\u6548\u3002\"\"<\/p>\n

4.\u7f51\u7edcyum\u6e90\u7684\u914d\u7f6e<\/strong><\/div>\n

\u914d\u7f6e\u7f51\u7edcyum\u6e90\uff0c\u4f7f\u6211\u4eec\u5efa\u7acb\u7684yum\u4ed3\u5e93\u53ef\u4ee5\u5171\u4eab\u5230\u7f51\u7edc\u4e0a,\u53ef\u4ee5\u662f\u57fa\u4e8ehttpd\u670d\u52a1\uff0c\u4e5f\u53ef\u4ee5\u57fa\u4e8eftp\u670d\u52a1\u3002\u8fd9\u91cc\u4f7f\u7528httpd\u670d\u52a1\uff0chttpd\u662fApache\u8d85\u6587\u672c\u4f20\u8f93\u534f\u8bae\u3002<\/p>\n

4.1\u5b89\u88c5\u8f6f\u4ef6<\/strong><\/span><\/div>\n
yum install httpd -y<\/pre>\n

\u5148\u5b89\u88c5\u63d0\u4f9bhttp\u670d\u52a1\u7684httpd\u8f6f\u4ef6,\u4e5f\u53ef\u4ee5\u9a8c\u8bc1\u521a\u624d\u672c\u5730yum\u6e90\u914d\u7f6e\u662f\u5426\u6210\u529f\u3002\u5b89\u88c5\u6210\u529f\uff0c\u672c\u5730yum\u6e90\u914d\u7f6e\u6b63\u786e\u3002
\n\"\"<\/p>\n

4.2\u914d\u7f6e\u670d\u52a1\u73af\u5883<\/strong><\/span><\/div>\n

\u6253\u5f00httpd\u670d\u52a1\uff0c\u5f00\u673a\u81ea\u4e1c\u542f\u52a8\u670d\u52a1\uff0c\u5173\u95ed\u9632\u706b\u5899\u3002
\n\"\"<\/p>\n

4.3\u5efa\u7acb\u76ee\u5f55\u5e76\u6302\u8f7d\u955c\u50cf<\/strong><\/span><\/div>\n

Httpd\u9ed8\u8ba4\u53d1\u5e03\u76ee\u5f55\u662f\/var\/www\/html\/\uff0c\u76f8\u5f53\u4e8e\u6839\u76ee\u5f55\uff0c\u6240\u6709\u5171\u4eab\u7684\u6587\u4ef6\u90fd\u8981\u653e\u5728\u8fd9\u4e2a\u76ee\u5f55\u91cc\u3002\u5728\/etc\/httpd\/conf\/httpd.conf\u6587\u4ef6\u53ef\u4ee5\u67e5\u770b\u5230\u7b2c119\u884c\u3002
\n\"\"
\n\u5728\u8fd9\u4e2a\u201c\u6839\u201d\u76ee\u5f55\u5efa\u7acb\u4e00\u4e2a\u76ee\u5f55\uff0c\u5e76\u5c06\u521a\u624d\u7684\/yum\/\u5378\u8f7d\uff0c\u7136\u540e\u628a\u955c\u50cf\u6302\u8f7d\u5230\u8fd9\u4e2a\u5efa\u7acb\u7684\u76ee\u5f55\u91cc\u3002
\n\"\"<\/p>\n

4.4\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/strong><\/span><\/div>\n
vim \/etc\/yum.repos.d\/rhel-dvd.repo<\/pre>\n

\"\"
\nyum clean all \u7136\u540e\u6e05\u7406\u7f13\u5b58\uff0c\u4f7f\u914d\u7f6e\u751f\u6548\u3002<\/p>\n

4.5\u5f00\u673a\u81ea\u52a8\u6302\u8f7d\u955c\u50cf<\/strong><\/span><\/div>\n

\u5f00\u673a\u81ea\u52a8\u6302\u8f7d\u955c\u50cf\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u6bcf\u6b21\u5f00\u673a\u76f4\u63a5\u5b89\u88c5\u66f4\u65b0\u8f6f\u4ef6,\u5e76\u4e14\u81ea\u52a8\u5171\u4eabyum\u4ed3\u5e93\uff0c\u5728\/etc\/fstab \u6587\u4ef6\u6700\u540e\u6dfb\u52a0\u4e00\u884c\u547d\u4ee4\u3002
\n\"\"
\n\u4ee5\u540e\u5f53\u6211\u4eec\u91cd\u542f\u65f6\uff0c\u7cfb\u7edf\u5f00\u673a\u4f1a\u8bfb\u53d6\/etc\/fstab\u6587\u4ef6\uff0c\u5e2e\u6211\u4eec\u6302\u8f7d\u4e0a\u955c\u50cf\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u4e00\u52b3\u6c38\u9038\u4e86\u3002<\/p>\n

4.6\u9a8c\u8bc1\u914d\u7f6e<\/strong><\/span><\/div>\n

\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8f93\u5165172.25.98.250\/yumsource\uff0c\u5c31\u53ef\u4ee5\u770b\u5230\u6211\u4eec\u914d\u7f6e\u7684\u7f51\u7edcyum\u6e90\u3002
\n\"\"<\/p>\n

5.yum\u8f6f\u4ef6\u63a7\u5236<\/strong><\/div>\n
vim \/etc\/yum.conf<\/pre>\n

\u6dfb\u52a0\u5982\u4e0b\u547d\u4ee4,\u8ba9search\u8f6f\u4ef6\u65f6,\u5c31\u4f1a\u81ea\u52a8\u8fc7\u6ee4\u3002<\/p>\n

exclude=*.x86_64    ###\u5ffd\u756564\u4f4d\u5b89\u88c5\u5305\r\nexclude=*.i686      ###\u5ffd\u756532\u4f4d\u5b89\u88c5\u5305<\/pre>\n
6.rpm\u547d\u4ee4<\/strong><\/div>\n

\u5f53\u6211\u4eec\u8981\u5b89\u88c5\u7684\u8f6f\u4ef6\u5b98\u65b9\u955c\u50cf\u4e2d\u6ca1\u6709\u65f6\uff0c\u6211\u4eec\u5c31\u9700\u8981\u5728\u7f51\u4e0a\u4e0b\u8f7d\u4e00\u4e2arpm\u5305\u3002
\n\"\"<\/p>\n

rpm     ###\u5e95\u5c42\u8f6f\u4ef6\u7ba1\u7406\u5de5\u5177\r\n    -i  ###install\r\n    -v  ###\u663e\u793a\u4fe1\u606f\r\n    -h  ###\u6307\u5b9a\u5305\u7684\u89e3\u5bc6\u65b9\u5f0f\u4e3ahash\r\n    -q  ###\u67e5\u8be2\r\n    -p  ###\u6307\u5b9a\u8f6f\u4ef6\u5305\u672c\u8eab\r\n    -l  ###\u5217\u51fa\u8f6f\u4ef6\u4e2d\u6587\u4ef6\u7684\u540d\u5b57\r\n    --scripts   ###\u67e5\u770b\u8f6f\u4ef6\u5b89\u88c5\u548c\u5378\u8f7d\u8fc7\u7a0b\u4e2d\u6240\u6267\u884c\u7684\u52a8\u4f5c\r\n    -f  ###\u67e5\u8be2\u67d0\u4e2a\u6587\u4ef6\u5c5e\u4e8e\u90a3\u4e2a\u5b89\u88c5\u5305\r\n    -a  ###\u6240\u6709\r\n    -e  ###\u5378\u8f7d\r\n    --force ###\u5f3a\u5236\r\n    --nodeps ###\u5ffd\u7565\u4f9d\u8d56\u6027\r\n    -c  ###\u914d\u7f6e\u6587\u4ef6\r\n    rpm2cpio \u8f6f\u4ef6\u540d | cpio -id ###\u5c06\u8f6f\u4ef6\u5305\u6309\u76ee\u5f55\u62c6\u5f00<\/pre>\n

\u5b89\u88c5wps\uff1a<\/p>\n

rpm  -ihp    wps-office-10.1.0.5672-1.a21.x86_64.rpm<\/pre>\n

\u5982\u679c\u51fa\u73b0\u4e00\u4e9b\u4f9d\u8d56\u9879\uff0c\u5c31\u4e00\u4e2a\u4e00\u4e2a\u627e\u5230\u63d0\u4f9b\u8fd9\u4e9b\u4f9d\u8d56\u5173\u7cfb \u7684\u8f6f\u4ef6\u5b89\u88c5\u5c31\u53ef\u4ee5\u4e86\uff0c\u6216\u8005\u642d\u5efa\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u4ed3\u5e93\uff0c\u5c31\u4f1a\u4f1a\u81ea\u52a8\u5e2e\u6211\u4eec\u5b89\u88c5\u4f9d\u8d56\u9879\u3002<\/p>\n

7.\u642d\u5efa\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u4ed3\u5e93<\/strong><\/div>\n
\u628a\u6240\u6709rpm\u5305\u653e\u5230\u6307\u5b9a\u76ee\u5f55\u4e2d\uff0c\u6bd4\u5982\u653e\u5230\/software\u4e2d <\/strong><\/span><\/div>\n

\"\"<\/p>\n

7.2\u751f\u6210repodate\u76ee\u5f55<\/strong><\/span><\/div>\n
createrepo \/software        ##\u5728\u5efa\u7acb\u7684\u4ed3\u5e93\u76ee\u5f55\u4e2d\u6267\u884c,\u5c31\u4f1a\u751f\u6210repodate\u76ee\u5f55<\/pre>\n

\"\"<\/p>\n

7.3\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/strong><\/span><\/div>\n

\u5728\/etc\/yum.repos.d\/xxx.repo\u7f16\u5199\u6307\u5b9a\/software\u7684yum\u6e90\u3002
\n\"\"<\/p>\n

7.4\u4f7f\u914d\u7f6e\u751f\u6548<\/strong><\/span><\/div>\n

\u6e05\u7406\u7f13\u5b58\uff0c\u4f7f\u914d\u7f6e\u751f\u6548\u3002<\/p>\n

yum repolist all  ##\u5217\u51fa\u4ed3\u5e93\u5217\u8868<\/pre>\n

\u53ef\u4ee5\u770b\u5230\u4e24\u4e2a\u201c\u4ed3\u5e93\u201d,\u4e00\u4e2a\u662f\u7528\u955c\u50cf\u5efa\u7acb\u7684\u5b98\u65b9\u4ed3\u5e93,\u4e00\u4e2a\u662f\u5efa\u7acb\u7684\u7b2c\u4e09\u65b9\u4ed3\u5e93\u3002
\n\"\"
\n\u642d\u5efa\u597d\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u4ed3\u5e93\u540e,\u7528yum\u5b89\u88c5\u8be5\u4ed3\u5e93\u8f6f\u4ef6\u65f6\u4f1a\u81ea\u52a8\u5e2e\u52a9\u6211\u4eec\u89e3\u51b3\u4f9d\u8d56\u9879\u95ee\u9898\u3002<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/blog.csdn.net\/men_wen\/article\/details\/52444351?locationNum=11&fps=1<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/yum-configuration-installation.html<\/a>\u7f16\u8f91\uff1a\u51af\u632f\u534e\uff0c\u5ba1\u6838\u5458\uff1a\u82cf\u897f\u4e91<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb Yum\uff08\u5168\u79f0\u4e3a Yellow dog Updater, Modified\uff09\u662f\u4e00\u4e2a\u5728Fedora\u548cRedH […]<\/p>\n","protected":false},"author":63,"featured_media":45180,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-45161","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\/45161","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=45161"}],"version-history":[{"count":7,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/45161\/revisions"}],"predecessor-version":[{"id":268708,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/45161\/revisions\/268708"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/45180"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=45161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=45161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=45161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}