{"id":4521,"date":"2013-06-17T20:24:22","date_gmt":"2013-06-17T12:24:22","guid":{"rendered":"http:\/\/jpuyy.com\/?p=4521"},"modified":"2019-08-11T23:24:02","modified_gmt":"2019-08-11T15:24:02","slug":"yum-usage","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=4521","title":{"rendered":"yum\u4f7f\u7528\u65b9\u6cd5"},"content":{"rendered":"<p>\u5c06\u670d\u52a1\u5668\u4e0a\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\u5728\u672c\u5730\u7f13\u5b58,\u63d0\u9ad8\u641c\u7d22\u548c\u5b89\u88c5\u8f6f\u4ef6\u7684\u901f\u5ea6<\/p>\n<pre>yum makecache<\/pre>\n<p>\u5217\u51fa\u6240\u6709\u53ef\u66f4\u65b0\u7684\u8f6f\u4ef6\u6e05\u5355<\/p>\n<pre>yum check-update<\/pre>\n<p>\u5b89\u88c5\u6240\u6709\u66f4\u65b0\u8f6f\u4ef6<\/p>\n<pre>yum update httpd<\/pre>\n<p>\u5b89\u88c5\u6307\u5b9a\u7684\u8f6f\u4ef6<\/p>\n<pre>yum install httpd<\/pre>\n<p>\u4ec5\u66f4\u65b0\u6307\u5b9a\u7684\u8f6f\u4ef6<\/p>\n<pre>yum update<\/pre>\n<p>\u5217\u51fa\u53ef\u5b89\u88dd\u7684\u8f6f\u4ef6\u6e05\u5355<\/p>\n<pre>yum list<\/pre>\n<p>\u5217\u51fa\u73b0\u6709\u7684repo<\/p>\n<pre>yum repolist<\/pre>\n<p>\u5217\u51fa\u5df2\u7ecf\u5b89\u88c5\u7684\u8f6f\u4ef6\u6e05\u5355<\/p>\n<pre>yum list installed<\/pre>\n<p>\u5217\u51fahttpd\u5b89\u88c5\u4fe1\u606f<\/p>\n<pre>yum list httpd<\/pre>\n<p>\u4f7f\u7528yum\u5220\u9664\u8f6f\u4ef6<\/p>\n<pre>yum remove httpd<\/pre>\n<p>\u91cd\u7f6eyum\u6e90<\/p>\n<pre>yum clean all<\/pre>\n<p>\u5217\u51fa\u6240\u6709\u5df2\u5b89\u88c5\u4f46\u4e0d\u5728Yum Repository\u5185\u7684\u8f6f\u4ef6\u5305<\/p>\n<pre>yum list extras<\/pre>\n<p>\u6267\u884c\u591a\u6761yum\u547d\u4ee4\u65f6\u53ef\u4ee5\u4f7f\u7528yum shell\u5f00\u542fshell\uff0c\u7136\u540e\u8fd0\u884crun\u6267\u884c\uff0c\u5982<\/p>\n<pre># yum shell\n&gt; remove mysql mysql-libs mysql-devel mysql-server\n&gt; install mariadb mariadb-libs mariadb-devel mariadb-server\n&gt; run\n^D<\/pre>\n<p>ec2 AMI\u4e0a\u5b89\u88c5 nodejs<\/p>\n<pre>yum install nodejs npm --enablerepo=epel<\/pre>\n<p>\u4f7f\u7528\u963f\u91cc\u4e91 CentOS7<\/p>\n<pre># centos7\ncurl -o \/etc\/yum.repos.d\/CentOS-Base.repo http:\/\/mirrors.aliyun.com\/repo\/Centos-7.repo\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5c06\u670d\u52a1\u5668\u4e0a\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\u5728\u672c\u5730\u7f13\u5b58,\u63d0\u9ad8\u641c\u7d22\u548c\u5b89\u88c5\u8f6f\u4ef6\u7684\u901f\u5ea6 yum makecache \u5217\u51fa\u6240\u6709\u53ef\u66f4\u65b0\u7684\u8f6f\u4ef6\u6e05\u5355 yum check-update \u5b89\u88c5\u6240\u6709\u66f4\u65b0\u8f6f\u4ef6 yum update httpd \u5b89\u88c5\u6307\u5b9a\u7684\u8f6f\u4ef6 yum install httpd \u4ec5\u66f4\u65b0\u6307\u5b9a\u7684\u8f6f\u4ef6 yum update \u5217\u51fa\u53ef\u5b89\u88dd\u7684\u8f6f\u4ef6\u6e05\u5355 yum list \u5217\u51fa\u73b0\u6709\u7684repo yum repolist \u5217\u51fa\u5df2\u7ecf\u5b89\u88c5\u7684\u8f6f\u4ef6\u6e05\u5355 yum list installed \u5217\u51fahttpd\u5b89\u88c5\u4fe1\u606f yum list httpd \u4f7f\u7528yum\u5220\u9664\u8f6f\u4ef6 yum remove httpd \u91cd\u7f6eyum\u6e90 yum clean all \u5217\u51fa\u6240\u6709\u5df2\u5b89\u88c5\u4f46\u4e0d\u5728Yum Repository\u5185\u7684\u8f6f\u4ef6\u5305 yum list extras \u6267\u884c\u591a\u6761yum\u547d\u4ee4\u65f6\u53ef\u4ee5\u4f7f\u7528yum shell\u5f00\u542fshell\uff0c\u7136\u540e\u8fd0\u884crun\u6267\u884c\uff0c\u5982 # yum shell &gt; remove mysql mysql-libs mysql-devel mysql-server [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-4521","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/4521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4521"}],"version-history":[{"count":14,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/4521\/revisions"}],"predecessor-version":[{"id":8567,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/4521\/revisions\/8567"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}