{"id":634,"date":"2020-03-06T08:50:30","date_gmt":"2020-03-06T00:50:30","guid":{"rendered":"https:\/\/www.linuxdevops.cn\/?p=634"},"modified":"2020-03-06T08:52:03","modified_gmt":"2020-03-06T00:52:03","slug":"ubuntu-postgresql-installation-and-configuration","status":"publish","type":"post","link":"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/","title":{"rendered":"Ubuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e"},"content":{"rendered":"\n

https:\/\/www.cnblogs.com\/Siegel\/p\/6917213.html<\/a> <\/p><\/blockquote><\/figure>\n\n\n\n

1\u3001\u5b89\u88c5<\/h2>\n\n\n\n

\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\uff0c\u4f1a\u81ea\u52a8\u5b89\u88c5\u6700\u65b0\u7248\uff0c\u8fd9\u91cc\u4e3a9.5<\/p>\n\n\n\n

sudo apt-get install postgresql<\/pre>\n\n\n\n

\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9ed8\u8ba4\u4f1a\uff1a<\/p>\n\n\n\n

\uff081\uff09\u521b\u5efa\u540d\u4e3a\"postgres\"\u7684Linux\u7528\u6237<\/p>\n\n\n\n

\uff082\uff09\u521b\u5efa\u540d\u4e3a\"postgres\"\u3001\u4e0d\u5e26\u5bc6\u7801\u7684\u9ed8\u8ba4\u6570\u636e\u5e93\u8d26\u53f7\u4f5c\u4e3a\u6570\u636e\u5e93\u7ba1\u7406\u5458<\/p>\n\n\n\n

\uff083\uff09\u521b\u5efa\u540d\u4e3a\"postgres\"\u7684\u8868<\/p>\n\n\n\n

\u5b89\u88c5\u5b8c\u6210\u540e\u7684\u4e00\u4e9b\u9ed8\u8ba4\u4fe1\u606f\u5982\u4e0b\uff1a<\/p>\n\n\n\n

config \/etc\/postgresql\/9.5\/main 
data \/var\/lib\/postgresql\/9.5\/main 
locale en_US.UTF-8 
socket \/var\/run\/postgresql 
port 5432<\/p>\n\n\n\n

2\u3001psql\u547d\u4ee4<\/h2>\n\n\n\n

\u5b89\u88c5\u5b8c\u540e\u4f1a\u6709PostgreSQL\u7684\u5ba2\u6237\u7aefpsql\uff0c\u901a\u8fc7 sudo -u postgres psql \u8fdb\u5165\uff0c\u63d0\u793a\u7b26\u53d8\u6210\uff1a postgres=#  <\/p>\n\n\n\n

\u5728\u8fd9\u91cc\u53ef\u7528\u6267\u884cSQL\u8bed\u53e5\u548cpsql\u7684\u57fa\u672c\u547d\u4ee4\u3002\u53ef\u7528\u7684\u57fa\u672c\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n

\\password\uff1a\u8bbe\u7f6e\u5bc6\u7801\n\\q\uff1a\u9000\u51fa\n\\h\uff1a\u67e5\u770bSQL\u547d\u4ee4\u7684\u89e3\u91ca\uff0c\u6bd4\u5982\\h select\u3002\n\\?\uff1a\u67e5\u770bpsql\u547d\u4ee4\u5217\u8868\u3002\n\\l\uff1a\u5217\u51fa\u6240\u6709\u6570\u636e\u5e93\u3002<\/strong>\n\\c [database_name]\uff1a\u8fde\u63a5\u5176\u4ed6\u6570\u636e\u5e93\u3002\n\\d\uff1a\u5217\u51fa\u5f53\u524d\u6570\u636e\u5e93\u7684\u6240\u6709\u8868\u683c\u3002\n\\d [table_name]\uff1a\u5217\u51fa\u67d0\u4e00\u5f20\u8868\u683c\u7684\u7ed3\u6784\u3002\n\\<\/strong>du<\/strong>\uff1a\u5217\u51fa\u6240\u6709\u7528\u6237\u3002<\/strong>\n\\e\uff1a\u6253\u5f00\u6587\u672c\u7f16\u8f91\u5668\u3002\n\\conninfo\uff1a\u5217\u51fa\u5f53\u524d\u6570\u636e\u5e93\u548c\u8fde\u63a5\u7684\u4fe1\u606f\u3002<\/pre>\n\n\n\n

\u4e8c\u3001\u4fee\u6539\u6570\u636e\u5e93\u9ed8\u8ba4\u8d26\u53f7\u7684\u5bc6\u7801<\/h1>\n\n\n\n

1\u3001\u767b\u5f55<\/h2>\n\n\n\n

\u4f7f\u7528psql\u547d\u4ee4\u767b\u5f55\u6570\u636e\u5e93\u7684\u547d\u4ee4\u4e3a\uff1a<\/p>\n\n\n\n

psql -U dbuser -d exampledb -h 127.0.0.1 -p 5432<\/pre>\n\n\n\n

\u4e0a\u9762\u547d\u4ee4\u7684\u53c2\u6570\u542b\u4e49\u5982\u4e0b\uff1a-U\u6307\u5b9a\u7528\u6237\uff0c-d\u6307\u5b9a\u6570\u636e\u5e93\uff0c-h\u6307\u5b9a\u670d\u52a1\u5668\uff0c-p\u6307\u5b9a\u7aef\u53e3\u3002<\/p>\n\n\n\n

\u8f93\u5165\u4e0a\u9762\u547d\u4ee4\u4ee5\u540e\uff0c\u7cfb\u7edf\u4f1a\u63d0\u793a\u8f93\u5165dbuser\u7528\u6237\u7684\u5bc6\u7801\u3002<\/p>\n\n\n\n

psql\u547d\u4ee4\u5b58\u5728\u7b80\u5199\u5f62\u5f0f<\/strong>\uff1a<\/p>\n\n\n\n

\u5982\u679c\u5f53\u524dLinux\u7cfb\u7edf\u7528\u6237\uff0c\u540c\u65f6\u4e5f\u662fPostgreSQL\u7528\u6237\uff0c\u5219\u53ef\u4ee5\u7701\u7565\u7528\u6237\u540d\uff08-U\u53c2\u6570\u7684\u90e8\u5206\uff09<\/p>\n\n\n\n

\u5982\u679cPostgreSQL\u5185\u90e8\u8fd8\u5b58\u5728\u4e0e\u5f53\u524d\u7cfb\u7edf\u7528\u6237\u540c\u540d\u7684\u6570\u636e\u5e93\uff0c\u5219\u6570\u636e\u5e93\u540d\u4e5f\u53ef\u4ee5\u7701\u7565\u3002<\/p>\n\n\n\n

2\u3001\u4fee\u6539\u9ed8\u8ba4\u7ba1\u7406\u5458\u8d26\u53f7\u7684\u5bc6\u7801<\/h2>\n\n\n\n

\u4ee5Linux\u7528\u6237\"postgres\"\u7684\u8eab\u4efd\uff08\u6b64\u65f6\u53ea\u6709\u8be5\u7528\u6237\u6709psql\u547d\u4ee4\uff09\u6267\u884cpsql\u5ba2\u6237\u7aef\uff0c\u8fdb\u5165\u8be5\u5ba2\u6237\u7aef\u7684\u63d0\u793a\u7b26\u754c\u9762\uff08\u8fd9\u91cc\u7cfb\u7edf\u7528\u6237\u540d\u3001\u6570\u636e\u5e93\u7528\u6237\u540d\u3001\u6570\u636e\u5e93\u540d\u90fd\u4e3apostgres\uff0c\u6545\u53ef\u91c7\u7528\u7b80\u5199\u5f62\u5f0f\uff09<\/p>\n\n\n\n

sudo -u postgres psql<\/pre>\n\n\n\n
\"\"\/<\/figure>\n\n\n\n
postgres=# alter user postgres with password '123456';<\/pre>\n\n\n\n

\u8fd9\u6837\uff0c\u7ba1\u7406\u5458\"postgres\"\u7684\u5bc6\u7801\u5c31\u4e3a\"123456\"\u3002<\/p>\n\n\n\n

\u9000\u51fapsql\u5ba2\u6237\u7aef\u547d\u4ee4\uff1a\\q<\/p>\n\n\n\n

\u82e5\u8981\u5220\u9664\u8be5\u7ba1\u7406\u5458\u7684\u5bc6\u7801\uff0c\u5219\u53ef\u7528\u547d\u4ee4\uff1asudo -u postgres psql -d postgres<\/p>\n\n\n\n

\u4e09\u3001\u4fee\u6539Linux\u7528\u6237\u7684\u5bc6\u7801<\/h1>\n\n\n\n

\u8fd9\u4e2a\u5176\u5b9e\u4e0e\u5b89\u88c5postgresql\u5173\u7cfb\u4e0d\u5927\u3002<\/p>\n\n\n\n

\u4ee5Linux\u7528\u6237\"postgres\"\u4e3a\u4f8b\uff0c\u5bf9\u5176\u8fd0\u884cpasswd\u547d\u4ee4\uff1a<\/p>\n\n\n\n

zsm@ubuntu:\/etc\/postgresql\/9.5\/main$ sudo -u postgres passwd \/\/\u4e5f\u53ef\u4ee5 sudo passwd postgres<\/pre>\n\n\n\n
Changing password for postgres.\n(current) UNIX password: \nEnter new UNIX password: \nRetype new UNIX password: \npasswd: password updated successfully<\/pre>\n\n\n\n

\u56db\u3001\u914d\u7f6e\u6570\u636e\u5e93\u4ee5\u5141\u8bb8\u8fdc\u7a0b\u8fde\u63a5\u8bbf\u95ee<\/h1>\n\n\n\n

 \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9ed8\u8ba4\u53ea\u80fd\u672c\u5730\u624d\u80fd\u8fde\u63a5\u6570\u636e\u5e93\uff0c\u5176\u4ed6\u673a\u5b50\u8bbf\u95ee\u4e0d\u4e86\uff0c\u9700\u8981\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n\n\n\n

1\u3001\u4fee\u6539\u76d1\u542c\u5730\u5740<\/h2>\n\n\n\n
sudo gedit \/etc\/postgresql\/9.5\/main\/postgresql.conf <\/pre>\n\n\n\n

\u5c06 #listen_addresses = 'localhost' \u7684\u6ce8\u91ca\u53bb\u6389\u5e76\u6539\u4e3a listen_addresses = '*' <\/p>\n\n\n\n

2\u3001\u4fee\u6539\u53ef\u8bbf\u95ee\u7528\u6237\u7684IP\u6bb5<\/h2>\n\n\n\n
sudo gedit \/etc\/postgresql\/9.5\/main\/pg_hba.conf <\/pre>\n\n\n\n

\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\uff1a host all all 0.0.0.0 0.0.0.0 md5 \uff0c\u8868\u793a\u8fd0\u884c\u4efb\u4f55IP\u8fde\u63a5<\/p>\n\n\n\n

3\u3001\u91cd\u542f\u6570\u636e\u5e93<\/h2>\n\n\n\n
sudo \/etc\/init.d\/postgresql restart<\/pre>\n\n\n\n

\u5176\u4ed6\uff1a\u7ba1\u7406\u7528\u6237\u3001\u5efa\u7acb\u6570\u636e\u5e93\u7b49<\/p>\n\n\n\n

\u4e94\u3001\u6dfb\u52a0\u65b0\u7528\u6237\u548c\u65b0\u6570\u636e\u5e93<\/h1>\n\n\n\n

\u6cd5\u4e00\uff1a\u4f7f\u7528PostgreSQL\u5ba2\u6237\u7aefpsql<\/h2>\n\n\n\n

\u8fd0\u884c\u7cfb\u7edf\u7528\u6237\"postgres\"\u7684psql\u547d\u4ee4\uff0c\u8fdb\u5165\u5ba2\u6237\u7aef\uff1a<\/p>\n\n\n\n

sudo -u postgres psql<\/pre>\n\n\n\n

\u521b\u5efa\u7528\u6237\"xiaozhang\"\u5e76\u8bbe\u7f6e\u5bc6\u7801\uff1a<\/p>\n\n\n\n

postgres=# create user xiaozhang with password '123456';<\/pre>\n\n\n\n

\u521b\u5efa\u6570\u636e\u5e93exampledb\uff0c\u6240\u6709\u8005\u4e3axiaozhang\uff1a<\/p>\n\n\n\n

postgres=# create database exampledb owner xiaozhang;<\/pre>\n\n\n\n

\u5c06exampledb\u6570\u636e\u5e93\u7684\u6240\u6709\u6743\u9650\u8d4b\u4e88xiaozhang\uff0c\u5426\u5219xiaozhang\u53ea\u80fd\u767b\u5f55psql\uff0c\u6ca1\u6709\u4efb\u4f55\u6570\u636e\u5e93\u64cd\u4f5c\u6743\u9650\uff1a<\/p>\n\n\n\n

grant all privileges on database exampledb to xiaozhang;<\/pre>\n\n\n\n

\u6cd5\u4e8c\uff1a\u4f7f\u7528shell\u547d\u4ee4\u884c<\/h2>\n\n\n\n

\u5b89\u88c5PostgreSQL\u540e\u63d0\u4f9b\u4e86createuser\u548ccreatedb\u547d\u4ee4\u884c\u7a0b\u5e8f\u3002<\/p>\n\n\n\n

\u9996\u5148\u521b\u5efa\u6570\u636e\u5e93\u7528\u6237\"xiaozhang1\"\uff0c\u5e76\u6307\u5b9a\u4e3a\u8d85\u7ea7\u7528\u6237\uff1a<\/p>\n\n\n\n

sudo -u postgres createuser --superuser xiaozhang1;<\/pre>\n\n\n\n

\u63a5\u7740\u767b\u5f55psql\u63a7\u5236\u53f0\u8bbe\u7f6e\u5176\u5bc6\u7801\u540e\u9000\u51fa\uff1a<\/p>\n\n\n\n

zsm@ubuntu:~$ sudo -<\/strong>u postgres psql<\/strong>\npsql (9.5.3)\nType \"help\" for help.\n\npostgres<\/strong>=<\/strong># \\password xiaozhang1;<\/strong>\nEnter new password: \nEnter it again: \npostgres<\/strong>=# \\q<\/strong><\/pre>\n\n\n\n

\u7136\u540e\u5728shell\u547d\u4ee4\u884c\u4e0b\u521b\u5efa\u6570\u636e\u5e93\u5e76\u6307\u5b9a\u6240\u6709\u8005\uff1a<\/p>\n\n\n\n

sudo -u postgres createdb -O xiaozhang1 exampledb1;<\/pre>\n\n\n\n

\u6cd5\u4e09\uff1a\u4f7f\u7528paadmin3\u4ee5\u7ba1\u7406\u5458\u8fde\u63a5\u6570\u636e\u5e93\u540e\u521b\u5efa<\/h2>\n\n\n\n

\u7ecf\u8fc7\u6cd5\u4e00\u3001\u6cd5\u4e8c\u64cd\u4f5c\u540e\uff0c\u6267\u884c  postgres=# \\du  \u5f97\u5230\u7528\u6237\u5217\u8868\u5982\u4e0b\uff1a<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

\u6267\u884c postgres=# \\l \u5f97\u5230\u6570\u636e\u5e93\u5217\u8868\u5982\u4e0b\uff1a<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

\u82e5\u8981\u5220\u9664\u7528\u6237\uff08\u5982\u5220\u9664xiaozhang\uff09\u53ef\u5148 postgres=# drop database example; \u518d postgres=# drop user xiaozhang; \u3002<\/p>\n\n\n\n

\u516d\u3001\u57fa\u672c\u6570\u636e\u5e93\u64cd\u4f5c\u547d\u4ee4<\/h1>\n\n\n\n
# \u521b\u5efa\u65b0\u8868 \nCREATE TABLE user_tbl(name VARCHAR(20), signup_date DATE);\n# \u63d2\u5165\u6570\u636e \nINSERT INTO user_tbl(name, signup_date) VALUES('\u5f20\u4e09', '2013-12-22');\n# \u9009\u62e9\u8bb0\u5f55 \nSELECT * FROM user_tbl;\n# \u66f4\u65b0\u6570\u636e \nUPDATE user_tbl set name = '\u674e\u56db' WHERE name = '\u5f20\u4e09';\n# \u5220\u9664\u8bb0\u5f55 \nDELETE FROM user_tbl WHERE name = '\u674e\u56db' ;\n# \u6dfb\u52a0\u680f\u4f4d \nALTER TABLE user_tbl ADD email VARCHAR(40);\n# \u66f4\u65b0\u7ed3\u6784 \nALTER TABLE user_tbl ALTER COLUMN signup_date SET NOT NULL;\n# \u66f4\u540d\u680f\u4f4d \nALTER TABLE user_tbl RENAME COLUMN signup_date TO signup;\n# \u5220\u9664\u680f\u4f4d \nALTER TABLE user_tbl DROP COLUMN email;\n# \u8868\u683c\u66f4\u540d \nALTER TABLE user_tbl RENAME TO backup_tbl;\n# \u5220\u9664\u8868\u683c \nDROP TABLE IF EXISTS backup_tbl;<\/pre>\n","protected":false},"excerpt":{"rendered":"

https:\/\/www.cnblogs.com\/Siegel\/p\/6917213.html 1\u3001\u5b89\u88c5 \u4f7f\u7528\u5982\u4e0b<\/p>\n","protected":false},"author":1,"featured_media":635,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,18],"tags":[],"yoast_head":"\nUbuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4<\/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.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ubuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"og:description\" content=\"https:\/\/www.cnblogs.com\/Siegel\/p\/6917213.html 1\u3001\u5b89\u88c5 \u4f7f\u7528\u5982\u4e0b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-06T00:50:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-06T00:52:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2020\/03\/9e3df8dcd100baa1613b79b74a10b912c8fc2ea2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"921\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"\u7ba1\u7406\u5458\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/\"},\"author\":{\"name\":\"\u7ba1\u7406\u5458\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"headline\":\"Ubuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e\",\"datePublished\":\"2020-03-06T00:50:30+00:00\",\"dateModified\":\"2020-03-06T00:52:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/\"},\"wordCount\":143,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"articleSection\":[\"Linux\",\"Linux\u670d\u52a1\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/\",\"name\":\"Ubuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\",\"isPartOf\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\"},\"datePublished\":\"2020-03-06T00:50:30+00:00\",\"dateModified\":\"2020-03-06T00:52:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.linuxdevops.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u670d\u52a1\",\"item\":\"https:\/\/www.linuxdevops.cn\/linuxservice\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ubuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#website\",\"url\":\"https:\/\/www.linuxdevops.cn\/\",\"name\":\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\",\"description\":\"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\u7b14\u8bb0\",\"publisher\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\"},\"alternateName\":\"linuxdevops\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.linuxdevops.cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1\",\"name\":\"\u7ba1\u7406\u5458\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg\",\"contentUrl\":\"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg\",\"width\":512,\"height\":512,\"caption\":\"\u7ba1\u7406\u5458\"},\"logo\":{\"@id\":\"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/\"},\"description\":\"\u7ba1\u7406\u5458\",\"url\":\"https:\/\/www.linuxdevops.cn\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ubuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","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.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/","og_locale":"zh_CN","og_type":"article","og_title":"Ubuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","og_description":"https:\/\/www.cnblogs.com\/Siegel\/p\/6917213.html 1\u3001\u5b89\u88c5 \u4f7f\u7528\u5982\u4e0b","og_url":"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/","og_site_name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","article_published_time":"2020-03-06T00:50:30+00:00","article_modified_time":"2020-03-06T00:52:03+00:00","og_image":[{"width":921,"height":1024,"url":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2020\/03\/9e3df8dcd100baa1613b79b74a10b912c8fc2ea2.png","type":"image\/png"}],"author":"\u7ba1\u7406\u5458","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/#article","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/"},"author":{"name":"\u7ba1\u7406\u5458","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"headline":"Ubuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e","datePublished":"2020-03-06T00:50:30+00:00","dateModified":"2020-03-06T00:52:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/"},"wordCount":143,"commentCount":0,"publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"articleSection":["Linux","Linux\u670d\u52a1"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/","url":"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/","name":"Ubuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e - Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","isPartOf":{"@id":"https:\/\/www.linuxdevops.cn\/#website"},"datePublished":"2020-03-06T00:50:30+00:00","dateModified":"2020-03-06T00:52:03+00:00","breadcrumb":{"@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.linuxdevops.cn\/2020\/03\/ubuntu-postgresql-installation-and-configuration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.linuxdevops.cn\/"},{"@type":"ListItem","position":2,"name":"Linux\u670d\u52a1","item":"https:\/\/www.linuxdevops.cn\/linuxservice\/"},{"@type":"ListItem","position":3,"name":"Ubuntu PostgreSQL\u5b89\u88c5\u548c\u914d\u7f6e"}]},{"@type":"WebSite","@id":"https:\/\/www.linuxdevops.cn\/#website","url":"https:\/\/www.linuxdevops.cn\/","name":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4","description":"Linux\u81ea\u52a8\u5316\u8fd0\u7ef4\u7b14\u8bb0","publisher":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1"},"alternateName":"linuxdevops","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.linuxdevops.cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":["Person","Organization"],"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/3e206335d5796fdd8679e449df72a0d1","name":"\u7ba1\u7406\u5458","image":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/","url":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg","contentUrl":"https:\/\/www.linuxdevops.cn\/wp-content\/uploads\/2019\/07\/cropped-index.jpg","width":512,"height":512,"caption":"\u7ba1\u7406\u5458"},"logo":{"@id":"https:\/\/www.linuxdevops.cn\/#\/schema\/person\/image\/"},"description":"\u7ba1\u7406\u5458","url":"https:\/\/www.linuxdevops.cn\/author\/root\/"}]}},"_links":{"self":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/634"}],"collection":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/comments?post=634"}],"version-history":[{"count":2,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/634\/revisions"}],"predecessor-version":[{"id":637,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/posts\/634\/revisions\/637"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/media\/635"}],"wp:attachment":[{"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/media?parent=634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/categories?post=634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxdevops.cn\/wp-json\/wp\/v2\/tags?post=634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}