{"id":2117,"date":"2021-03-14T19:20:38","date_gmt":"2021-03-14T10:20:38","guid":{"rendered":"https:\/\/www.choco.org.uk\/chocodb\/?p=2117"},"modified":"2021-03-23T22:02:54","modified_gmt":"2021-03-23T13:02:54","slug":"%e5%9b%bd%e7%94%a3%e3%81%ae%e9%9b%84postgresql%e3%82%92%e4%bd%bf%e3%81%84%e3%81%93%e3%81%aa%e3%81%9d%e3%81%86%e3%80%80part2%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.choco.org.uk\/chocodb\/?p=2117","title":{"rendered":"\u56fd\u7523\u306e\u96c4PostgreSQL\u3092\u4f7f\u3044\u3053\u306a\u305d\u3046\u3000Part2\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p><a href=\"https:\/\/www.choco.org.uk\/chocodb\/?p=2117&amp;print=1\" title=\"\u3053\u306e\u30da\u30fc\u30b8\u3092\u5370\u5237\u3057\u307e\u3059\u3002\" rel=\"nofollow\"><img decoding=\"async\" class=\"WP-PrintIcon\" src=\"https:\/\/www.choco.org.uk\/chocodb\/wp-content\/plugins\/wp-print\/images\/print.gif\" alt=\"\u3053\u306e\u30da\u30fc\u30b8\u3092\u5370\u5237\u3057\u307e\u3059\u3002\" title=\"\u3053\u306e\u30da\u30fc\u30b8\u3092\u5370\u5237\u3057\u307e\u3059\u3002\" style=\"border: 0px;\" \/><\/a>&nbsp;<a href=\"https:\/\/www.choco.org.uk\/chocodb\/?p=2117&amp;print=1\" title=\"\u3053\u306e\u30da\u30fc\u30b8\u3092\u5370\u5237\u3057\u307e\u3059\u3002\" rel=\"nofollow\">\u3053\u306e\u30da\u30fc\u30b8\u3092\u5370\u5237\u3057\u307e\u3059\u3002<\/a><br \/>\n\uff11\uff0e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5404\uff2f\uff33\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u5fb9\u5e95\u3057\u3066Linux\u3067\u884c\u3053\u3046\u3068\u601d\u3063\u3066\u307e\u3059\u3002\uff08\u57fa\u672cCentOS\uff09<br \/>\n\u306a\u306e\u3067\u5168\u3066\u300cYUM\u300d\u304b\u300cDFY\u300d\u4e00\u767a\u3067\u3059\u3002<br \/>\n\u4f8b\uff09<br \/>\n\u2460\uff2f\uff33\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u306a\u308b<br \/>\n&gt;su<br \/>\n\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b<br \/>\n\u2461\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u8fbc\u3080<br \/>\n&gt;yum install postgresql\uff08CentOS7\uff09<br \/>\n&gt;dfy install postgresql\uff08CentOS8\uff09<\/p>\n<p>\u3053\u308c\u3067\uff2f\uff33\u6a19\u6e96\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u7d10\u3065\u3051\u3089\u308c\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\uff12\uff0e\u521d\u671f\u5316<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306eDB\u306f<span style=\"color: #ff0000;\">\u521d\u671f\u5316\u304c\u5fc5\u8981\u3067\u3059\u3002<\/span><br \/>\n\u2460PostgreSQL\u306e\u7ba1\u7406\u8005\u30e6\u30fc\u30b6\u30fc\u306b\u306a\u308b\u3002<br \/>\n&gt;su postgres<br \/>\n\u2461\u521d\u671f\u5316\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b<br \/>\n&gt;postgresql-setup initdb<\/p>\n<p>\u203bPostgreSQL\u306e\u7ba1\u7406\u8005\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068\u5fc5\u305a\u300cPostgres\u300d\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3082\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<br \/>\n\u7ba1\u7406\u8005\u30e6\u30fc\u30b6\u30fc\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u81ea\u52d5\u7684\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u7279\u306b\u64cd\u4f5c\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\uff13\uff0e\uff12\u3064\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<br \/>\n\u2460pg_hba_conf<br \/>\n\u21d2\u3053\u3044\u3064\u306f\u63a5\u7d9a\u306b\u95a2\u308f\u308b\u30d5\u30a1\u30a4\u30eb<\/p>\n<p>\u2461postgresql.conf<br \/>\n\u21d2\u3053\u3044\u3064\u306f\u8a73\u7d30\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<\/p>\n<p>\uff12\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u74b0\u5883\u306b\u3088\u3063\u3066\u3001\u3069\u3053\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u304b\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u79c1\u306f\u6700\u521d\u306b\u63a2\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n&gt;find \/ -name pg_hba.conf<br \/>\n&gt;find \/ -name postgresql.conf<\/p>\n<p>\uff2f\uff33\u306e\u300cfind\u300d\u30b3\u30de\u30f3\u30c9\u3067\u3059\u306d\u3002<\/p>\n<p>\u3010pg_hba_conf\u3011<br \/>\n&gt;vi pg_hba.conf<br \/>\nlocal all all peer<br \/>\nlocal all 127.0.0.1\/0 ident<br \/>\nlocal all all md5<\/p>\n<p>\u5927\u4f53\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u304c\u3001\u4e00\u756a\u53f3\u5074\u306e\u8a8d\u8a3c\u65b9\u5f0f\u3092\u5168\u3066\u300ctrust\u300d\u306b\u3057\u3066\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3086\u308b\u3086\u308b\u306b\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u7b11\uff09<br \/>\n\u203b\u307e\u305a\u52d5\u304f\u74b0\u5883\u3092\u4f5c\u3063\u3066\u304b\u3089\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u7de0\u3081\u308b\u65b9\u304c\u65e9\u304f\u3001\u78ba\u5b9f\u3067\u3059\u3002<br \/>\n\u4f8b\uff09<br \/>\nlocal all all trust<br \/>\nlocal all 127.0.0.1\/0 trust<br \/>\nlocal all all trust<\/p>\n<p>\u3010postgresql.conf\u3011<br \/>\n\u3053\u3044\u3064\u306f\u521d\u671f\u72b6\u614b\u3067\u306f\u4f55\u3082\u3057\u306a\u304f\u3066\u3082\u30aa\u30c3\u30b1\u30fc\u3067\u3059\u3002<\/p>\n<p>\u521d\u671f\u5316\u3082\u7d42\u308f\u3063\u3066\u3044\u308b\u306e\u3067\u8d77\u52d5\u3057\u307e\u3059\u3002<br \/>\n\u4f8b\uff09<br \/>\n&gt;systemctl start postgresql-10<br \/>\n&gt;systemctl start postgresql-12<\/p>\n<p><a href=\"\/chocodb\/?p=2173\">Part3\u30ed\u30fc\u30eb\u3068\u6a29\u9650\u306b\u7d9a\u304d\u307e\u3059<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uff11\uff0e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5404\uff2f\uff33\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u5fb9\u5e95\u3057\u3066Linux\u3067\u884c\u3053\u3046\u3068\u601d\u3063\u3066\u307e\u3059\u3002\uff08\u57fa\u672cCentOS\uff09 \u306a\u306e\u3067\u5168\u3066\u300cYUM\u300d\u304b\u300cDFY\u300d\u4e00\u767a\u3067\u3059\u3002 \u4f8b\uff09 \u2460\uff2f\uff33\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u306a\u308b &gt;su \u30d1\u30b9 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[121],"tags":[48,122,53],"class_list":["post-2117","post","type-post","status-publish","format-standard","hentry","category-rdb_postgresql","tag-postgresql","tag-user","tag-53"],"_links":{"self":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/2117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2117"}],"version-history":[{"count":6,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/2117\/revisions"}],"predecessor-version":[{"id":2177,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/2117\/revisions\/2177"}],"wp:attachment":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}