{"id":1367,"date":"2014-10-07T09:58:02","date_gmt":"2014-10-07T00:58:02","guid":{"rendered":"http:\/\/www.skyarch.net\/blog\/?p=1367"},"modified":"2020-06-25T11:17:46","modified_gmt":"2020-06-25T02:17:46","slug":"redhat-instance-%e3%81%a7-yum-%e3%81%8c%e4%bd%bf%e3%81%88%e3%81%aa%e3%81%84%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/redhat-instance-%e3%81%a7-yum-%e3%81%8c%e4%bd%bf%e3%81%88%e3%81%aa%e3%81%84%ef%bc%81\/","title":{"rendered":"redhat instance \u3067 yum \u304c\u4f7f\u3048\u306a\u3044\uff01"},"content":{"rendered":"<p>RHEL\u306e\u691c\u8a3c\u304c\u3057\u305f\u3044\uff01\u3063\u3066\u3044\u3046\u6642\u306b\u3061\u3087\u3063\u3068\u524d\u306a\u3089\u74b0\u5883\u306e\u69cb\u7bc9\u304c\u5104\u52ab\u3067\u3057\u305f\u304c\u3001\u30af\u30e9\u30a6\u30c9\u304c\u4e00\u822c\u7684\u306b\u306a\u3063\u305f\u4eca\u3067\u306f\u5404\u7a2eOS\u6bce\u306e\u691c\u8a3c\u304c\u5927\u5206\u697d\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u304a\u307e\u3051\u306b\u3001\u65b0\u898f\u30a2\u30ab\u30a6\u30f3\u30c8\u3067micro\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f7f\u3048\u307012\u30f6\u6708\u7121\u6599\u3067\u691c\u8a3c\u304c\u51fa\u6765\u308b\u306e\u3067\u610f\u8b58\u304c\u9ad8\u3044\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u304a\u8ca1\u5e03\u306b\u3082\u512a\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u4f46\u3057\u3001\u305d\u306e\u307e\u307e\u6d88\u3057\u5fd8\u308c\u308b\u3068\u5fd8\u308c\u305f\u9803\u306b\u8acb\u6c42\u304c\u6765\u308b\u306e\u3067\u3054\u5229\u7528\u306f\u8a08\u753b\u7684\u306b\u3002\u3002\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u4eca\u65e5\u306fAWS\u3067RHEL\u3092\u4f7f\u3063\u3066\u3044\u308b\u969b\u306b\u767a\u751f\u3057\u305fAWS\u306a\u3089\u3067\u306f\u306e\u554f\u984c\u306b\u3064\u3044\u3066\u3067\u3059\u3002\u6700\u8fd1\u306fAWS\u3067\u3082\u5bfe\u7b56\u304c\u9032\u3093\u3067\u3044\u308b\u305f\u3081\u3001\u767a\u751f\u983b\u5ea6\u306f\u4e0b\u304c\u3063\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001<\/p>\n<p>RHEL\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u304b\u3089\u300cbillingProducts\u300d\u304c\u5916\u308c\u308b\u3068\u3044\u3046\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f55\u304c\u554f\u984c\u306b\u306a\u308b\u304b\u3068\u3044\u3046\u3068\u3001yum \u30b3\u30de\u30f3\u30c9\u306e\u5229\u7528\u304c\u51fa\u6765\u306a\u304f\u306a\u308b\u70b9\u3067\u3059\u3002<br \/>\n\u3053\u308c\u306f AWS\u304c\u4e0a\u8a18\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u8a8d\u8a3c\u60c5\u5831\u3068\u3057\u3066\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u539f\u56e0\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u6d41\u77f3\u306b\u3053\u306e\u307e\u307e\u3067\u306f\u904b\u7528\u304c\u51fa\u6765\u306a\u3044\u306e\u3067\u4eca\u56de\u306f\u3053\u306e\u554f\u984c\u306e\u89e3\u6c7a\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u307e\u305a\u306f\u30e1\u30bf\u30c7\u30fc\u30bf\u304c\u5916\u308c\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4f8b\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>\u30e1\u30bf\u30c7\u30fc\u30bf\u304c\u5916\u308c\u3066\u3044\u308bRHEL<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<blockquote><p># curl http:\/\/169.254.169.254\/latest\/dynamic\/instance-identity\/document<\/p>\n<p>{<br \/>\n\"accountId\" : \"xxxxxxxxxxxx\",<br \/>\n\"instanceId\" : \"i-xxxxxxxxx\",<br \/>\n<span style=\"color: #ff0000;\">\"billingProducts\" : null,<\/span><br \/>\n\"imageId\" : \"ami-xxxxxxxx\",<br \/>\n\"pendingTime\" : \"2014-05-09T02:57:56Z\",<br \/>\n\"instanceType\" : \"m1.medium\",<br \/>\n\"architecture\" : \"x86_64\",<br \/>\n\"kernelId\" : \"aki-dc0f82dd\",<br \/>\n\"ramdiskId\" : null,<br \/>\n\"region\" : \"ap-northeast-1\",<br \/>\n\"version\" : \"2010-08-31\",<br \/>\n\"availabilityZone\" : \"ap-northeast-1c\",<br \/>\n\"privateIp\" : \"172.31.xxx.xxx\",<br \/>\n\"devpayProductCodes\" : null<br \/>\n#<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>\u4e0a\u8a18\u72b6\u614b\u3060\u3068\u3001yum\u30b3\u30de\u30f3\u30c9\u304c\u30a8\u30e9\u30fc\u306b\u306a\u308b<\/li>\n<\/ul>\n<blockquote><p># yum search httpd<br \/>\nLoaded plugins: amazon-id, rhui-lb, security<br \/>\nhttps:\/\/rhui2-cds02.ap-northeast-1.aws.ce.redhat.com\/pulp\/repos\/\/rhui-client-config\/rhel\/server\/6\/x86_64\/os\/repodata\/repomd.xml: <span style=\"color: #ff0000;\">[Errno 14] PYCURL ERROR 22 - \"The requested URL returned error: 401<\/span> <span style=\"color: #ff0000;\">Authorization Required<\/span>\"<br \/>\nTrying other mirror.<br \/>\nhttps:\/\/rhui2-cds01.ap-northeast-1.aws.ce.redhat.com\/pulp\/repos\/\/rhui-client-config\/rhel\/server\/6\/x86_64\/os\/repodata\/repomd.xml: <span style=\"color: #ff0000;\">[Errno 14] PYCURL ERROR 22 - \"The requested URL returned error: 401 Authorization Required<\/span>\"<br \/>\nTrying other mirror.<br \/>\nError: Cannot retrieve repository metadata (repomd.xml) for repository: rhui-ap-northeast-1-client-config-server-6. Please verify its path and try again<br \/>\n#<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>\u8a8d\u8a3c\u304c\u5fc5\u8981\u3060\u3068\u6012\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u539f\u56e0\u304c\u5206\u304b\u3063\u305f\u6642\u306f\u4f5c\u6210\u3057\u76f4\u3057\u304b\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u5b9f\u969b\u306b\u306f\u7d50\u69cb\u7c21\u5358\u306b\u623b\u305b\u307e\u3059\u3002\u305f\u3060\u3001\u4f5c\u696d\u306f\u5341\u5206\u30ea\u30b9\u30af\u304c\u4f34\u3044\u307e\u3059\u306e\u3067\u304f\u308c\u3050\u308c\u3082\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u7b49\u3092\u884c\u3063\u3066\u304b\u3089\u4f5c\u696d\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>\u89e3\u6c7a\u65b9\u6cd5<\/li>\n<\/ul>\n<ol>\n<li>\u30e1\u30bf\u30c7\u30fc\u30bf\u304c\u5916\u308c\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9(A)\u3068\u306f\u5225\u306b\u65b0\u898f\u306bRHEL\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9(B)\u3092\u4f5c\u6210\u3059\u308b<\/li>\n<li>A,B\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u5171\u306b stop \u72b6\u614b\u306b\u3059\u308b<\/li>\n<li>A\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30eb\u30fc\u30c8\u30dc\u30ea\u30e5\u30fc\u30e0\u306eattach device \u3092\u78ba\u8a8d\u3059\u308b (\/dev\/sda \u7b49\u3002\u3042\u3068\u3067\u4f7f\u3044\u307e\u3059)<\/li>\n<li>A,B\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e \u30eb\u30fc\u30c8\u30dc\u30ea\u30e5\u30fc\u30e0\u3092detach<\/li>\n<li>A\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30eb\u30fc\u30c8\u30dc\u30ea\u30e5\u30fc\u30e0\u3092B\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306battach\u3059\u308b (3\u3067\u30e1\u30e2\u3063\u305f device\u3092\u6307\u5b9a)<\/li>\n<li>B\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092 start\u3059\u308b<\/li>\n<li>B\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u30ed\u30b0\u30a4\u30f3\u51fa\u6765\u308c\u3070OK<\/li>\n<\/ol>\n<p>\u65e9\u3051\u308c\u3070\u30015\u5206\u7a0b\u5ea6\u3067\u7d42\u308f\u308b\u4f5c\u696d\u3067\u3059\u3002<\/p>\n<p>\u4e0a\u8a18\u5bfe\u5fdc\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068\u30fb\u30fb\u30fb\u30fb<\/p>\n<blockquote><p># curl http:\/\/169.254.169.254\/latest\/dynamic\/instance-identity\/document<br \/>\n{<br \/>\n\"accountId\" : \"xxxxxxxxxxxx\",<br \/>\n\"instanceId\" : \"i-xxxxxxxxx\",<br \/>\n<span style=\"color: #0000ff;\">\"billingProducts\" : [ \"bp-xxxxxxxx\" ],<\/span><br \/>\n\"imageId\" : \"ami-xxxxxxxx\",<br \/>\n\"pendingTime\" : \"2014-05-09T02:57:56Z\",<br \/>\n\"instanceType\" : \"m1.medium\",<br \/>\n\"architecture\" : \"x86_64\",<br \/>\n\"kernelId\" : \"aki-dc0f82dd\",<br \/>\n\"ramdiskId\" : null,<br \/>\n\"region\" : \"ap-northeast-1\",<br \/>\n\"version\" : \"2010-08-31\",<br \/>\n\"availabilityZone\" : \"ap-northeast-1c\",<br \/>\n\"privateIp\" : \"172.31.xxx.xxx\",<br \/>\n\"devpayProductCodes\" : null<br \/>\n#<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>\u304d\u3061\u3093\u3068\u30e1\u30bf\u30c7\u30fc\u30bf\u306bbillingProducts ID\u304c\u4ed8\u4e0e\u3055\u308c\u3001yum \u30b3\u30de\u30f3\u30c9\u3082\u554f\u984c\u306a\u304f\u5229\u7528\u304c\u51fa\u6765\u308b\u4e8b\u3092\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p>\u306a\u304a\u3001\u4f5c\u696d\u5f8c\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306fhostname \u7b49\u306e\u30e6\u30cb\u30fc\u30af\u306a\u60c5\u5831\u306f\u5909\u308f\u3063\u3066\u3044\u308b\u306e\u3067\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u5143\u306b\u623b\u3057\u3066\u304f\u3060\u3055\u3044\u3002instanceId\u3082\u5f53\u7136\u5909\u308f\u3063\u3066\u307e\u3059\u3002<\/p>\n<p>\u6b8b\u3063\u305fA\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u4e0d\u8981\u306a\u306e\u3067\u3001stop \u3067\u3082 terminate\u3067\u3082OK\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u4f59\u8ac7\u3067\u3059\u304c\u3001<\/p>\n<p>billingProducts\u304c\u5916\u308c\u3066\u3044\u308b\u3068 RHEL\u3067\u8cfc\u5165\u3057\u305fRI\u306e\u5272\u5f15\u306e\u9069\u7528\u304c\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>RHEL\u306e\u691c\u8a3c\u304c\u3057\u305f\u3044\uff01\u3063\u3066\u3044\u3046\u6642\u306b\u3061\u3087\u3063\u3068\u524d\u306a\u3089\u74b0\u5883\u306e\u69cb\u7bc9\u304c\u5104\u52ab\u3067\u3057\u305f\u304c\u3001\u30af\u30e9\u30a6\u30c9\u304c\u4e00\u822c\u7684\u306b\u306a\u3063\u305f\u4eca\u3067\u306f\u5404\u7a2eOS\u6bce\u306e\u691c\u8a3c\u304c\u5927\u5206\u697d\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u304a\u307e\u3051\u306b\u3001\u65b0\u898f\u30a2\u30ab\u30a6\u30f3\u30c8\u3067micro\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f7f\u3048\u307012\u30f6\u6708\u7121\u6599\u3067\u691c\u8a3c\u304c&#8230;<\/p>\n","protected":false},"author":1,"featured_media":223,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"http:\/\/www.skyarch.net\/blog\/?p=1367","footnotes":""},"categories":[20,19],"tags":[],"class_list":{"0":"post-1367","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-aws","8":"category-19","9":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/1367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=1367"}],"version-history":[{"count":17,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/1367\/revisions"}],"predecessor-version":[{"id":18728,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/1367\/revisions\/18728"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media\/223"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=1367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=1367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=1367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}