{"id":41824,"date":"2023-09-16T10:32:21","date_gmt":"2023-12-08T06:39:18","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/"},"modified":"2024-05-03T23:59:17","modified_gmt":"2024-05-03T15:59:17","slug":"%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/","title":{"rendered":"\u8981\u5728CentOS\u4e0a\u5b89\u88c5PostgreSQL"},"content":{"rendered":"<p>\u4ee5\u4e0b\u662f\u5982\u4f55\u5728CentOS\u4e0a\u5b89\u88c5PostgreSQL\u7684\u8be6\u7ec6\u6b65\u9aa4\u8bf4\u660e\u3002\u6709\u5173\u5728Windows\u4e0a\u5b89\u88c5\u7684\u4fe1\u606f\uff0c\u8bf7\u53c2\u8003\u6b64\u6587\u7ae0\u3002<\/p>\n<p>\u672c\u8bf4\u660e\u4e3b\u8981\u9488\u5bf9 PostgreSQL 14 \u548c CentOS 7\uff0c\u4f46\u4f1a\u5728\u5fc5\u8981\u65f6\u8865\u5145\u4e0d\u540c\u7248\u672c\u7684\u7279\u6b8a\u4e4b\u5904\u3002<\/p>\n<h1>\u5b89\u88c5PostgreSQL<\/h1>\n<p>\u6709\u51e0\u79cd\u5b89\u88c5PostgreSQL\u7684\u65b9\u6cd5\u3002\u4e3b\u8981\u65b9\u6cd5\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u30d3\u30eb\u30c9<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">CentOS \u6a19\u6e96\u306e Yum \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f7f\u3046<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">PostgreSQL \u958b\u767a\u5143\u306e Yum \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f7f\u3046<\/ul>\n<p>\u4ece\u6e90\u4ee3\u7801\u6784\u5efa\u7684\u65b9\u6cd5\u53ef\u4ee5\u4f7f\u7528\u6700\u65b0\u7248\u672c\uff0c\u4f46\u662f\u60a8\u9700\u8981\u9996\u5148\u914d\u7f6e\u6784\u5efa\u73af\u5883\uff0c\u5e76\u4e14\u6bcf\u6b21\u5347\u7ea7\u65f6\u90fd\u9700\u8981\u8fdb\u884c\u6784\u5efa\uff0c\u8fd9\u4f1a\u5f88\u8d39\u65f6\u95f4\u3002<\/p>\n<p>\u4f7f\u7528CentOS\u7684\u6807\u51c6Yum\u4ed3\u5e93\u7684\u65b9\u6cd5\uff0c\u5b89\u88c5\u65b9\u4fbf\u5feb\u6377\uff0c\u4e0d\u8d39\u529b\uff0c\u4f46\u65e0\u6cd5\u4f7f\u7528\u6700\u65b0\u7248\u672c\u3002<\/p>\n<p>\u5728\u8fd9\u91cc\uff0c\u53ea\u9700\u8981\u6dfb\u52a0 Yum \u5b58\u50a8\u5e93\uff0c\u5c31\u53ef\u4ee5\u8f7b\u677e\u4f7f\u7528\u6700\u65b0\u7248\u672c\u4e86\u3002\u4f7f\u7528 PostgreSQL \u5f00\u53d1\u8005\u7684 Yum \u5b58\u50a8\u5e93\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<h2>\u6dfb\u52a0 PostgreSQL \u5f00\u53d1\u5143 Yum \u4ed3\u5e93<\/h2>\n<p>\u8981\u4f7f\u7528PostgreSQL\u5f00\u53d1\u6e90\u7684Yum\u4ed3\u5e93\uff0c\u9700\u8981\u5b89\u88c5\u4ed3\u5e93\u5305\u5e76\u6dfb\u52a0Yum\u4ed3\u5e93\u3002\u4ed3\u5e93\u5305\u53ef\u4ee5\u4ece\u4ee5\u4e0b\u9875\u9762\u4e0b\u8f7d\u3002<\/p>\n<p>PostgreSQL RPM\u6784\u5efa\u9879\u76ee &#8211; \u4ed3\u5e93\u8f6f\u4ef6\u5305<br \/>\nhttps:\/\/yum.postgresql.org\/repopackages.php<\/p>\n<p>\u5728\u4e0a\u8ff0\u7684\u9875\u9762\u4e0a\uff0c\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u4e0b\u8f7d\u76f8\u5e94\u7684\u5b58\u50a8\u5e93\u8f6f\u4ef6\u5305\u3002<\/p>\n<p>\u5728\u8fd9\u91cc\uff0c\u7531\u4e8e\u8981\u5b89\u88c5\u5728CentOS 7\uff08x86_64\uff09\u4e0a\uff0c\u6240\u4ee5\u8bf7\u590d\u5236\u201cCentOS 7 &#8211; x86_64\u201d\u7684URL\u3002<\/p>\n<p>\u4f7f\u7528\u590d\u5236\u7684URL\u4f5c\u4e3a\u53c2\u6570\u8fdb\u884c\u6307\u5b9a\uff0c\u5b89\u88c5\u5b58\u50a8\u5e93\u8f6f\u4ef6\u5305\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">sudo <\/span>yum <span class=\"nt\">-y<\/span> <span class=\"nb\">install <\/span>https:\/\/download.postgresql.org\/pub\/repos\/yum\/reporpms\/EL-7-x86_64\/pgdg-redhat-repo-latest.noarch.rpm\r\n<span class=\"go\">(\u7701\u7565)\r\nInstalled:\r\n  pgdg-redhat-repo.noarch 0:42.0-20\r\n\r\nComplete!\r\n<\/span><\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u4e2a\u6b65\u9aa4\uff0c\u60a8\u5c06\u80fd\u591f\u5b89\u88c5PostgreSQL\u53ca\u5176\u76f8\u5173\u8f6f\u4ef6\u5305\u3002<\/p>\n<h2>\u5b89\u88c5PostgreSQL\u8f6f\u4ef6\u5305<\/h2>\n<p>PostgreSQL\u7684\u8f6f\u4ef6\u5305\u5305\u542b\u4ee5\u4e0b\u5b50\u8f6f\u4ef6\u5305\u5982\u4e0b\u3002<\/p>\n<div>\n<div class=\"post-table\">\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u8aac\u660e<code>postgresql14<\/code>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0<code>postgresql14-libs<\/code>\u5171\u6709\u30e9\u30a4\u30d6\u30e9\u30ea<code>postgresql14-server<\/code>\u30b5\u30fc\u30d0\u30d7\u30ed\u30b0\u30e9\u30e0<code>postgresql14-docs<\/code>\u30de\u30cb\u30e5\u30a2\u30eb<code>postgresql14-contrib<\/code>\u8ffd\u52a0\u30e2\u30b8\u30e5\u30fc\u30eb<code>postgresql14-devel<\/code>\u958b\u767a\u7528\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u3068\u30e9\u30a4\u30d6\u30e9\u30ea<code>postgresql14-llvmjit<\/code>JIT \u30b3\u30f3\u30d1\u30a4\u30eb\u5bfe\u5fdc<code>postgresql14-plperl<\/code>PL\/Perl (Perl \u624b\u7d9a\u304d\u8a00\u8a9e)<code>postgresql14-plpython3<\/code>PL\/Python (Python 3 \u624b\u7d9a\u304d\u8a00\u8a9e)<code>postgresql14-pltcl<\/code>PL\/Tcl (Tcl \u624b\u7d9a\u304d\u8a00\u8a9e)<code>postgresql14-test<\/code>\u30c6\u30b9\u30c8\u30c4\u30fc\u30eb<\/div>\n<\/div>\n<p>\u8981\u5c06PostgreSQL\u7528\u4f5c\u670d\u52a1\u5668\uff0c\u9700\u8981\u5b89\u88c5postgresql14-server\u5305\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">sudo <\/span>yum <span class=\"nt\">-y<\/span> <span class=\"nb\">install <\/span>postgresql14-server\r\n<span class=\"go\">(\u7701\u7565)\r\nInstalled:\r\n  postgresql14-server.x86_64 0:14.0-1PGDG.rhel7\r\n\r\nDependency Installed:\r\n  postgresql14.x86_64 0:14.0-1PGDG.rhel7\r\n  postgresql14-libs.x86_64 0:14.0-1PGDG.rhel7\r\n\r\nComplete!\r\n<\/span><\/code><\/pre>\n<p>\u5728CentOS 8\u4e2d\uff0cYum\u5df2\u88ab\u7ee7\u4efb\u7248\u672cDNF\uff08Dandified Yum\uff09\u53d6\u4ee3\uff0c\u5e76\u4e14\u5f00\u59cb\u4ee5\u6a21\u5757\u7684\u5f62\u5f0f\u7ba1\u7406\u8f6f\u4ef6\u5305\u3002\u56e0\u6b64\uff0c\u5f53\u5c1d\u8bd5\u5b89\u88c5postgresql14-server\u5305\u65f6\uff0c\u64cd\u4f5c\u7cfb\u7edf\u9ed8\u8ba4\u7684postgresql\u6a21\u5757\u4f1a\u88ab\u4f18\u5148\u9009\u62e9\uff0c\u5bfc\u81f4\u627e\u4e0d\u5230\u8be5\u8f6f\u4ef6\u5305\u5e76\u51fa\u73b0\u9519\u8bef\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">sudo <\/span>yum <span class=\"nt\">-y<\/span> <span class=\"nb\">install <\/span>postgresql14-server\r\n<span class=\"go\">(\u7701\u7565)\r\nAll matches were filtered out by modular filtering for argument: postgresql14-server\r\nError: Unable to find a match: postgresql14-server\r\n<\/span><\/code><\/pre>\n<p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u60a8\u9700\u8981\u7981\u7528postgresql\u6a21\u5757\u540e\u518d\u5b89\u88c5\u5305\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">sudo <\/span>dnf <span class=\"nt\">-y<\/span> module disable postgresql\r\n<span class=\"go\">(\u7701\u7565)\r\nComplete!\r\n<\/span><\/code><\/pre>\n<p>\u5b89\u88c5postgresql14-server\u8f6f\u4ef6\u5305\u65f6\uff0c\u4f1a\u5b89\u88c5\u4e24\u4e2a\u4f9d\u8d56\u5305postgresql14\u548cpostgresql14-libs\u3002<\/p>\n<p>PostgreSQL \u7684\u5b89\u88c5\u8def\u5f84\u6839\u636e\u4e0d\u540c\u7684\u7248\u672c\u800c\u6709\u6240\u4e0d\u540c\u3002\u5982\u679c\u662f\u7248\u672c 14\uff0c\u5219\u5b89\u88c5\u5728 \/usr\/pgsql-14\u3002\u60a8\u4e5f\u53ef\u4ee5\u5728\u540c\u4e00\u73af\u5883\u4e2d\u5b89\u88c5\u591a\u4e2a\u4e0d\u540c\u7684\u7248\u672c\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> <span class=\"nb\">ls<\/span> \/usr\/pgsql-14\r\n<span class=\"go\">bin  lib  share\r\n<\/span><\/code><\/pre>\n<p>\u53e6\u5916\uff0c\u5982\u679c\u5728\u5b89\u88c5postgresql14-server\u5305\u65f6\uff0c\u5982\u679c\u6ca1\u6709PostgreSQL\u8d85\u7ea7\u7528\u6237postgres\uff0c\u5219\u4f1a\u521b\u5efa\u4e00\u4e2a\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">#<\/span> <span class=\"nb\">id <\/span>postgres\r\n<span class=\"go\">uid=26(postgres) gid=26(postgres) groups=26(postgres)\r\n<\/span><\/code><\/pre>\n<h1>\u521b\u5efa\u6570\u636e\u5e93\u96c6\u7fa4<\/h1>\n<p>\u6570\u636e\u5e93\u96c6\u7fa4\u662f\u7528\u6765\u5b58\u50a8\u6570\u636e\u5e93\u7684\u533a\u57df\u3002\u542f\u52a8\u6570\u636e\u5e93\u670d\u52a1\u5668\u9700\u8981\u6570\u636e\u5e93\u96c6\u7fa4\u3002<\/p>\n<p>\u5728\u4e2d\u6587\u4e2d\uff0c\u53ef\u4ee5\u8fd9\u6837\u8868\u8fbe\uff1a<br \/>\n\u521b\u5efa\u6570\u636e\u5e93\u96c6\u7fa4\u53ef\u4ee5\u4f7f\u7528initdb\u547d\u4ee4\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528\u64cd\u4f5c\u7cfb\u7edf\u9644\u5e26\u7684\u811a\u672cpostgresql-14-setup\uff0c\u4f46\u662f\u7531\u4e8e\u8ba4\u8bc1\u65b9\u5f0f\u65e0\u6cd5\u81ea\u5b9a\u4e49\u6307\u5b9a\uff0c\u56e0\u6b64\u51e0\u4e4e\u6ca1\u6709\u4ec0\u4e48\u5fc5\u8981\u7279\u610f\u4f7f\u7528\u5b83\u3002<\/p>\n<p>\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u521b\u5efa\u4f4d\u7f6e\u53ef\u4ee5\u901a\u8fc7\u73af\u5883\u53d8\u91cfPGDATA\u6216-D\u9009\u9879\u6765\u6307\u5b9a\u3002\u9ed8\u8ba4\u4f4d\u7f6e\u662f\/var\/lib\/pgsql\/14\/data\uff0c\u5e76\u4e14\u5728postgres\u7528\u6237\u7684\u914d\u7f6e\u6587\u4ef6~\/.bash_profile\u4e2d\u6307\u5b9a\u4e86\u73af\u5883\u53d8\u91cfPGDATA\u3002\u7136\u800c\uff0c\u7531\u4e8e\u7a0d\u540e\u4f1a\u63d0\u53ca\u7684\u539f\u56e0\uff0c\u4e0d\u5e94\u76f4\u63a5\u7f16\u8f91\u8be5\u6587\u4ef6\uff0c\u56e0\u6b64\u5982\u679c\u8981\u66f4\u6539\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u4f4d\u7f6e\uff0c\u6700\u597d\u4f7f\u7528-D\u9009\u9879\u3002<\/p>\n<p>\u4f5c\u4e3a\u5176\u4ed6\u6307\u5b9a\u9009\u9879\uff0c\u8fd9\u91cc\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528-E UTF8\u9009\u9879\u6765\u8bbe\u7f6e\u6570\u636e\u5e93\u521b\u5efa\u65f6\u7684\u9ed8\u8ba4\u7f16\u7801\u4e3aUTF8\uff0c&#8211;locale=C\u9009\u9879\u6765\u8bbe\u7f6e\u9ed8\u8ba4\u7684\u533a\u57df\u8bbe\u7f6e\u4e3aC\uff08\u65e0\u533a\u57df\u8bbe\u7f6e\uff09\uff0c-A scram-sha-256\u9009\u9879\u6765\u8bbe\u7f6e\u8ba4\u8bc1\u65b9\u5f0f\u4e3ascram-sha-256\uff08\u4f7f\u7528SCRAM-SHA-256\u52a0\u5bc6\u8fdb\u884c\u5bc6\u7801\u8ba4\u8bc1\uff09\uff0c-W\u9009\u9879\u7528\u4e8e\u663e\u793a\u5bc6\u7801\u8bbe\u7f6e\u7684\u8f93\u5165\u63d0\u793a\u3002<\/p>\n<p>\u5730\u57df\u8bbe\u7f6e\uff08\u30ed\u30b1\u30fc\u30eb\uff09\u662f\u6839\u636e\u8bed\u8a00\u548c\u56fd\u5bb6\u6765\u6307\u5b9a\u5904\u7406\u548c\u6392\u5e8f\u5b57\u7b26\u7684\u65b9\u5f0f\u3002\u5728\u65e5\u8bed\u4e2d\uff0c\u5f88\u5c11\u9700\u8981\u4f7f\u7528\u5730\u57df\u8bbe\u7f6e\uff0c\u56e0\u4e3a\u4f7f\u7528\u5730\u57df\u8bbe\u7f6e\u4f1a\u5bfc\u81f4\u5b57\u7b26\u5904\u7406\u53d8\u6162\uff0c\u5e76\u4e14\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u9009\u9879\uff0c\u5219\u65e0\u6cd5\u5728LIKE\u8bed\u53e5\u4e2d\u4f7f\u7528\u7d22\u5f15\uff0c\u56e0\u6b64\u6211\u4eec\u4f1a\u907f\u514d\u4f7f\u7528\u5730\u57df\u8bbe\u7f6e\u3002<\/p>\n<p>\u4e3a\u4e86\u8fd0\u884cinitdb\u547d\u4ee4\uff0c\u9700\u8981\u5207\u6362\u5230postgres\u7528\u6237\uff0c\u5e76\u901a\u8fc7su\u547d\u4ee4\u6267\u884c\u3002\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u663e\u793a\u8f93\u5165\u5bc6\u7801\u8bbe\u7f6e\u7684\u63d0\u793a\uff0c\u56e0\u6b64\u9700\u8981\u91cd\u590d\u8f93\u5165\u76f8\u540c\u7684\u5bc6\u7801\u4e24\u6b21\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">sudo <\/span>su - postgres <span class=\"nt\">-c<\/span> <span class=\"s1\">'\/usr\/pgsql-14\/bin\/initdb -E UTF8 --locale=C -A scram-sha-256 -W'<\/span>\r\n<span class=\"go\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b7\u30b9\u30c6\u30e0\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u6240\u6709\u8005\u306f\u30e6\u30fc\u30b6\u30fc\"postgres\"\u3068\u306a\u308a\u307e\u3059\u3002\r\n\u3053\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u6240\u6709\u8005\u3068\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\r\n\r\n\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306f\u30ed\u30b1\u30fc\u30eb\"C\"\u3067\u521d\u671f\u5316\u3055\u308c\u307e\u3059\u3002\r\n\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c6\u30ad\u30b9\u30c8\u691c\u7d22\u69cb\u6210\u306f english \u306b\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002\r\n\r\n\u30c7\u30fc\u30bf\u30d9\u30fc\u30b8\u306e\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u306f\u7121\u52b9\u3067\u3059\u3002\r\n\r\n\u65b0\u3057\u3044\u30b9\u30fc\u30d1\u30fc\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: (\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b)\r\n\u3082\u3046\u4e00\u5ea6\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: (\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u518d\u5165\u529b)\r\n\r\n\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\/var\/lib\/pgsql\/14\/data\u306e\u6a29\u9650\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059 ... ok\r\n\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 ... ok\r\n\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea\u306e\u5b9f\u88c5\u3092\u9078\u629e\u3057\u3066\u3044\u307e\u3059 ... posix\r\n\u30c7\u30d5\u30a9\u30eb\u30c8\u306emax_connections\u3092\u9078\u629e\u3057\u3066\u3044\u307e\u3059 ... 100\r\n\u30c7\u30d5\u30a9\u30eb\u30c8\u306eshared_buffers\u3092\u9078\u629e\u3057\u3066\u3044\u307e\u3059 ... 128MB\r\n\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6642\u9593\u5e2f\u3092\u9078\u629e\u3057\u3066\u3044\u307e\u3059 ... Asia\/Tokyo\r\n\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059 ... ok\r\n\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059 ... ok\r\n\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u5f8c\u306e\u521d\u671f\u5316\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059 ... ok\r\n\u30c7\u30fc\u30bf\u3092\u30c7\u30a3\u30b9\u30af\u306b\u540c\u671f\u3057\u3066\u3044\u307e\u3059... ok\r\n\r\n\u6210\u529f\u3057\u307e\u3057\u305f\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059:\r\n\r\n    \/usr\/pgsql-14\/bin\/pg_ctl -D \/var\/lib\/pgsql\/14\/data -l \u30ed\u30b0\u30d5\u30a1\u30a4\u30eb start\r\n\r\n<\/span><\/code><\/pre>\n<p>\u5f53\u6570\u636e\u5e93\u96c6\u7fa4\u521b\u5efa\u5b8c\u6210\u540e\uff0c\u8ba9\u6211\u4eec\u6765\u68c0\u67e5\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">sudo ls<\/span> \/var\/lib\/pgsql\/14\/data\r\n<span class=\"go\">PG_VERSION    pg_hba.conf    pg_replslot   pg_subtrans  postgresql.auto.conf\r\nbase          pg_ident.conf  pg_serial     pg_tblspc    postgresql.conf\r\nglobal        pg_logical     pg_snapshots  pg_twophase\r\npg_commit_ts  pg_multixact   pg_stat       pg_wal\r\npg_dynshmem   pg_notify      pg_stat_tmp   pg_xact\r\n<\/span><\/code><\/pre>\n<p>\u5728\u6570\u636e\u5e93\u7fa4\u96c6\u4e2d\uff0c\u4ee5.conf\u7ed3\u5c3e\u7684\u662f\u914d\u7f6e\u6587\u4ef6\u3002\u6570\u636e\u6587\u4ef6\u5b58\u50a8\u5728base\u548cglobal\u76ee\u5f55\u4e2d\uff0c\u4ee5pg_\u5f00\u5934\u7684\u76ee\u5f55\u5b58\u50a8\u63a7\u5236\u6587\u4ef6\u3002\u65e5\u5fd7\u6587\u4ef6\u9ed8\u8ba4\u5b58\u50a8\u5728log\u76ee\u5f55\u4e2d\u3002<\/p>\n<h1>\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u542f\u52a8<\/h1>\n<p>\u5982\u679c\u8981\u66f4\u6539\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u4f4d\u7f6e\uff0c\u9700\u8981\u7f16\u8f91PostgreSQL\u670d\u52a1\u7684\u5355\u5143\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">sudo <\/span>systemctl edit postgresql-14.service\r\n<\/code><\/pre>\n<p>\u5f53\u7f16\u8f91\u5668\u542f\u52a8\u65f6\uff0c\u60a8\u9700\u8981\u5728Service\u90e8\u5206\u7684Environment\u9009\u9879\u4e2d\u6307\u5b9a\u73af\u5883\u53d8\u91cfPGDATA\u6765\u786e\u5b9a\u6570\u636e\u5e93\u96c6\u7fa4\u7684\u4f4d\u7f6e\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nn\">[Service]<\/span>\r\n<span class=\"py\">Environment<\/span><span class=\"p\">=<\/span><span class=\"s\">PGDATA=\/var\/lib\/pgsql\/14\/data<\/span>\r\n<\/code><\/pre>\n<p>\u542f\u52a8\u6570\u636e\u5e93\u670d\u52a1\u5668\u4f5c\u4e3aPostgreSQL\u670d\u52a1\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">sudo <\/span>systemctl start postgresql-14.service\r\n<\/code><\/pre>\n<p>\u5982\u679c\u6ca1\u6709\u4efb\u4f55\u8f93\u51fa\uff0c\u90a3\u5c31\u8bf4\u660e\u5df2\u7ecf\u6210\u529f\u542f\u52a8\u4e86\u3002<\/p>\n<p>\u987a\u4fbf\u5728\u64cd\u4f5c\u7cfb\u7edf\u542f\u52a8\u65f6\u542f\u52a8PostgreSQL\u670d\u52a1\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">sudo <\/span>systemctl <span class=\"nb\">enable <\/span>postgresql-14.service\r\n<span class=\"go\">Created symlink from \/etc\/systemd\/system\/multi-user.target.wants\/postgresql-14.service to \/usr\/lib\/systemd\/system\/postgresql-14.service.\r\n<\/span><\/code><\/pre>\n<h1>\u8bbe\u7f6e PostgreSQL \u8d85\u7ea7\u7528\u6237\u7684\u73af\u5883\u53d8\u91cf<\/h1>\n<p>\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u7ba1\u7406\u7531PostgreSQL\u7684\u8d85\u7ea7\u7528\u6237postgres\u8d1f\u8d23\u3002\u6211\u4eec\u5c06\u8fdb\u884c\u73af\u5883\u53d8\u91cf\u7684\u8bbe\u7f6e\uff0c\u4ee5\u4fbf\u4f7f\u7528postgres\u7528\u6237\u66f4\u52a0\u65b9\u4fbf\u64cd\u4f5c\u3002<\/p>\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u73af\u5883\u53d8\u91cf\u7684\u8bbe\u7f6e\u662f\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6 ~\/.bash_profile \u8fdb\u884c\u7684\u3002\u4f46\u662f\uff0cpostgres \u7528\u6237\u7684 ~\/.bash_profile \u5728\u5b89\u88c5\u8f6f\u4ef6\u5305\u65f6\u4f1a\u88ab\u8986\u76d6\u3002\u56e0\u6b64\uff0c\u73b0\u5728\u914d\u7f6e\u6587\u4ef6\u4f7f\u7528 ~\/.bash_profile \u4e2d\u7684\u5185\u5bb9\uff0c\u7136\u540e\u901a\u8fc7\u8bfb\u53d6\u914d\u7f6e\u6587\u4ef6 ~\/.pgsql_profile \u6765\u8fdb\u884c\u73af\u5883\u53d8\u91cf\u7684\u8bbe\u7f6e\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">sudo <\/span>su - postgres\r\n<span class=\"go\">Last login: \u571f 10\u6708  2 20:42:24 JST 2021 on pts\/0\r\n<\/span><span class=\"gp\">$<\/span> vi ~\/.pgsql_profile\r\n<\/code><\/pre>\n<p>\u5728 ~\/.pgsql_profile \u6587\u4ef6\u4e2d\uff0c\u8fdb\u884c\u73af\u5883\u53d8\u91cf PATH\u3001MANPATH\u3001PGDATA \u7684\u914d\u7f6e\u3002\u50cf psql \u7b49\u5ba2\u6237\u7aef\u7a0b\u5e8f\u5df2\u5305\u542b\u5728\u9ed8\u8ba4\u7684\u641c\u7d22\u8def\u5f84\u4e2d\uff08\u901a\u8fc7\u7b26\u53f7\u94fe\u63a5\uff09\uff0c\u4f46\u50cf pg_ctl \u7b49\u670d\u52a1\u5668\u7a0b\u5e8f\u5374\u672a\u5305\u542b\u5728\u5176\u4e2d\uff0c\u6240\u4ee5\u9700\u8981\u8fdb\u884c\u73af\u5883\u53d8\u91cf PATH\u3001MANPATH \u7684\u914d\u7f6e\u3002\u73af\u5883\u53d8\u91cf PGDATA \u6307\u5b9a\u4e86\u6570\u636e\u5e93\u7fa4\u96c6\u7684\u4f4d\u7f6e\u3002\u5728\u670d\u52a1\u5668\u7a0b\u5e8f\u4e2d\uff0c\u9700\u8981\u6307\u5b9a\u6570\u636e\u5e93\u7fa4\u96c6\u7684\u4f4d\u7f6e\uff0c\u4f46\u5982\u679c\u8fdb\u884c\u73af\u5883\u53d8\u91cf PGDATA \u7684\u914d\u7f6e\uff0c\u5219\u53ef\u4ee5\u7701\u7565\u6b64\u8bbe\u7f6e\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nv\">PATH<\/span><span class=\"o\">=<\/span>\/usr\/pgsql-14\/bin:<span class=\"nv\">$PATH<\/span>\r\n<span class=\"nv\">MANPATH<\/span><span class=\"o\">=<\/span>\/usr\/pgsql-14\/share\/man:<span class=\"nv\">$MANPATH<\/span>\r\n<span class=\"nv\">PGDATA<\/span><span class=\"o\">=<\/span>\/var\/lib\/pgsql\/14\/data\r\n<span class=\"nb\">export <\/span>PATH MANPATH PGDATA\r\n<\/code><\/pre>\n<p>\u6267\u884c\u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6~\/.bash_profile\uff0c\u4ee5\u4fbf\u53cd\u6620\u914d\u7f6e\u66f4\u6539\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">.<\/span> ~\/.bash_profile\r\n<\/code><\/pre>\n<h1>\u786e\u8ba4\u6570\u636e\u5e93\u8fde\u63a5<\/h1>\n<p>\u6700\u540e\uff0c\u5c06\u663e\u793a\u6570\u636e\u5e93\u7684\u5217\u8868\u5e76\u68c0\u67e5\u662f\u5426\u80fd\u591f\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002\u5f53\u51fa\u73b0\u5bc6\u7801\u8f93\u5165\u63d0\u793a\u65f6\uff0c\u8bf7\u8f93\u5165\u5728\u521b\u5efa\u6570\u636e\u5e93\u96c6\u7fa4\u65f6\u8bbe\u7f6e\u7684\u5bc6\u7801\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> psql <span class=\"nt\">-l<\/span>\r\n<span class=\"go\">\u30e6\u30fc\u30b6 postgres \u306e\u30d1\u30b9\u30ef\u30fc\u30c9: (\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b)\r\n                                        \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4e00\u89a7\r\n   \u540d\u524d    |  \u6240\u6709\u8005  | \u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0 | \u7167\u5408\u9806\u5e8f | Ctype(\u5909\u63db\u6f14\u7b97\u5b50) |     \u30a2\u30af\u30bb\u30b9\u6a29\u9650\r\n-----------+----------+------------------+----------+-------------------+-----------------------\r\n postgres  | postgres | UTF8             | C        | C                 |\r\n template0 | postgres | UTF8             | C        | C                 | =c\/postgres          +\r\n           |          |                  |          |                   | postgres=CTc\/postgres\r\n template1 | postgres | UTF8             | C        | C                 | =c\/postgres          +\r\n           |          |                  |          |                   | postgres=CTc\/postgres\r\n(3 \u884c)\r\n<\/span><\/code><\/pre>\n<p>\u521b\u5efa\u6570\u636e\u5e93\u96c6\u7fa4\u540e\uff0c\u4f1a\u7acb\u5373\u5b58\u5728\u4e09\u4e2a\u6570\u636e\u5e93\uff1apostgres\u3001template0\u548ctemplate1\u3002<\/p>\n<p>PostgreSQL\u7684\u5b89\u88c5\u5df2\u7ecf\u5b8c\u6210\u3002\u4f46\u662f\uff0c\u5982\u679c\u8981\u4ece\u9664\u672c\u5730\u4e3b\u673a\u5916\u7684\u5176\u4ed6\u5730\u65b9\u8fdb\u884c\u8fde\u63a5\uff0c\u9700\u8981\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u914d\u7f6e\u3002\u8bf7\u53c2\u8003\u8fd9\u7bc7\u6587\u7ae0\u4e86\u89e3\u66f4\u591a\u8be6\u60c5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0b\u662f\u5982\u4f55\u5728CentOS\u4e0a\u5b89\u88c5PostgreSQL\u7684\u8be6\u7ec6\u6b65\u9aa4\u8bf4\u660e\u3002\u6709\u5173\u5728Windows\u4e0a\u5b89\u88c5\u7684\u4fe1\u606f\uff0c\u8bf7\u53c2\u8003\u6b64\u6587 [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-41824","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>\u8981\u5728CentOS\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\/\u8981\u5728centos\u4e0a\u5b89\u88c5postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u8981\u5728CentOS\u4e0a\u5b89\u88c5PostgreSQL\" \/>\n<meta property=\"og:description\" content=\"\u4ee5\u4e0b\u662f\u5982\u4f55\u5728CentOS\u4e0a\u5b89\u88c5PostgreSQL\u7684\u8be6\u7ec6\u6b65\u9aa4\u8bf4\u660e\u3002\u6709\u5173\u5728Windows\u4e0a\u5b89\u88c5\u7684\u4fe1\u606f\uff0c\u8bf7\u53c2\u8003\u6b64\u6587 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u8981\u5728centos\u4e0a\u5b89\u88c5postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-08T06:39:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-03T15:59:17+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u626c\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u626c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/\",\"name\":\"\u8981\u5728CentOS\u4e0a\u5b89\u88c5PostgreSQL - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-12-08T06:39:18+00:00\",\"dateModified\":\"2024-05-03T15:59:17+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u8981\u5728CentOS\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\/cb5556d2501da73d864cac945e8d9461\",\"name\":\"\u6e05, \u626c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u626c\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyang\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u8981\u5728CentOS\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\/\u8981\u5728centos\u4e0a\u5b89\u88c5postgresql\/","og_locale":"zh_CN","og_type":"article","og_title":"\u8981\u5728CentOS\u4e0a\u5b89\u88c5PostgreSQL","og_description":"\u4ee5\u4e0b\u662f\u5982\u4f55\u5728CentOS\u4e0a\u5b89\u88c5PostgreSQL\u7684\u8be6\u7ec6\u6b65\u9aa4\u8bf4\u660e\u3002\u6709\u5173\u5728Windows\u4e0a\u5b89\u88c5\u7684\u4fe1\u606f\uff0c\u8bf7\u53c2\u8003\u6b64\u6587 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u8981\u5728centos\u4e0a\u5b89\u88c5postgresql\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-12-08T06:39:18+00:00","article_modified_time":"2024-05-03T15:59:17+00:00","author":"\u6e05, \u626c","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u626c","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/","name":"\u8981\u5728CentOS\u4e0a\u5b89\u88c5PostgreSQL - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-12-08T06:39:18+00:00","dateModified":"2024-05-03T15:59:17+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/cb5556d2501da73d864cac945e8d9461"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u8981\u5728CentOS\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\/cb5556d2501da73d864cac945e8d9461","name":"\u6e05, \u626c","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/32a4239de8ff29adace466261d309424a1e5fe9f7e3036bf89fe03f2e3dbe717?s=96&d=mm&r=g","caption":"\u6e05, \u626c"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyang\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%a6%81%e5%9c%a8centos%e4%b8%8a%e5%ae%89%e8%a3%85postgresql\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41824","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\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=41824"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41824\/revisions"}],"predecessor-version":[{"id":94886,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41824\/revisions\/94886"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=41824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=41824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=41824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}