{"id":11977,"date":"2022-09-16T05:04:23","date_gmt":"2022-09-16T05:04:23","guid":{"rendered":"https:\/\/www.varidata.com\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04"},"modified":"2022-10-10T08:58:26","modified_gmt":"2022-10-10T08:58:26","slug":"how-to-install-a-postgresql-server-on-ubuntu-18-04","status":"publish","type":"kb","link":"https:\/\/www.varidata.com\/zh-cn\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04\/","title":{"rendered":"\u5982\u4f55\u5728Ubuntu 18.04\u5b89\u88c5PostgreSQL\u670d\u52a1\u5668\uff1f"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row gap=&#8221;25&#8243; css=&#8221;.vc_custom_1659597621929{margin-top: 0px !important;margin-bottom: 0px !important;padding-top: 0px !important;padding-bottom: 0px !important;}&#8221;][vc_column css=&#8221;.vc_custom_1659597638453{margin-top: 0px !important;padding-top: 0px !important;border-radius: 20px !important;}&#8221;][vc_column_text el_class=&#8221;sub-title&#8221; css=&#8221;.vc_custom_1663923333044{margin-top: 0px !important;margin-bottom: 0px !important;padding-top: 0px !important;}&#8221;]\u76ee\u7684[\/vc_column_text][vc_column_text el_class=&#8221;content&#8221; css=&#8221;.vc_custom_1663920682509{margin-top: 0px !important;margin-bottom: 0px !important;padding-top: 0px !important;padding-bottom: 0px !important;}&#8221;]PostgreSQL\u4f5c\u4e3a\u4e00\u4e2a\u5168\u7403\u652f\u6301\u7684\u5f00\u6e90\u6570\u636e\u5e93\uff0c\u62e5\u6709\u8d85\u8fc730\u5e74\u5386\u53f2\uff0c\u5f97\u76ca\u4e8e\u5404\u79cd\u53ef\u7528\u7684\u63d2\u4ef6\uff0c\u5b83\u4ee5\u5065\u58ee\u6027\u3001\u53ef\u4f38\u7f29\u6027\u548c\u6027\u80fd\u800c\u95fb\u540d\u3002<br \/>\n\u9996\u5148\uff0c\u5982\u679c\u8981\u5b8c\u6210PostgreSQL\u7684\u5b89\u88c5\u4e0e\u4f7f\u7528\uff0c\u9700\u8981\u901a\u8fc7SSH\u8fde\u63a5\u8fde\u63a5\u5230\u670d\u52a1\u5668\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u6709\u5173\u6559\u7a0b\u8fdb\u884c\u8fde\u63a5\u3002\u82e5\u662f\u672c\u5730\u670d\u52a1\u5668\uff0c\u5219\u8fdb\u5165\u4e0b\u4e00\u6b65\uff0c\u6253\u5f00\u670d\u52a1\u5668\u7684\u7ec8\u7aef\u3002[\/vc_column_text][vc_column_text el_class=&#8221;sub-title&#8221; css=&#8221;.vc_custom_1663920608580{margin-top: 0px !important;margin-bottom: 0px !important;}&#8221;]PostgreSQL\u5b89\u88c5[\/vc_column_text][vc_column_text el_class=&#8221;content&#8221; css=&#8221;.vc_custom_1663920624854{margin-top: 0px !important;margin-bottom: 0px !important;padding-top: 0px !important;padding-bottom: 0px !important;}&#8221;]\u8981\u7ee7\u7eed\u5b89\u88c5PostgreSQL\uff0c\u8bf7\u4f7f\u7528apt\u5305\u7ba1\u7406\u5668\u3002\u786e\u4fdd\u66f4\u65b0\u7f13\u5b58\uff1a<\/p>\n<pre><code>$ sudo apt update &amp;&amp; sudo apt install postgresql postgresql-contrib<\/code><\/pre>\n<p>\u4f7f\u7528systemctl start\u547d\u4ee4\u786e\u4fdd\u670d\u52a1\u5668\u6b63\u5728\u8fd0\u884c\uff1a<\/p>\n<pre><code>sudo systemctl start postgresql.service<\/code><\/pre>\n<p>[\/vc_column_text][vc_column_text el_class=&#8221;sub-title&#8221; css=&#8221;.vc_custom_1663920632420{margin-top: 0px !important;margin-bottom: 0px !important;}&#8221;]\u9a8c\u8bc1\u5b89\u88c5[\/vc_column_text][vc_column_text el_class=&#8221;content&#8221; css=&#8221;.vc_custom_1663920673156{margin-top: 0px !important;margin-bottom: 0px !important;padding-top: 0px !important;padding-bottom: 0px !important;}&#8221;]\u73b0\u5728\u4f60\u5df2\u7ecf\u5b8c\u6210\u4e86Ubuntu\u4e0aPostgres\u7684\u5b89\u88c5\uff0c\u5404\u9879\u670d\u52a1\u5c06\u81ea\u52a8\u542f\u52a8\u3002\u4f5c\u4e3a\u7b2c\u4e00\u6b65\uff0c\u901a\u8fc7\u7528psql\u8fde\u63a5\u5230PostgreSQL\u6570\u636e\u5e93\u6765\u9a8c\u8bc1\u5b89\u88c5\u3002<br \/>\npsql\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u6765\u4e0ePostgreSQL\u670d\u52a1\u5668\u4ea4\u4e92\u3002\u8fd9\u5c06\u8f93\u51fa\u670d\u52a1\u5668\u7684\u7248\u672c\u3002<\/p>\n<pre><code>sudo -u postgres psql -c \"SELECT version();\"<\/code><\/pre>\n<p>\u8981\u4ee5postgre\u7528\u6237\u7684\u8eab\u4efd\u767b\u5f55PostgreSQL\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528psql\u3002\u53ef\u4ee5\u6309\u7167\u4e0b\u9762\u7684\u65b9\u5f0f\u8fdb\u884c\uff1a<\/p>\n<pre><code>sudo su \u2013 postgres<\/code><\/pre>\n<p>\u8981\u4f7f\u7528PostgreSQL\uff0c\u8bf7\u8f93\u5165\uff1a<\/p>\n<pre><code>psql<\/code><\/pre>\n<p>\u5b83\u5c06\u6388\u4e88\u4f60\u5bf9PostgreSQL\u5b9e\u4f8b\u7684\u8bbf\u95ee\u6743\u3002\u5982\u679c\u8981\u9000\u51fa\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a<\/p>\n<pre><code>\\q<\/code><\/pre>\n<p>[\/vc_column_text][vc_column_text el_class=&#8221;sub-title&#8221; css=&#8221;.vc_custom_1663920695091{margin-top: 0px !important;margin-bottom: 0px !important;}&#8221;]\u7ba1\u7406\u7528\u6237\u548c\u6743\u9650[\/vc_column_text][vc_column_text el_class=&#8221;content&#8221; css=&#8221;.vc_custom_1663920806860{margin-top: 0px !important;margin-bottom: 0px !important;padding-top: 0px !important;padding-bottom: 0px !important;}&#8221;]\u5982\u524d\u6240\u8ff0\uff0cPostgreSQL\u5047\u8bbe\u5176\u670d\u52a1\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u7528\u6237\u4e5f\u5b58\u5728\u4e8e\u7cfb\u7edf\u4e2d\u3002\u4e3a\u4e86\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7528\u6237\uff0c\u9996\u5148\u901a\u8fc7adduser\u628a\u5b83\u6dfb\u52a0\u5230\u7cfb\u7edf\u4e2d\u3002<\/p>\n<pre><code>$ sudo adduser tutorial<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/09\/postgreSQL-img1.jpg\" alt=\"\" \/><br \/>\n\u5728\u4e0b\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u6b63\u5728\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a &#8220;tutorial &#8220;\u7684\u7528\u6237\uff0c\u6ca1\u6709\u6307\u5b9a\u5176\u4ed6\u4fe1\u606f\u3002\u4e00\u65e6\u5b8c\u6210\uff0c\u5c31\u53ef\u4ee5\u521b\u5efaPostgreSQL\u7528\u6237\u3002\u9996\u5148\u7528postgres\u7528\u6237\u767b\u5f55\u3002<\/p>\n<pre><code>$ sudo -i -u postgres<\/code><\/pre>\n<pre><code>$ createuser --interactive<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/09\/postgreSQL-img2.jpg\" alt=\"\" \/><br \/>\n\u521b\u5efa\u5b8c\u7528\u6237\u540e\uff0c\u8bbe\u7f6e\u4e00\u4e2a\u5bc6\u7801\uff0c\u901a\u8fc7\u8d85\u7ea7\u7528\u6237postgres\u767b\u5f55\uff0c\u5e76\u6539\u53d8\u4f60\u521a\u521a\u521b\u5efa\u7684\u7528\u6237\u3002<\/p>\n<pre><code>$ psql postgres=# ALTER USER tutorial PASSWORD 'password'; ALTER ROLE;<\/code><\/pre>\n<p>\u4e5f\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c\u8be5\u547d\u4ee4\u4e3a\u65b0\u521b\u5efa\u7684\u7528\u6237\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\u3002<\/p>\n<pre><code>$ createdb tutorial<\/code><\/pre>\n<p>\u5b8c\u6210\u540e\uff0c\u9000\u51fa\u5e76\u5c1d\u8bd5\u7528\u65b0\u521b\u5efa\u7684\u7528\u6237\u767b\u5f55\u3002<\/p>\n<pre><code>$ sudo -i -u tutorial<\/code><\/pre>\n<p>[\/vc_column_text][vc_column_text el_class=&#8221;sub-title&#8221; css=&#8221;.vc_custom_1663920813618{margin-top: 0px !important;margin-bottom: 0px !important;}&#8221;]\u542f\u7528\u5bf9\u5916\u90e8\u5ba2\u6237\u7684\u8bbf\u95ee[\/vc_column_text][vc_column_text el_class=&#8221;content&#8221; css=&#8221;.vc_custom_1663921000485{margin-top: 0px !important;margin-bottom: 0px !important;padding-top: 0px !important;padding-bottom: 0px !important;}&#8221;]\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u5141\u8bb8\u5916\u90e8\u5ba2\u6237\uff08\u4f8b\u5982\u4f60\u7684\u673a\u5668\uff09\u8bbf\u95ee\u670d\u52a1\u5668\u4e0a\u7684\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u5e93\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0cPostgreSQL\u4e0d\u88ab\u914d\u7f6e\u4e3a\u63a5\u53d7\u975e\u672c\u5730\u7684\u8fde\u63a5\uff0c\u6240\u4ee5\u8981\u4fee\u6539\u4e00\u4e9b\u914d\u7f6e\u6587\u4ef6\u3002<br \/>\n\u7b2c\u4e00\u4e2a\u8981\u4fee\u6539\u7684\u6587\u4ef6\u662f\u4e3b\u914d\u7f6e\u6587\u4ef6\uff0c\u5728<\/p>\n<pre><code>\/etc\/postgresql\/10\/main\/postgresql.conf.<\/code><\/pre>\n<p>\u8bf7\u786e\u4fdd\u7f16\u8f91<\/p>\n<pre><code>listen_addresses = 'localhost'<\/code><\/pre>\n<p>\u548c:<\/p>\n<pre><code>listen_addresses = '*'<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u4f60\u901a\u77e5PostgreSQL\u671f\u671b\u4ece\u4efb\u4f55\u7f51\u7edc\u63a5\u53e3\u8fdb\u5165\u7684\u8fde\u63a5\u3002<br \/>\n\u8bf7\u786e\u4fdd\u4fdd\u5b58\u4f60\u7684\u4fee\u6539\uff0c\u7ee7\u7eed\u7f16\u8f91\/etc\/postgresql\/10\/main\/pg_hba.conf\u4e2d\u7ba1\u7406\u670d\u52a1\u5668\u8bbf\u95ee\u89c4\u5219\u7684\u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u4e00\u884c\u3002<\/p>\n<pre><code>host    tutorial        tutorial 0.0.0.0\/0               md5<\/code><\/pre>\n<p>\u8fd9\u79cd\u4fee\u6539\u5141\u8bb8 &#8220;tutorial &#8220;\u7528\u6237\u4ece\u4efb\u4f55\u4e3b\u673a\u8bbf\u95ee\u5b83\u7684\u6570\u636e\u5e93\u3002\u800c\u5b83\u7684\u610f\u601d\u662f\uff1a<\/p>\n<div class=\"kfaq-ul-header\">\n<ol style=\"padding-left: 30px; padding-top: 20px;\">\n<li>host: \u4f60\u63a5\u53d7\u7684\u8fde\u63a5\u7c7b\u578b\u3002\u53ef\u80fd\u7684\u503c\u662f:<br \/>\n\u00b7 local: \u6765\u81ea\u7cfb\u7edf\u7684\u975e\u7f51\u7edc\u8fde\u63a5<br \/>\n\u00b7 host: \u4efb\u4f55\u7c7b\u578b\u7684TCP \/ IP\u8fde\u63a5<br \/>\n\u00b7 hostssl: \u4ec5\u5728SSL\u534f\u8bae\u4e0b\u7684TCP \/ IP\u8fde\u63a5<\/li>\n<li>tutorial: \u6570\u636e\u5e93\u540d\u79f0\u8981\u5141\u8bb8\u8bbf\u95ee\uff0c\u7528\u201call\u201d\u6307\u4ee3\u6240\u6709\u6570\u636e\u5e93<\/li>\n<li>tutorial: \u7528\u6237\u540d\u6388\u4e88\u8bbf\u95ee\u6743\u9650<\/li>\n<li>0.0.0.0\/0: IP\u5730\u5740\uff0c\u5728\u60a8\u7684\u60c5\u51b5\u4e0b\uff0c\u60a8\u6b63\u5728\u6388\u6743\u8bbf\u95ee\u4efb\u4f55IPv4\u5730\u5740<\/li>\n<li>md5: \u516c\u8ba4\u7684\u8ba4\u8bc1\u65b9\u6cd5\uff0c\u5176\u4e2d\u4e00\u4e9b\u91cd\u8981\u7684\u662f:<br \/>\n\u00b7 md5: \u5bc6\u7801\u8eab\u4efd\u9a8c\u8bc1<br \/>\n\u00b7 trust: \u65e0\u6761\u4ef6\u63a5\u53d7\u8fde\u63a5<br \/>\n\u00b7 peer: \u4f7f\u7528\u7cfb\u7edf\u7528\u6237\u540d\u53ea\u8fde\u63a5\u540c\u540d\u7684\u6570\u636e\u5e93<\/li>\n<\/ol>\n<\/div>\n<p>\u8981\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u8bbf\u95ee\u5730\u5740 <a class=\"kfaq-link\" href=\"https:\/\/www.postgresql.org\/docs\/9.1\/auth-pg-hba-conf.html\">https:\/\/www.postgresql.org\/docs\/9.1\/auth-pg-hba-conf.html <\/a>\u6216\u5b98\u65b9PostgreSQL\u6587\u6863\u3002<br \/>\n\u5b8c\u6210\u4e4b\u540e\uff0c\u8bf7\u91cd\u65b0\u542f\u52a8\u670d\u52a1\u4ee5\u4f7f\u6240\u6709\u66f4\u6539\u751f\u6548\uff1a<\/p>\n<pre><code>$ sudo systemctl restart postgresql<\/code><\/pre>\n<p>[\/vc_column_text][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<p>[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"featured_media":0,"template":"","kb_category":[465],"class_list":["post-11977","kb","type-kb","status-publish","hentry","kb_category-ubuntu-sc"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u5982\u4f55\u5728Ubuntu 18.04\u5b89\u88c5PostgreSQL\u670d\u52a1\u5668\uff1f - Varidata Limited<\/title>\n<meta name=\"description\" content=\"\u76ee\u7684PostgreSQL\u4f5c\u4e3a\u4e00\u4e2a\u5168\u7403\u652f\u6301\u7684\u5f00\u6e90\u6570\u636e\u5e93\uff0c\u62e5\u6709\u8d85\u8fc730\u5e74\u5386\u53f2\uff0c\u5f97\u76ca\u4e8e\u5404\u79cd\u53ef\u7528\u7684\u63d2\u4ef6\uff0c\u5b83\u4ee5\u5065\u58ee\u6027\u3001\u53ef\u4f38\u7f29\u6027\u548c\u6027\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.varidata.com\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u5728Ubuntu 18.04\u5b89\u88c5PostgreSQL\u670d\u52a1\u5668\uff1f - Varidata Limited\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.varidata.com\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:site_name\" content=\"Varidata Limited\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-10T08:58:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.varidata.com\/wp-content\/uploads\/2023\/01\/varidata_logo_black.png\" \/>\n\t<meta property=\"og:image:width\" content=\"248\" \/>\n\t<meta property=\"og:image:height\" content=\"94\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/kb\\\/how-to-install-a-postgresql-server-on-ubuntu-18-04\\\/\",\"url\":\"https:\\\/\\\/www.varidata.com\\\/kb\\\/how-to-install-a-postgresql-server-on-ubuntu-18-04\\\/\",\"name\":\"\u5982\u4f55\u5728Ubuntu 18.04\u5b89\u88c5PostgreSQL\u670d\u52a1\u5668\uff1f - Varidata Limited\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-cn\\\/#website\"},\"datePublished\":\"2022-09-16T05:04:23+00:00\",\"dateModified\":\"2022-10-10T08:58:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/kb\\\/how-to-install-a-postgresql-server-on-ubuntu-18-04\\\/#breadcrumb\"},\"inLanguage\":\"zh-SC\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.varidata.com\\\/kb\\\/how-to-install-a-postgresql-server-on-ubuntu-18-04\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/kb\\\/how-to-install-a-postgresql-server-on-ubuntu-18-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.varidata.com\\\/zh-cn\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledgebase\",\"item\":\"https:\\\/\\\/www.varidata.com\\\/zh-tw\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u5982\u4f55\u5728Ubuntu 18.04\u5b89\u88c5PostgreSQL\u670d\u52a1\u5668\uff1f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-cn\\\/#website\",\"url\":\"https:\\\/\\\/www.varidata.com\\\/zh-cn\\\/\",\"name\":\"Varidata Limited\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-cn\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.varidata.com\\\/zh-cn\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-SC\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-cn\\\/#organization\",\"name\":\"Varidata\",\"url\":\"https:\\\/\\\/www.varidata.com\\\/zh-cn\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-SC\",\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-cn\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.varidata.com\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/varidata_logo_white_-748x480_hor_web-1.png\",\"contentUrl\":\"https:\\\/\\\/www.varidata.com\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/varidata_logo_white_-748x480_hor_web-1.png\",\"width\":248,\"height\":94,\"caption\":\"Varidata\"},\"image\":{\"@id\":\"https:\\\/\\\/www.varidata.com\\\/zh-cn\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u5728Ubuntu 18.04\u5b89\u88c5PostgreSQL\u670d\u52a1\u5668\uff1f - Varidata Limited","description":"\u76ee\u7684PostgreSQL\u4f5c\u4e3a\u4e00\u4e2a\u5168\u7403\u652f\u6301\u7684\u5f00\u6e90\u6570\u636e\u5e93\uff0c\u62e5\u6709\u8d85\u8fc730\u5e74\u5386\u53f2\uff0c\u5f97\u76ca\u4e8e\u5404\u79cd\u53ef\u7528\u7684\u63d2\u4ef6\uff0c\u5b83\u4ee5\u5065\u58ee\u6027\u3001\u53ef\u4f38\u7f29\u6027\u548c\u6027","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.varidata.com\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5982\u4f55\u5728Ubuntu 18.04\u5b89\u88c5PostgreSQL\u670d\u52a1\u5668\uff1f - Varidata Limited","og_url":"https:\/\/www.varidata.com\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04\/","og_site_name":"Varidata Limited","article_modified_time":"2022-10-10T08:58:26+00:00","og_image":[{"width":248,"height":94,"url":"https:\/\/www.varidata.com\/wp-content\/uploads\/2023\/01\/varidata_logo_black.png","type":"image\/png"}],"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.varidata.com\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04\/","url":"https:\/\/www.varidata.com\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04\/","name":"\u5982\u4f55\u5728Ubuntu 18.04\u5b89\u88c5PostgreSQL\u670d\u52a1\u5668\uff1f - Varidata Limited","isPartOf":{"@id":"https:\/\/www.varidata.com\/zh-cn\/#website"},"datePublished":"2022-09-16T05:04:23+00:00","dateModified":"2022-10-10T08:58:26+00:00","breadcrumb":{"@id":"https:\/\/www.varidata.com\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04\/#breadcrumb"},"inLanguage":"zh-SC","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.varidata.com\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.varidata.com\/kb\/how-to-install-a-postgresql-server-on-ubuntu-18-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.varidata.com\/zh-cn\/"},{"@type":"ListItem","position":2,"name":"Knowledgebase","item":"https:\/\/www.varidata.com\/zh-tw\/kb\/"},{"@type":"ListItem","position":3,"name":"\u5982\u4f55\u5728Ubuntu 18.04\u5b89\u88c5PostgreSQL\u670d\u52a1\u5668\uff1f"}]},{"@type":"WebSite","@id":"https:\/\/www.varidata.com\/zh-cn\/#website","url":"https:\/\/www.varidata.com\/zh-cn\/","name":"Varidata Limited","description":"","publisher":{"@id":"https:\/\/www.varidata.com\/zh-cn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.varidata.com\/zh-cn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-SC"},{"@type":"Organization","@id":"https:\/\/www.varidata.com\/zh-cn\/#organization","name":"Varidata","url":"https:\/\/www.varidata.com\/zh-cn\/","logo":{"@type":"ImageObject","inLanguage":"zh-SC","@id":"https:\/\/www.varidata.com\/zh-cn\/#\/schema\/logo\/image\/","url":"https:\/\/www.varidata.com\/wp-content\/uploads\/2021\/09\/varidata_logo_white_-748x480_hor_web-1.png","contentUrl":"https:\/\/www.varidata.com\/wp-content\/uploads\/2021\/09\/varidata_logo_white_-748x480_hor_web-1.png","width":248,"height":94,"caption":"Varidata"},"image":{"@id":"https:\/\/www.varidata.com\/zh-cn\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.varidata.com\/zh-cn\/wp-json\/wp\/v2\/kb\/11977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.varidata.com\/zh-cn\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.varidata.com\/zh-cn\/wp-json\/wp\/v2\/types\/kb"}],"wp:attachment":[{"href":"https:\/\/www.varidata.com\/zh-cn\/wp-json\/wp\/v2\/media?parent=11977"}],"wp:term":[{"taxonomy":"kb_category","embeddable":true,"href":"https:\/\/www.varidata.com\/zh-cn\/wp-json\/wp\/v2\/kb_category?post=11977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}