{"id":42038,"date":"2023-06-05T12:52:16","date_gmt":"2023-03-29T23:27:00","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/"},"modified":"2024-01-15T11:15:59","modified_gmt":"2024-01-15T03:15:59","slug":"%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/","title":{"rendered":"\u5728wsl\u7684Ubuntu18.04\u4e0a\u5b89\u88c5PostgreSQL"},"content":{"rendered":"<p>\u6211\u5e0c\u671b\u80fd\u591f\u8bb0\u5f55\u4e0b\u5907\u5fd8\u5f55\u517c\u5907\u5907\u5fd8\u5f55\u7684\u7b14\u8bb0\u5185\u5bb9\uff0c\u4e5f\u5305\u62ec\u5b89\u88c5\u540e\u7684\u64cd\u4f5c\u8bb0\u5f55\u3002<\/p>\n<h2>\u73af\u5883<\/h2>\n<p>\u30fb\u5bbf\u4e3b\u64cd\u4f5c\u7cfb\u7edf\uff1aWindows10 Home<br \/>\n\u30fb\u865a\u62df\u673a\u64cd\u4f5c\u7cfb\u7edf\uff1aWSL Ubuntu18.04 LTS<br \/>\n\u30fbPostgreSQL 12.2<\/p>\n<h2>\u64cd\u4f5c\u6b65\u9a5f<\/h2>\n<p>\u57fa\u672c\u4e0a\uff0c\u6211\u5011\u5c07\u6839\u64daPostgreSQL wiki\uff08https:\/\/wiki.postgresql.org\/wiki\/Apt\uff09\u9032\u884c\u64cd\u4f5c\u3002\u8a72wiki\u6bd4\u5b98\u65b9\u7db2\u7ad9\u66f4\u6613\u65bc\u7406\u89e3\u3002<\/p>\n<p>\u5728\u4e2d\u56fd\u7684\u672c\u5730\u73af\u5883\u4e2d\uff0c\u6dfb\u52a0\u5b58\u50a8\u5e93\u3002<\/p>\n<pre class=\"post-pre\"><code>sudo apt-get install curl ca-certificates gnupg\r\ncurl https:\/\/www.postgresql.org\/media\/keys\/ACCC4CF8.asc | sudo apt-key add\r\n<\/code><\/pre>\n<p>\u521b\u5efa\u6e05\u5355<\/p>\n<pre class=\"post-pre\"><code>deb http:\/\/apt.postgresql.org\/pub\/repos\/apt bionic-pgdg main\r\n<\/code><\/pre>\n<p>\u2462 \u66f4\u65b0\u8f6f\u4ef6\u5305\u5e76\u5b89\u88c5PostgreSQL<\/p>\n<pre class=\"post-pre\"><code>$ sudo apt-get update\r\n  sudo apt-get install postgresql\r\n<\/code><\/pre>\n<p>\u8bf7\u786e\u8ba4\u7248\u672c\u53f7\u3002<\/p>\n<pre class=\"post-pre\"><code>$ psql --version\r\n  psql (PostgreSQL) 12.2 (Ubuntu 12.2-2.pgdg18.04+1)\r\n<\/code><\/pre>\n<p>\u53ea\u8981\u663e\u793a\u51fapsql\u7684\u7248\u672c\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<h2>\u8bf7\u67e5\u9605\u76f8\u5173\u8d44\u6599\u3002<\/h2>\n<p>PostgreSQL\u7ef4\u57fa<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u5e0c\u671b\u80fd\u591f\u8bb0\u5f55\u4e0b\u5907\u5fd8\u5f55\u517c\u5907\u5907\u5fd8\u5f55\u7684\u7b14\u8bb0\u5185\u5bb9\uff0c\u4e5f\u5305\u62ec\u5b89\u88c5\u540e\u7684\u64cd\u4f5c\u8bb0\u5f55\u3002 \u73af\u5883 \u30fb\u5bbf\u4e3b\u64cd\u4f5c\u7cfb\u7edf\uff1aWindows10 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-42038","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728wsl\u7684Ubuntu18.04\u4e0a\u5b89\u88c5PostgreSQL - Blog - Silicon Cloud<\/title>\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.silicloud.com\/zh\/blog\/\u5728wsl\u7684ubuntu18-04\u4e0a\u5b89\u88c5postgresql\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728wsl\u7684Ubuntu18.04\u4e0a\u5b89\u88c5PostgreSQL\" \/>\n<meta property=\"og:description\" content=\"\u6211\u5e0c\u671b\u80fd\u591f\u8bb0\u5f55\u4e0b\u5907\u5fd8\u5f55\u517c\u5907\u5907\u5fd8\u5f55\u7684\u7b14\u8bb0\u5185\u5bb9\uff0c\u4e5f\u5305\u62ec\u5b89\u88c5\u540e\u7684\u64cd\u4f5c\u8bb0\u5f55\u3002 \u73af\u5883 \u30fb\u5bbf\u4e3b\u64cd\u4f5c\u7cfb\u7edf\uff1aWindows10 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728wsl\u7684ubuntu18-04\u4e0a\u5b89\u88c5postgresql\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-29T23:27:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T03:15:59+00:00\" \/>\n<meta name=\"author\" content=\"\u6587, \u7fd4\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6587, \u7fd4\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/\",\"name\":\"\u5728wsl\u7684Ubuntu18.04\u4e0a\u5b89\u88c5PostgreSQL - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-03-29T23:27:00+00:00\",\"dateModified\":\"2024-01-15T03:15:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728wsl\u7684Ubuntu18.04\u4e0a\u5b89\u88c5PostgreSQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c\",\"name\":\"\u6587, \u7fd4\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g\",\"caption\":\"\u6587, \u7fd4\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728wsl\u7684Ubuntu18.04\u4e0a\u5b89\u88c5PostgreSQL - Blog - Silicon Cloud","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.silicloud.com\/zh\/blog\/\u5728wsl\u7684ubuntu18-04\u4e0a\u5b89\u88c5postgresql\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728wsl\u7684Ubuntu18.04\u4e0a\u5b89\u88c5PostgreSQL","og_description":"\u6211\u5e0c\u671b\u80fd\u591f\u8bb0\u5f55\u4e0b\u5907\u5fd8\u5f55\u517c\u5907\u5907\u5fd8\u5f55\u7684\u7b14\u8bb0\u5185\u5bb9\uff0c\u4e5f\u5305\u62ec\u5b89\u88c5\u540e\u7684\u64cd\u4f5c\u8bb0\u5f55\u3002 \u73af\u5883 \u30fb\u5bbf\u4e3b\u64cd\u4f5c\u7cfb\u7edf\uff1aWindows10 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728wsl\u7684ubuntu18-04\u4e0a\u5b89\u88c5postgresql\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-03-29T23:27:00+00:00","article_modified_time":"2024-01-15T03:15:59+00:00","author":"\u6587, \u7fd4","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6587, \u7fd4"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/","name":"\u5728wsl\u7684Ubuntu18.04\u4e0a\u5b89\u88c5PostgreSQL - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-03-29T23:27:00+00:00","dateModified":"2024-01-15T03:15:59+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728wsl\u7684Ubuntu18.04\u4e0a\u5b89\u88c5PostgreSQL"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/64d5cc7727fffbff2f9a2a8da1de3e5c","name":"\u6587, \u7fd4","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/920c3d673e0bccacc98e5e6b7149bb3c22edd8d39cb753e5d7d7e471498118a1?s=96&d=mm&r=g","caption":"\u6587, \u7fd4"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/wenxiang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8wsl%e7%9a%84ubuntu18-04%e4%b8%8a%e5%ae%89%e8%a3%85postgresql%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/42038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=42038"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/42038\/revisions"}],"predecessor-version":[{"id":58962,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/42038\/revisions\/58962"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=42038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=42038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=42038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}