{"id":290666,"date":"2024-03-31T21:25:09","date_gmt":"2024-03-31T13:25:09","guid":{"rendered":"https:\/\/lrxjmw.cn\/xtglzbklhjxa.html"},"modified":"2024-03-31T21:25:09","modified_gmt":"2024-03-31T13:25:09","slug":"xtglzbklhjxa","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/xtglzbklhjxa.html","title":{"rendered":"\u7cfb\u7edf\u7ba1\u7406\u8005\u5fc5\u770b\uff01Linux\u73af\u5883\u4e0b\u5b89\u88c5\u914d\u7f6ePostgreSQL 9\u5168\u653b\u7565"},"content":{"rendered":"
\u8eab\u4e3a\u4e00\u4f4d\u70ed\u8877\u4e8e\u79d1\u6280\u7684\u8d44\u6df1\u7cfb\u7edf<\/a>\u7ba1\u7406\u8005\uff0c\u5f88\u8363\u5e78\u6709\u673a\u4f1a\u5206\u4eab\u6211\u5bf9Linux<\/a>\u7cfb\u7edf\u5982\u4f55\u5b89\u88c5\u5e76\u914d\u7f6ePostgreSQL 9\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u7684\u6df1\u5165\u7406\u89e3\u3002\u5728\u6b64\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5c06\u8be6\u7ec6\u9610\u8ff0\u5728Linux\u73af\u5883\u4e2d\u5b89\u88c5PostgreSQL 9\u7684\u65b9\u6cd5\u7ea2\u65d7 linux\uff0c\u5176\u4e2d\u5305\u62ec\u524d\u671f\u51c6\u5907\u3001\u8f6f\u4ef6\u4e0b\u8f7d\u3001\u5b89\u88c5\u8fc7\u7a0b\u4ee5\u53ca\u914d\u7f6e\u7ec6\u8282\u7b49\u7b49\u65b9\u9762\uff0c\u671f\u671b\u80fd\u4e3a\u5e7f\u5927\u6280\u672f\u540c\u4ec1\u63d0\u4f9b\u5b9e\u8d28\u6027\u7684\u6307\u5bfc\u4e0e\u53c2\u8003\u3002<\/p>\n \u51c6\u5907\u5de5\u4f5c<\/b><\/p>\n \u5728\u5b89\u88c5PostgreSQL9\u524d\u9700\u8fdb\u884c\u4e00\u7cfb\u5217\u5fc5\u8981\u51c6\u5907\u3002\u9996\u8981\u6761\u4ef6\u662f\u5177\u5907root\u6743\u9650\u6216\u80fd\u591f\u4f7f\u7528sudo\u6307\u4ee4\u3002\u5176\u6b21\uff0c\u786e\u8ba4\u5e76\u6ee1\u8db3\u7cfb\u7edf\u76f8\u5173\u7684\u786c\u4ef6\u53ca\u8f6f\u4ef6\u8bbe\u65bd\u9700\u6c42\uff0c\u786e\u4fdd\u7cfb\u7edf\u53ef\u987a\u5229\u5b9e\u65bd\u6b64\u6b21\u5b89\u88c5\u3002\u540c\u65f6\uff0c\u5f3a\u70c8\u63a8\u8350\u5b89\u88c5\u524d\u5bf9\u5173\u952e\u6570\u636e\u8fdb\u884c\u5907\u4efd\uff0c\u907f\u514d\u56e0\u610f\u5916\u4e8b\u6545\u5bfc\u81f4\u7684\u5b9d\u8d35\u6570\u636e\u635f\u5931\u3002<\/p>\n \u8f6f\u4ef6\u4e0b\u8f7d<\/b><\/p>\n \u5f85\u524d\u671f\u7b79\u5907\u5b8c\u5907\u540e\uff0c\u8bf7\u52a1\u5fc5\u4e0b\u8f7dPostgreSQL9\u7684\u5b89\u88c5\u7a0b\u5e8f\u3002\u53ef\u4ece\u5b98\u65b9\u7ad9\u6216\u8f6f\u4ef6\u6e90\u67e5\u627e\u5f53\u524d\u6700\u65b0\u7684\u7a33\u5b9a\u7248\uff0c\u9009\u62e9\u4e0e\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u76f8\u5339\u914d\u7684\u5b89\u88c5\u6587\u4ef6\uff0c\u540c\u65f6\u4fdd\u8bc1\u5176\u5168\u9762\u6027\u53ca\u5b89\u5168\u6027\u3002<\/p>\n \u5b89\u88c5\u6b65\u9aa4<\/b><\/p>\n \u91ca\u653e\u5e76\u5b89\u88c5\uff1a\u5229\u7528\u89e3\u538b\u7f29\u6307\u4ee4\uff0c\u5c06\u6240\u5f97\u7a0b\u5e8f\u6587\u4ef6\u5b89\u5168\u5730\u653e\u7f6e\u4e8e\u6307\u5b9a\u4f4d\u7f6e\u3002<\/p>\n \u65b0\u5efa\u7528\u6237\u53ca\u5206\u7ec4\uff1a\u4e3a\u786e\u4fdd\u7cfb\u7edf\u5b89\u5168\uff0c\u5efa\u8bae\u521b\u5efa\u4e13\u5c5ePostgreSQL\u670d\u52a1\u8d26\u6237\u53ca\u76f8\u5e94\u5206\u7ec4\u4ee5\u5b9e\u73b0\u7ba1\u7406\u3002<\/p>\n \u542f\u52a8\u5b89\u88c5\u7a0b\u5e8f\uff1a\u5f00\u542f\u89e3\u538b\u7f29\u540e\u7684\u6587\u4ef6\u5939\u8def\u5f84\uff0c\u5e76\u5728\u63a7\u5236\u53f0\u8fd0\u884c\u76f8\u5e94\u7684\u5b89\u88c5\u6307\u4ee4\u3002<\/p>\n \u8bbe\u5b9a\u73af\u5883\u53c2\u6570\uff1a\u57fa\u4e8e\u5177\u4f53\u9700\u6c42\u8c03\u6574PATH\u7b49\u73af\u5883\u7cfb\u6570\uff0c\u786e\u4fdd\u7cfb\u7edf\u80fd\u987a\u5229\u8bc6\u522b\u5e76\u8c03\u7528PostgreSQL\u76f8\u5e94\u6307\u4ee4\u53ca\u6587\u4ef6\u3002<\/p>\n \u521d\u59cb\u5316\u6570\u636e\u4ed3\u5e93\uff1a\u6309\u7167\u89c4\u8303\u8fdb\u884c\u6570\u636e\u4ed3\u5e93\u521d\u59cb\u8bbe\u7f6e\uff0c\u751f\u6210\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6\u4e0e\u6570\u636e\u5e93\u6a21\u677f\u3002<\/p>\n \u914d\u7f6e\u8fc7\u7a0b<\/b><\/p>\n \u8c03\u6574\u914d\u7f6e\u6587\u4ef6\uff1a\u5bf9\u8bf8\u5982postgresql<\/a>.conf\u53capg_hba.conf\u7b49\u76f8\u5173\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u76f8\u5e94\u7684\u914d\u7f6e\u6539\u7f16\uff0c\u5305\u62ec\u8bbe\u5b9a\u76d1\u542c\u5730\u5740\u3001\u6307\u5b9a\u7aef\u53e3\u53f7\u7801\u4ee5\u53ca\u9009\u62e9\u8ba4\u8bc1<\/a>\u673a\u5236\u7b49\u5173\u952e\u53c2\u6570\u3002<\/p>\n \u5f00\u542f\u670d\u52a1\uff1a\u8fd0\u7528systemctl\u6216service\u6307\u4ee4\u542f\u52a8PostgreSQL\u4f53\u7cfb\uff0c\u5e76\u5c06\u5176\u8bbe\u4e3a\u81ea\u52a8\u5f00\u673a\u542f\u52a8\u3002<\/p>\n \u8fde\u63a5\u6570\u636e\uff1a\u4f7f\u7528psql\u6307\u4ee4\u4e0e\u6570\u636e\u5e93\u670d\u52a1\u5668\u5efa\u7acb\u8fde\u63a5linux\u5185\u5b58\u7ba1\u7406\uff0c\u5b9e\u73b0\u7528\u6237\u6743\u9650\u63a7\u5236\u548c\u6570\u636e\u5e93\u521b\u5efa\u7b49\u4efb\u52a1\u3002<\/p>\n \u68c0\u6d4b\u9a8c\u8bc1\uff1a\u6784\u5efa\u6d4b\u8bd5\u7cfb\u7edf\uff0c\u5b9e\u65bd\u6570\u636e\u5e93\u586b\u5145\u53ca\u67e5\u8be2\u7684\u5404\u9879\u529f\u80fd\uff0c\u4ee5\u4fdd\u8bc1\u670d\u52a1\u5668\u80fd\u591f\u7a33\u5b9a\u8fd0\u4f5c\u3002<\/p>\n \u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/b><\/p>\n \u7aef\u53e3\u5360\u7528\uff1a\u82e5\u542f\u52a8\u670d\u52a1\u53d7\u9650\u4e8e\u5df2\u5360\u7528\u7aef\u53e3linux\u5b89\u88c5postgresql9<\/strong>\uff0c\u53ef\u5229\u7528netstat\u68c0\u6d4b\u7aef\u53e3\u5360\u7528\u72b6\u51b5linux\u5b89\u88c5postgresql9<\/strong>\uff0c\u5e76\u5bf9\u914d\u7f6e\u6587\u4ef6\u5185\u76f8\u5173\u7aef\u53e3\u8fdb\u884c\u8c03\u6574\u3002<\/p>\n \u8bbf\u95ee\u6743\u9650\u9650\u5236\u9700\u6ce8\u610f\uff1a\u82e5\u9047\u56e0\u8bbf\u95ee\u6743\u9650\u53d7\u9650\u65e0\u6cd5\u8fde\u901a\u6570\u636e\u5e93\u95ee\u9898\uff0c\u8bf7\u52a1\u5fc5\u68c0\u67e5pg_hba.conf\u914d\u7f6e\u4e2d\u8ba4\u8bc1\u89c4\u5219\u8bbe\u7f6e\u662f\u5426\u65e0\u8bef\u3002<\/p>\n \u9488\u5bf9\u6570\u636e\u5e93\u6545\u969c\u7684\u6062\u590d\u7b56\u7565\uff1a\u5f53\u7cfb\u7edf\u906d\u9047\u6570\u636e\u5e93\u5d29\u76d8\u6216\u91cd\u8981\u6570\u636e\u4e22\u5931\u7684\u60c5\u51b5\u4e0b\uff0c\u53ef\u501f\u52a9\u5148\u524d\u521b\u5efa\u7684\u5907\u4efd\u6765\u8fd8\u539f\u6570\u636e\uff0c\u4ea6\u6216\u8fd0\u7528\u5982pg_resetwal\u8fd9\u7c7b\u4e13\u4e1a\u5de5\u5177\u8fdb\u884c\u6df1\u5165\u4fee\u590d\u3002<\/p>\n \u4f18\u5316\u4e0e\u6269\u5c55<\/b><\/p>\n \u6027\u80fd\u589e\u5f3a\uff1a\u4ee5\u9700\u6c42\u4e3a\u5bfc\u5411\uff0c\u79d1\u5b66\u8c03\u6574\u6570\u636e\u5e93\u914d\u7f6e\u53ca\u7d22\u5f15\u89c4\u5212\uff0c\u6709\u6548\u63d0\u5347\u5404\u7c7b\u67e5\u8be2\u7684\u6548\u80fd\u3002<\/p>\n \u9ad8\u6548\u67b6\u6784\u8bbe\u8ba1:\u4e3a\u5b9e\u73b0\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u9ad8\u53ef\u7528\u6027\uff0c\u5efa\u8bae\u91c7\u7528\u6d41\u590d\u5236\u548c\u6545\u969c\u8f6c\u79fb\u7b49\u6280\u672f\u3002<\/p>\n \u5b89\u5168\u5f3a\u5316\uff1a\u5b9a\u671f\u4fee\u590d\u6f0f\u6d1e\uff0c\u589e\u5f3a\u6388\u6743\u7ba1\u7406\u548c\u5ba1\u8ba1\u5ba1\u67e5\u673a\u5236\u4ee5\u63d0\u5347\u6570\u636e\u5e93\u7684\u5b89\u5168\u6027\u3002<\/p>\n \u603b\u7ed3\u4e0e\u5c55\u671b<\/b><\/p>\n \u672c\u7bc7\u6587\u7ae0\u5168\u9762\u8be6\u5c3d\u5730\u8ba8\u8bba\u4e86\u5982\u4f55\u5728Linux\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u6210\u529f\u5b89\u88c5PostgreSQL 9\u3002\u6587\u7ae0\u7279\u522b\u8bb2\u89e3\u4e86\u89e3\u51b3\u5e38\u89c1\u95ee\u9898\u7684\u65b9\u6cd5\uff0c\u4ee5\u52a9\u60a8\u66f4\u987a\u7545\u5730\u5b8c\u6210PostgreSQL 9\u7684\u5b89\u88c5\u548c\u914d\u7f6e\u5de5\u4f5c\u3002\u540e\u671f\u968f\u7740\u79d1\u6280\u8fdb\u6b65\uff0cPostgreSQL\u5c06\u6301\u7eed\u5347\u7ea7\u6f14\u53d8\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u52aa\u529b\u4fdd\u6301\u5b66\u4e60\u4e0e\u5b9e\u8df5\u7684\u72b6\u6001\uff0c\u4ee5\u63d0\u5347\u6211\u4eec\u5bf9\u65b0\u5174\u6280\u672f\u7684\u9ad8\u5ea6\u654f\u611f\u6027\u3002<\/p>\n \u6211\u4eec\u9f13\u52b1\u6bcf\u4f4d\u8bfb\u8005\u5728\u5b9e\u8df5\u64cd\u4f5c\u8fc7\u7a0b\u4e2d\u79ef\u6781\u5bfb\u627e\u548c\u89e3\u51b3\u95ee\u9898\uff0c\u9010\u6b65\u7d2f\u79ef\u4e30\u5bcc\u7684\u5b9e\u6218\u7ecf\u9a8c\u3002\u8bf7\u5728\u8bc4\u8bba\u533a\u5206\u4eab\u60a8\u5728Linux\u7cfb\u7edf\u4e0b\u5b89\u88c5PostgreSQL9\u6240\u9047\u5230\u7684\u5177\u4f53\u56f0\u96be\uff0c\u6216\u5171\u4eab\u5bf9\u4f18\u5316\u8be5\u8fc7\u7a0b\u6709\u76ca\u7684\u89c1\u89e3\u4ee5\u4f9b\u4ea4\u6d41\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" linux\u5b89\u88c5postgresql9\u5176\u6b21\uff0c\u786e\u8ba4\u5e76\u6ee1\u8db3\u7cfb\u7edf\u76f8\u5173\u7684\u786c\u4ef6\u53ca\u8f6f\u4ef6\u8bbe\u65bd\u9700\u6c42\uff0c\u786e\u4fdd\u7cfb\u7edf\u53ef\u987a\u5229\u5b9e\u65bd\u6b64\u6b21\u5b89\u88c5\u3002\u65b0\u5efa\u7528\u6237\u53ca\u5206\u7ec4\uff1a\u4e3a\u786e\u4fdd\u7cfb\u7edf\u5b89\u5168\uff0c\u5efa\u8bae\u521b\u5efa\u4e13\u5c5ePostgreSQL\u670d\u52a1\u8d26\u6237\u53ca\u76f8\u5e94\u5206\u7ec4\u4ee5\u5b9e\u73b0\u7ba1\u7406\u3002conf\u914d\u7f6e\u4e2d\u8ba4\u8bc1\u89c4\u5219\u8bbe\u7f6e\u662f\u5426\u65e0\u8bef\u3002\u6027\u80fd\u589e\u5f3a\uff1a\u4ee5\u9700\u6c42\u4e3a\u5bfc\u5411\uff0c\u79d1\u5b66\u8c03\u6574\u6570\u636e\u5e93\u914d\u7f6e\u53ca\u7d22\u5f15\u89c4\u5212\uff0c\u6709\u6548\u63d0\u5347\u5404\u7c7b\u67e5\u8be2\u7684\u6548\u80fd\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-290666","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/290666","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=290666"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/290666\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=290666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=290666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=290666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}