{"id":19265,"date":"2016-08-12T06:48:04","date_gmt":"2016-08-11T22:48:04","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2016\/08\/12\/%e5%88%a9%e7%94%a8-cat-%e6%8c%87%e4%bb%a4%e5%bb%ba%e7%ab%8b%e6%aa%94%e6%a1%88\/"},"modified":"2016-08-12T06:48:04","modified_gmt":"2016-08-11T22:48:04","slug":"%e5%88%a9%e7%94%a8-cat-%e6%8c%87%e4%bb%a4%e5%bb%ba%e7%ab%8b%e6%aa%94%e6%a1%88","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2016\/08\/12\/%e5%88%a9%e7%94%a8-cat-%e6%8c%87%e4%bb%a4%e5%bb%ba%e7%ab%8b%e6%aa%94%e6%a1%88\/","title":{"rendered":"\u5229\u7528 cat \u6307\u4ee4\u5efa\u7acb\u6a94\u6848"},"content":{"rendered":"<p>\u5728 Shell Script\u00a0\u4e2d\u5229\u7528 cat\u00a0\u6307\u4ee4\u5efa\u7acb\u8a2d\u5b9a\u6a94<br \/># <span style=\"color: #ff0000;\">cat createepelrepo.sh<\/span><br \/><span style=\"color: #0000ff;\">#!\/bin\/bash<\/span><br \/><span style=\"color: #0000ff;\">cat &gt; \/etc\/yum.repos.d\/epel.repo &lt;&lt; <span style=\"color: #ff0000;\">&#8220;<\/span>END<span style=\"color: #ff0000;\">&#8220;<\/span><\/span><br \/><span style=\"color: #0000ff;\">[epel]<\/span><br \/><span style=\"color: #0000ff;\">name=Extra Packages for Enterprise Linux 7 &#8211; $basearch<\/span><br \/><span style=\"color: #0000ff;\">#baseurl=http:\/\/download.fedoraproject.org\/pub\/epel\/7\/$basearch<\/span><br \/><span style=\"color: #0000ff;\">mirrorlist=https:\/\/mirrors.fedoraproject.org\/metalink?repo=epel-7&amp;arch=$basearch<\/span><br \/><span style=\"color: #0000ff;\">failovermethod=priority<\/span><br \/><span style=\"color: #0000ff;\">enabled=0<\/span><br \/><span style=\"color: #0000ff;\">gpgcheck=1<\/span><br \/><span style=\"color: #0000ff;\">gpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-7<\/span><\/p>\n<p><span style=\"color: #0000ff;\">[epel-debuginfo]<\/span><br \/><span style=\"color: #0000ff;\">name=Extra Packages for Enterprise Linux 7 &#8211; $basearch &#8211; Debug<\/span><br \/><span style=\"color: #0000ff;\">#baseurl=http:\/\/download.fedoraproject.org\/pub\/epel\/7\/$basearch\/debug<\/span><br \/><span style=\"color: #0000ff;\">mirrorlist=https:\/\/mirrors.fedoraproject.org\/metalink?repo=epel-debug-7&amp;arch=$basearch<\/span><br \/><span style=\"color: #0000ff;\">failovermethod=priority<\/span><br \/><span style=\"color: #0000ff;\">enabled=0<\/span><br \/><span style=\"color: #0000ff;\">gpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-7<\/span><br \/><span style=\"color: #0000ff;\">gpgcheck=1<\/span><\/p>\n<p><span style=\"color: #0000ff;\">[epel-source]<\/span><br \/><span style=\"color: #0000ff;\">name=Extra Packages for Enterprise Linux 7 &#8211; $basearch &#8211; Source<\/span><br \/><span style=\"color: #0000ff;\">#baseurl=http:\/\/download.fedoraproject.org\/pub\/epel\/7\/SRPMS<\/span><br \/><span style=\"color: #0000ff;\">mirrorlist=https:\/\/mirrors.fedoraproject.org\/metalink?repo=epel-source-7&amp;arch=$basearch<\/span><br \/><span style=\"color: #0000ff;\">failovermethod=priority<\/span><br \/><span style=\"color: #0000ff;\">enabled=0<\/span><br \/><span style=\"color: #0000ff;\">gpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-7<\/span><br \/><span style=\"color: #0000ff;\">gpgcheck=1<\/span><br \/><span style=\"color: #0000ff;\">END<\/span>[@more@]2.\u00a0\u6539\u8b8a\u6a94\u6848\u57f7\u884c\u6b0a\u9650<br \/># <span style=\"color: #ff0000;\">chmod +x createepelrepo.sh<\/span><\/p>\n<p>3.\u00a0\u76ee\u524d\u6c92\u6709 epel.repo\u00a0\u8a2d\u5b9a\u6a94<br \/># <span style=\"color: #ff0000;\">ls -l \/etc\/yum.repos.d\/epel.repo<\/span><br \/><span style=\"color: #0000ff;\">ls: cannot access \/etc\/yum.repos.d\/epel.repo: No such file or directory<\/span><\/p>\n<p>4.\u00a0\u57f7\u884c createepelrepo.sh<br \/># <span style=\"color: #ff0000;\">.\/createepelrepo.sh<\/span><\/p>\n<p>5.\u00a0\u6aa2\u67e5\u662f\u5426\u6709\u7522\u751f\u8a2d\u5b9a\u6a94<br \/># <span style=\"color: #ff0000;\">ls -l \/etc\/yum.repos.d\/epel.repo<\/span><br \/><span style=\"color: #0000ff;\">-rw-r&#8211;r&#8211;. 1 root root 957 Jan 24\u00a0 2015 \/etc\/yum.repos.d\/epel.repo<\/span><\/p>\n<p>6.\u00a0\u67e5\u770b\u5167\u5bb9\u662f\u5426\u6b63\u78ba<br \/># <span style=\"color: #ff0000;\">cat \/etc\/yum.repos.d\/epel.repo<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Shell Script\u00a0\u4e2d\u5229\u7528 cat\u00a0\u6307\u4ee4\u5efa\u7acb\u8a2d\u5b9a\u6a94# cat createepelrepo.sh#! &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2016\/08\/12\/%e5%88%a9%e7%94%a8-cat-%e6%8c%87%e4%bb%a4%e5%bb%ba%e7%ab%8b%e6%aa%94%e6%a1%88\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008\u5229\u7528 cat \u6307\u4ee4\u5efa\u7acb\u6a94\u6848\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117],"tags":[],"class_list":["post-19265","post","type-post","status-publish","format-standard","hentry","category-c-78462"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["649089"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19265"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=19265"}],"version-history":[{"count":0,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19265\/revisions"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}