{"id":41844,"date":"2023-08-11T09:23:05","date_gmt":"2023-06-27T18:42:34","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/"},"modified":"2024-04-30T18:02:13","modified_gmt":"2024-04-30T10:02:13","slug":"%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/","title":{"rendered":"\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082JCIE-BU\uff09\u3002\uff082\uff09"},"content":{"rendered":"<p>\u4e3a\u4e86\u5b58\u50a8\u4ece2JCIE-BU\u4e2d\u83b7\u53d6\u7684\u5404\u79cd\u6570\u503c\uff0c\u672c\u6b21\u6211\u4eec\u5c06\u5728\u6811\u8393\u6d3e\u4e0a\u5b89\u88c5\u5e76\u914d\u7f6ePostgreSQL\u3002<\/p>\n<h1>\u5b89\u88c5PostgreSQL\u3002<\/h1>\n<p>\u5982\u679c\u6700\u521d\u4e0d\u5047\u601d\u7d22\u5730\u8fd0\u884csudo apt install postgres\uff0c\u5c31\u4f1a\u9047\u5230\u9519\u8bef\u3002<\/p>\n<details>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5931\u6557\u30ed\u30b0pi@raspberrypi:~ $ sudo apt install postgresql<br \/>\n\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30b9\u30c8\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059&#8230; \u5b8c\u4e86<br \/>\n\u4f9d\u5b58\u95a2\u4fc2\u30c4\u30ea\u30fc\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059&#8230;<br \/>\n\u72b6\u614b\u60c5\u5831\u3092\u8aad\u307f\u53d6\u3063\u3066\u3044\u307e\u3059&#8230; \u5b8c\u4e86<br \/>\n\u4ee5\u4e0b\u306e\u8ffd\u52a0\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059:<br \/>\nlibllvm7 libpq5 postgresql-11 postgresql-client-11 postgresql-client-common postgresql-common sysstat<br \/>\n\u63d0\u6848\u30d1\u30c3\u30b1\u30fc\u30b8:<br \/>\npostgresql-doc postgresql-doc-11 libjson-perl isag<br \/>\n\u4ee5\u4e0b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u65b0\u305f\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059:<br \/>\nlibllvm7 libpq5 postgresql postgresql-11 postgresql-client-11 postgresql-client-common postgresql-common sysstat<br \/>\n\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9: 0 \u500b\u3001\u65b0\u898f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb: 8 \u500b\u3001\u524a\u9664: 0 \u500b\u3001\u4fdd\u7559: 0 \u500b\u3002<br \/>\n27.0 MB \u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u3053\u306e\u64cd\u4f5c\u5f8c\u306b\u8ffd\u52a0\u3067 105 MB \u306e\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u304c\u6d88\u8cbb\u3055\u308c\u307e\u3059\u3002<br \/>\n\u7d9a\u884c\u3057\u307e\u3059\u304b? [Y\/n] y<br \/>\n\u53d6\u5f97:1 http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/raspbian-archive\/raspbian buster\/main armhf libllvm7 armhf 1:7.0.1-8+rpi3+deb10u2 [11.4 MB]<br \/>\n\u30a8\u30e9\u30fc:2 http:\/\/raspbian.raspberrypi.org\/raspbian buster\/main armhf libpq5 armhf 11.12-0+deb10u1<br \/>\n404 Not Found [IP: 93.93.128.193 80]<br \/>\n\u30a8\u30e9\u30fc:4 http:\/\/raspbian.raspberrypi.org\/raspbian buster\/main armhf postgresql-client-11 armhf 11.12-0+deb10u1<br \/>\n404 Not Found [IP: 93.93.128.193 80]<br \/>\n\u30a8\u30e9\u30fc:6 http:\/\/raspbian.raspberrypi.org\/raspbian buster\/main armhf postgresql-11 armhf 11.12-0+deb10u1<br \/>\n404 Not Found [IP: 93.93.128.193 80]<br \/>\n\u53d6\u5f97:3 http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/raspbian-archive\/raspbian buster\/main armhf postgresql-client-common all 200+deb10u4 [85.1 kB]<br \/>\n\u53d6\u5f97:5 http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/raspbian-archive\/raspbian buster\/main armhf postgresql-common all 200+deb10u4 [225 kB]<br \/>\n\u53d6\u5f97:7 http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/raspbian-archive\/raspbian buster\/main armhf postgresql all 11+200+deb10u4 [61.1 kB]<br \/>\n\u53d6\u5f97:8 http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/raspbian-archive\/raspbian buster\/main armhf sysstat armhf 12.0.3-2 [513 kB]<br \/>\n12.2 MB \u3092 5\u79d2 \u3067\u53d6\u5f97\u3057\u307e\u3057\u305f (2,281 kB\/s)<br \/>\nE: http:\/\/raspbian.raspberrypi.org\/raspbian\/pool\/main\/p\/postgresql-11\/libpq5_11.12-0+deb10u1_armhf.deb \u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f 404 Not Found [IP: 93.93.128.193 80]<br \/>\nE: http:\/\/raspbian.raspberrypi.org\/raspbian\/pool\/main\/p\/postgresql-11\/postgresql-client-11_11.12-0+deb10u1_armhf.deb \u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f 404 Not Found [IP: 93.93.128.193 80]<br \/>\nE: http:\/\/raspbian.raspberrypi.org\/raspbian\/pool\/main\/p\/postgresql-11\/postgresql-11_11.12-0+deb10u1_armhf.deb \u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f 404 Not Found [IP: 93.93.128.193 80]<br \/>\nE: \u3044\u304f\u3064\u304b\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002apt-get update \u3092\u5b9f\u884c\u3059\u308b\u304b &#8211;fix-missing \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u3066\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044<\/p>\n<\/details>\n<p>\u56e0\u6b64\uff0c\u6211\u5148\u6267\u884c\u4e86apt-get update\uff0c\u7136\u540e\u518d\u8bd5\u7740\u8fd0\u884capt install\u3002<\/p>\n<details>\u6210\u529f\u65f6\u7684\u65e5\u5fd7pi@raspberrypi:~ $ sudo apt-get update<br \/>\n\u83b7\u53d6:1 http:\/\/archive.raspberrypi.org\/debian buster InRelease [32.6 kB]<br \/>\n\u83b7\u53d6:2 http:\/\/raspbian.raspberrypi.org\/raspbian buster InRelease [15.0 kB]<br \/>\n\u83b7\u53d6:3 http:\/\/archive.raspberrypi.org\/debian buster\/main armhf Packages [393 kB]<br \/>\n\u83b7\u53d6:4 http:\/\/raspbian.raspberrypi.org\/raspbian buster\/main armhf Packages [13.0 MB]<br \/>\n\u83b7\u53d6:5 http:\/\/raspbian.raspberrypi.org\/raspbian buster\/contrib armhf Packages [58.8 kB]<br \/>\n\u83b7\u53d6:6 http:\/\/raspbian.raspberrypi.org\/raspbian buster\/non-free armhf Packages [104 kB]<br \/>\n\u5df2\u83b7\u53d6 13.6 MB\uff0c\u572819\u79d2\u5185 (712 kB\/s)<br \/>\n\u6b63\u5728\u8bfb\u53d6\u8f6f\u4ef6\u5305\u5217\u8868&#8230; \u5b8c\u6210<br \/>\npi@raspberrypi:~ $ sudo apt install postgresql<br \/>\n\u6b63\u5728\u8bfb\u53d6\u8f6f\u4ef6\u5305\u5217\u8868&#8230; \u5b8c\u6210<br \/>\n\u6b63\u5728\u5efa\u7acb\u4f9d\u8d56\u6811<br \/>\n\u6b63\u5728\u8bfb\u53d6\u72b6\u6001\u4fe1\u606f&#8230; \u5b8c\u6210<br \/>\n\u4e0b\u5217\u989d\u5916\u7684\u8f6f\u4ef6\u5305\u5c06\u88ab\u5b89\u88c5\uff1a<br \/>\nlibllvm7 libpq5 postgresql-11 postgresql-client-11<br \/>\npostgresql-client-common postgresql-common sysstat<br \/>\n\u5efa\u8bae\u5b89\u88c5\uff1a<br \/>\npostgresql-doc postgresql-doc-11 libjson-perl isag<br \/>\n\u4e0b\u5217\u65b0\u8f6f\u4ef6\u5305\u5c06\u88ab\u5b89\u88c5\uff1a<br \/>\nlibllvm7 libpq5 postgresql postgresql-11<br \/>\npostgresql-client-11 postgresql-client-common postgresql-common sysstat<br \/>\n\u5347\u7ea7\u4e86 0 \u4e2a\u8f6f\u4ef6\u5305\uff0c\u65b0\u5b89\u88c5\u4e86 8 \u4e2a\u8f6f\u4ef6\u5305\uff0c\u5c06\u5378\u8f7d 0 \u4e2a\u8f6f\u4ef6\u5305\uff0c\u6709 13 \u4e2a\u8f6f\u4ef6\u5305\u672a\u88ab\u5347\u7ea7\u3002<br \/>\n\u9700\u8981\u4e0b\u8f7d 27.0 MB\/14.8 MB \u7684\u5f52\u6863\u3002<br \/>\n\u6b64\u64cd\u4f5c\u540e\u5c06\u65b0\u589e 105 MB \u7684\u5df2\u4f7f\u7528\u7a7a\u95f4\u3002<br \/>\n\u60a8\u5e0c\u671b\u7ee7\u7eed\u6267\u884c\u5417\uff1f [Y\/n] y<br \/>\n\u83b7\u53d6:1 http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/raspbian-archive\/raspbian buster\/main armhf libpq5 armhf 11.13-0+deb10u1 [155 kB]<br \/>\n\u83b7\u53d6:2 http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/raspbian-archive\/raspbian buster\/main armhf postgresql-client-11 armhf 11.13-0+deb10u1 [1,304 kB]<br \/>\n\u83b7\u53d6:3 http:\/\/ftp.jaist.ac.jp\/pub\/Linux\/raspbian-archive\/raspbian buster\/main armhf postgresql-11 armhf 11.13-0+deb10u1 [13.3 MB]<br \/>\n\u5df2\u83b7\u53d6 14.8 MB\uff0c\u57287\u79d2\u5185 (2,117 kB\/s)<br \/>\n\u6b63\u5728\u9884\u914d\u7f6e\u8f6f\u4ef6\u5305 &#8230;<br \/>\n\u9009\u62e9\u4e86\u4ee5\u524d\u672a\u9009\u62e9\u7684\u8f6f\u4ef6\u5305 libllvm7:armhf\u3002<br \/>\n(\u6b63\u5728\u8bfb\u53d6\u6570\u636e\u5e93 &#8230; \u76ee\u524d\u5171\u5b89\u88c5\u6709 98850 \u4e2a\u6587\u4ef6\u548c\u76ee\u5f55\u3002)<br \/>\n\u6b63\u5728\u89e3\u538b\u7f29 libllvm7:armhf (1:7.0.1-8+rpi3+deb10u2) &#8230;<br \/>\n\u6b63\u5728\u9009\u62e9\u4ee5\u524d\u672a\u9009\u62e9\u7684\u8f6f\u4ef6\u5305 libpq5:armhf\u3002<br \/>\n\u6b63\u5728\u89e3\u538b\u7f29 libpq5:armhf (11.13-0+deb10u1) &#8230;<br \/>\n\u6b63\u5728\u9009\u62e9\u4ee5\u524d\u672a\u9009\u62e9\u7684\u8f6f\u4ef6\u5305 postgresql-client-common\u3002<br \/>\n\u6b63\u5728\u89e3\u538b\u7f29 postgresql-client-common (200+deb10u4) &#8230;<br \/>\n\u6b63\u5728\u9009\u62e9\u4ee5\u524d\u672a\u9009\u62e9\u7684\u8f6f\u4ef6\u5305 postgresql-client-11\u3002<br \/>\n\u6b63\u5728\u89e3\u538b\u7f29 postgresql-client-11 (11.13-0+deb10u1) &#8230;<br \/>\n\u6b63\u5728\u9009\u62e9\u4ee5\u524d\u672a\u9009\u62e9\u7684\u8f6f\u4ef6\u5305 postgresql-common\u3002<br \/>\n\u6b63\u5728\u89e3\u538b\u7f29 postgresql-common (200+deb10u4) &#8230;<br \/>\n\u6b63\u5728\u9009\u62e9\u4ee5\u524d\u672a\u9009\u62e9\u7684\u8f6f\u4ef6\u5305 postgresql-11\u3002<br \/>\n\u6b63\u5728\u89e3\u538b\u7f29 postgresql-11 (11.13-0+deb10u1) &#8230;<br \/>\n\u6b63\u5728\u9009\u62e9\u4ee5\u524d\u672a\u9009\u62e9\u7684\u8f6f\u4ef6\u5305 postgresql\u3002<br \/>\n\u6b63\u5728\u89e3\u538b\u7f29 postgresql (11+200+deb10u4) &#8230;<br \/>\n\u6b63\u5728\u9009\u62e9\u4ee5\u524d\u672a\u9009\u62e9\u7684\u8f6f\u4ef6\u5305 sysstat\u3002<br \/>\n\u6b63\u5728\u89e3\u538b\u7f29 sysstat (12.0.3-2) &#8230;<br \/>\n\u6b63\u5728\u8bbe\u7f6e postgresql-client-common (200+deb10u4) &#8230;<br \/>\n\u6b63\u5728\u8bbe\u7f6e libpq5:armhf (11.13-0+deb10u1) &#8230;<br \/>\n\u6b63\u5728\u8bbe\u7f6e postgresql-client-11 (11.13-0+deb10u1) &#8230;<br \/>\nupdate-alternatives: \u4f7f\u7528 \/usr\/share\/postgresql\/11\/man\/man1\/psql.1.gz \u4ee5\u63d0\u4f9b \/usr\/share\/man\/man1\/psql.1.gz (psql.1.gz)<br \/>\n\u6b63\u5728\u8bbe\u7f6e postgresql-common (200+deb10u4) &#8230;<br \/>\nsupported-versions: \u8b66\u544a\uff01\u672a\u77e5\u53d1\u884c\u7248\uff1araspbian<br \/>\n\u5728 ID_LIKE \u4e2d\u53d1\u73b0 debian\uff0c\u5c06\u5176\u89c6\u4e3a Debian<br \/>\n\u5c06\u7528\u6237 postgres \u6dfb\u52a0\u5230\u7ec4 ssl-cert \u4e2d<\/p>\n<p>\u6b63\u5728\u521b\u5efa\u914d\u7f6e\u6587\u4ef6 \/etc\/postgresql-common\/createcluster.conf (\u65b0\u7248\u672c)<br \/>\n\u6b63\u5728\u4ece\u5df2\u5b89\u88c5\u7684 myspell\/hunspell \u8f6f\u4ef6\u5305\u6784\u5efa PostgreSQL \u8bcd\u5178 &#8230;<br \/>\nen_gb<br \/>\n\u6b63\u5728\u5220\u9664\u8fc7\u65f6\u7684\u8bcd\u5178\u6587\u4ef6\uff1a<br \/>\n\u6b63\u5728\u521b\u5efa\u7b26\u53f7\u94fe\u63a5 \/etc\/systemd\/system\/multi-user.target.wants\/postgresql.service \u2192 \/lib\/systemd\/system\/postgresql.service<br \/>\n\u6b63\u5728\u8bbe\u7f6e libllvm7:armhf (1:7.0.1-8+rpi3+deb10u2) &#8230;<br \/>\n\u6b63\u5728\u8bbe\u7f6e sysstat (12.0.3-2) &#8230;<\/p>\n<p>\u6b63\u5728\u521b\u5efa\u914d\u7f6e\u6587\u4ef6 \/etc\/default\/sysstat (\u65b0\u7248\u672c)<br \/>\nupdate-alternatives: \u4f7f\u7528 \/usr\/bin\/sar.sysstat \u4ee5\u63d0\u4f9b \/usr\/bin\/sar (sar)<br \/>\n\u6b63\u5728\u521b\u5efa\u7b26\u53f7\u94fe\u63a5 \/etc\/systemd\/system\/multi-user.target.wants\/sysstat.service \u2192 \/lib\/systemd\/system\/sysstat.service<br \/>\n\u6b63\u5728\u8bbe\u7f6e postgresql-11 (11.13-0+deb10u1) &#8230;<br \/>\n\u6b63\u5728\u521b\u5efa\u65b0\u7684 PostgreSQL \u96c6\u7fa4 11\/main &#8230;<br \/>\n\/usr\/lib\/postgresql\/11\/bin\/initdb -D \/var\/lib\/postgresql\/11\/main &#8211;auth-local peer &#8211;auth-host md5<br \/>\n\u6570\u636e\u5e93\u7cfb\u7edf\u7684\u6587\u4ef6\u6240\u6709\u8005\u5c06\u662f\u201cpostgres\u201d\u3002<br \/>\n\u6b64\u7528\u6237\u4e5f\u5e94\u8be5\u62e5\u6709\u670d\u52a1\u5668\u8fdb\u7a0b\u3002<\/p>\n<p>\u6570\u636e\u5e93\u7fa4\u96c6\u5c06\u4ee5\u201cja_JP.UTF-8\u201d\u533a\u57df\u8bbe\u7f6e\u521d\u59cb\u5316\u3002<br \/>\n\u56e0\u6b64\uff0c\u9ed8\u8ba4\u7684\u6570\u636e\u5e93\u7f16\u7801\u65b9\u5f0f\u5df2\u8bbe\u7f6e\u4e3aUTF8\u3002<br \/>\ninitdb: \u65e0\u6cd5\u627e\u5230\u9002\u7528\u4e8e\u533a\u57df\u201cja_JP.UTF-8\u201d\u7684\u5408\u9002\u7684\u6587\u672c\u641c\u7d22\u8bbe\u7f6e<br \/>\n\u9ed8\u8ba4\u7684\u6587\u672c\u641c\u7d22\u8bbe\u7f6e\u5df2\u8bbe\u7f6e\u4e3asimple\u3002<\/p>\n<p>\u6b63\u5728\u4fee\u6b63\u73b0\u6709\u76ee\u5f55\/var\/lib\/postgresql\/11\/main\u7684\u6743\u9650 &#8230; \u5b8c\u6210<br \/>\n\u6b63\u5728\u521b\u5efa\u5b50\u76ee\u5f55 &#8230; \u5b8c\u6210<br \/>\n\u9009\u62e9\u9ed8\u8ba4\u7684 max_connections \u503c &#8230; 100<br \/>\n\u9009\u62e9\u9ed8\u8ba4\u7684 shared_buffers \u503c &#8230; 128MB<br \/>\n\u9009\u62e9\u9ed8\u8ba4\u65f6\u533a &#8230; Asia\/Tokyo<br \/>\n\u9009\u62e9\u52a8\u6001\u5171\u4eab\u5185\u5b58\u7684\u5b9e\u73b0 &#8230; posix<br \/>\n\u521b\u5efa\u914d\u7f6e\u6587\u4ef6 &#8230; \u5b8c\u6210<br \/>\n\u6267\u884c\u5f15\u5bfc\u811a\u672c &#8230; \u5b8c\u6210<br \/>\n\u6267\u884c\u5f15\u5bfc\u540e\u7684\u521d\u59cb\u5316 &#8230; \u5b8c\u6210<br \/>\n\u5c06\u6570\u636e\u540c\u6b65\u5230\u78c1\u76d8&#8230;\u5b8c\u6210<\/p>\n<p>\u6210\u529f\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u542f\u52a8\u6570\u636e\u5e93\u670d\u52a1\u5668\uff1a<\/p>\n<\/details>\n<p>\u6211\u6309\u7167\u6210\u529f\u5b89\u88c5\u65f6\u7684\u63d0\u793a\u4fe1\u606f\u6267\u884c\u4e86\u547d\u4ee4\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">pi@raspberrypi:~ $<\/span> <span class=\"nb\">sudo <\/span>pg_ctlcluster 11 main start\r\n<span class=\"gp\">pi@raspberrypi:~ $<\/span> <span class=\"nb\">sudo <\/span>su postgres\r\n<span class=\"gp\">postgres@raspberrypi:\/home\/pi$<\/span> psql\r\n<span class=\"go\">psql (11.13 (Raspbian 11.13-0+deb10u1))\r\n\"help\" \u3067\u30d8\u30eb\u30d7\u3092\u8868\u793a\u3057\u307e\u3059\u3002\r\n\r\n<\/span><span class=\"gp\">postgres=#<\/span> <span class=\"nb\">exit<\/span>\r\n<span class=\"gp\">postgres@raspberrypi:\/home\/pi$<\/span> \r\n<\/code><\/pre>\n<h1>\u6dfb\u52a0\u6570\u636e\u5e93\u7528\u6237<\/h1>\n<pre class=\"post-pre\"><code><span class=\"gp\">pi@raspberrypi:~ $<\/span> <span class=\"nb\">sudo <\/span>su - postgres\r\n<span class=\"gp\">postgres@raspberrypi:~$<\/span> createuser <span class=\"nt\">--pwprompt<\/span> <span class=\"nt\">--interactive<\/span> pgadmin\r\n<span class=\"go\">\u65b0\u3057\u3044\u30ed\u30fc\u30eb\u306e\u305f\u3081\u306e\u30d1\u30b9\u30ef\u30fc\u30c9: \r\n\u3082\u3046\u4e00\u5ea6\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\uff1a\r\n\u65b0\u3057\u3044\u30ed\u30fc\u30eb\u3092\u30b9\u30fc\u30d1\u30fc\u30e6\u30fc\u30b6\u306b\u3057\u307e\u3059\u304b\uff1f (y\/n)y\r\n<\/span><span class=\"gp\">postgres@raspberrypi:~$<\/span> \r\n<\/code><\/pre>\n<h1>\u521b\u5efa\u6570\u636e\u5e93<\/h1>\n<p>\u521b\u5efa\u540d\u4e3asample_db\u7684\u6570\u636e\u5e93\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">postgres@raspberrypi:~$<\/span> psql\r\n<span class=\"go\">psql (11.13 (Raspbian 11.13-0+deb10u1))\r\n\"help\" \u3067\u30d8\u30eb\u30d7\u3092\u8868\u793a\u3057\u307e\u3059\u3002\r\n\r\n<\/span><span class=\"gp\">postgres=#<\/span> <span class=\"se\">\\l<\/span>\r\n<span class=\"go\">                                         \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             | ja_JP.UTF-8 | ja_JP.UTF-8       |\r\n template0 | postgres | UTF8             | ja_JP.UTF-8 | ja_JP.UTF-8       | =c\/postgres          +\r\n           |          |                  |             |                   | postgres=CTc\/postgres\r\n template1 | postgres | UTF8             | ja_JP.UTF-8 | ja_JP.UTF-8       | =c\/postgres          +\r\n           |          |                  |             |                   | postgres=CTc\/postgres\r\n(3 \u884c)\r\n\r\n<\/span><span class=\"gp\">postgres=#<\/span> create database sample_db<span class=\"p\">;<\/span>\r\n<span class=\"go\">CREATE DATABASE\r\n\r\n<\/span><span class=\"gp\">postgres=#<\/span> <span class=\"se\">\\l<\/span>\r\n<span class=\"go\">                                         \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             | ja_JP.UTF-8 | ja_JP.UTF-8       |\r\n sample_db | postgres | UTF8             | ja_JP.UTF-8 | ja_JP.UTF-8       |\r\n template0 | postgres | UTF8             | ja_JP.UTF-8 | ja_JP.UTF-8       | =c\/postgres          +\r\n           |          |                  |             |                   | postgres=CTc\/postgres\r\n template1 | postgres | UTF8             | ja_JP.UTF-8 | ja_JP.UTF-8       | =c\/postgres          +\r\n           |          |                  |             |                   | postgres=CTc\/postgres\r\n(4 \u884c)\r\n\r\n<\/span><span class=\"gp\">postgres=#<\/span>\r\n<\/code><\/pre>\n<h1>\u521b\u5efa\u684c\u5b50<\/h1>\n<p>\u4f5c\u4e3a\u6837\u672c\uff0c\u521b\u5efa\u4e00\u4e2a\u5e26\u6709\u5e8f\u5217\u53f7\u548c\u59d3\u540d\u7684\u8868\u683c\u3002<br \/>\n\u9650\u5236\u6570\u636e\u7684\u72b6\u6001\u4e0d\u80fd\u540c\u65f6\u4e3a\u7a7a\uff08NULL\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">postgres@raspberrypi:~$<\/span> psql <span class=\"nt\">-U<\/span> pgadmin <span class=\"nt\">-d<\/span> sample_db <span class=\"nt\">-h<\/span> localhost\r\n<span class=\"go\">\u30e6\u30fc\u30b6 pgadmin \u306e\u30d1\u30b9\u30ef\u30fc\u30c9:\r\npsql (11.13 (Raspbian 11.13-0+deb10u1))\r\nSSL \u63a5\u7d9a (\u30d7\u30ed\u30c8\u30b3\u30eb: TLSv1.3\u3001\u6697\u53f7\u5316\u65b9\u5f0f: TLS_AES_256_GCM_SHA384\u3001\u30d3\u30c3\u30c8\u9577: 256\u3001\u5727\u7e2e: \u30aa\u30d5)\r\n\"help\" \u3067\u30d8\u30eb\u30d7\u3092\u8868\u793a\u3057\u307e\u3059\u3002\r\n\r\n<\/span><span class=\"gp\">sample_db=#<\/span> create table sample<span class=\"o\">(<\/span> <span class=\"nb\">id <\/span>serial NOT NULL, name text NOT NULL, PRIMARY KEY<span class=\"o\">(<\/span><span class=\"nb\">id<\/span><span class=\"o\">)<\/span> <span class=\"o\">)<\/span><span class=\"p\">;<\/span>\r\n<span class=\"go\">CREATE TABLE\r\n<\/span><span class=\"gp\">sample_db=#<\/span> <span class=\"se\">\\d<\/span>t\r\n<span class=\"go\">            \u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u4e00\u89a7\r\n \u30b9\u30ad\u30fc\u30de |  \u540d\u524d  |    \u578b    |  \u6240\u6709\u8005\r\n----------+--------+----------+----------\r\n public   | sample | \u30c6\u30fc\u30d6\u30eb | postgres\r\n(1 \u884c)\r\n\r\n<\/span><span class=\"gp\">sample_db=#<\/span> <span class=\"se\">\\d<\/span>\r\n<span class=\"go\">                 \u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u4e00\u89a7\r\n \u30b9\u30ad\u30fc\u30de |     \u540d\u524d      |     \u578b     |  \u6240\u6709\u8005\r\n----------+---------------+------------+----------\r\n public   | sample        | \u30c6\u30fc\u30d6\u30eb   | postgres\r\n public   | sample_id_seq | \u30b7\u30fc\u30b1\u30f3\u30b9 | postgres\r\n(2 \u884c)\r\n\r\n<\/span><span class=\"gp\">sample_db=#<\/span> <span class=\"se\">\\d<\/span> sample\r\n<span class=\"go\">                            \u30c6\u30fc\u30d6\u30eb \"public.sample\"\r\n  \u5217  |   \u578b    | \u7167\u5408\u9806\u5e8f | Null \u5024\u3092\u8a31\u5bb9 |             \u30c7\u30d5\u30a9\u30eb\u30c8\r\n------+---------+----------+---------------+------------------------------------\r\n id   | integer |          | not null      | nextval('sample_id_seq'::regclass)\r\n name | text    |          | not null      |\r\n\u30a4\u30f3\u30c7\u30c3\u30af\u30b9:\r\n    \"sample_pkey\" PRIMARY KEY, btree (id)\r\n\r\n<\/span><span class=\"gp\">sample_db=#<\/span>\r\n<\/code><\/pre>\n<h2>\u6dfb\u52a0\u5217<\/h2>\n<p>\u5728\u4e2d\u6587\u4e2d\u5bf9\u4ee5\u4e0b\u8bed\u53e5\u8fdb\u884c\u6539\u5199\uff1aALTER TABLE \u8868\u540d ADD COLUMN \u5217\u540d \u6570\u636e\u7c7b\u578b\uff1b<\/p>\n<p>\u4fee\u6539\u8868 \u7ed9 \u8868\u540d \u6dfb\u52a0 \u5217\u540d \u6570\u636e\u7c7b\u578b\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">sample_db=#<\/span> ALTER TABLE sample ADD COLUMN <span class=\"nb\">date <\/span>timestamp<span class=\"p\">;<\/span>\r\n<span class=\"go\">ALTER TABLE\r\n<\/span><span class=\"gp\">sample_db=#<\/span> <span class=\"se\">\\d<\/span> sample\r\n<span class=\"go\">                                      \u30c6\u30fc\u30d6\u30eb \"public.sample\"\r\n  \u5217  |             \u578b              | \u7167\u5408\u9806\u5e8f | Null \u5024\u3092\u8a31\u5bb9 |             \u30c7\u30d5\u30a9\u30eb\u30c8\r\n------+-----------------------------+----------+---------------+------------------------------------\r\n id   | integer                     |          | not null      | nextval('sample_id_seq'::regclass)\r\n name | text                        |          | not null      |\r\n date | timestamp without time zone |          |               |\r\n\u30a4\u30f3\u30c7\u30c3\u30af\u30b9:\r\n    \"sample_pkey\" PRIMARY KEY, btree (id)\r\n<\/span><\/code><\/pre>\n<h2>\u5220\u9664\u5217\u3002<\/h2>\n<pre class=\"post-pre\"><code><span class=\"gp\">sample_db=#<\/span> ALTER TABLE sample DROP COLUMN <span class=\"nb\">date<\/span><span class=\"p\">;<\/span>\r\n<span class=\"go\">ALTER TABLE\r\n<\/span><span class=\"gp\">sample_db=#<\/span> <span class=\"se\">\\d<\/span> sample\r\n<span class=\"go\">                            \u30c6\u30fc\u30d6\u30eb \"public.sample\"\r\n  \u5217  |   \u578b    | \u7167\u5408\u9806\u5e8f | Null \u5024\u3092\u8a31\u5bb9 |             \u30c7\u30d5\u30a9\u30eb\u30c8\r\n------+---------+----------+---------------+------------------------------------\r\n id   | integer |          | not null      | nextval('sample_id_seq'::regclass)\r\n name | text    |          | not null      |\r\n\u30a4\u30f3\u30c7\u30c3\u30af\u30b9:\r\n    \"sample_pkey\" PRIMARY KEY, btree (id)\r\n<\/span><\/code><\/pre>\n<h1>PostgreSQL\u7684\u914d\u7f6e<\/h1>\n<p>\u867d\u7136\u6211\u6253\u7b97\u7528\u4e00\u4e2a\u6811\u8393\u6d3e\u6765\u5b8c\u6210\u4e00\u5207\uff0c\u6240\u4ee5\u89c9\u5f97\u4e0d\u9700\u8981\uff0c\u4f46\u8fd8\u662f\u63d0\u4f9b\u7ed9\u60a8\u3002<\/p>\n<h2>\u53ea\u5141\u8bb8\u6765\u81ea\u5176\u4ed6\u673a\u5668\u7684\u8bbf\u95ee<\/h2>\n<h3>\u6570\u636e\u5e93\u8bbe\u7f6e\u6587\u4ef6postgre.conf<\/h3>\n<pre class=\"post-pre\"><code><span class=\"go\">sudo vi \/etc\/postgresql\/11\/main\/postgresql.conf \r\n<\/span><\/code><\/pre>\n<p>\u56e0\u4e3a\u6709\u8bc4\u8bba\u63d0\u5230\u4e86listenaddresses\uff0c\u6240\u4ee5\u3001\u3001\u3001<\/p>\n<pre class=\"post-pre\"><code><span class=\"c\">#listen_addresses = 'localhost'         # what IP address(es) to listen on;<\/span>\r\n<\/code><\/pre>\n<p>\u8bf7\u5220\u9664\u6ce8\u91ca\uff0c\u5e76\u5c06\u5730\u5740\u4ecelocalhost\u66f4\u6539\u4e3a*\u3002<\/p>\n<pre class=\"post-pre\"><code>listen_addresses <span class=\"o\">=<\/span> <span class=\"s1\">'*'<\/span>         <span class=\"c\"># what IP address(es) to listen on;<\/span>\r\n<\/code><\/pre>\n<h3>pg_hba.conf \u7684\u610f\u601d\u662f Postgres \u6570\u636e\u5e93\u7684\u4e3b\u673a\u8bbf\u95ee\u89c4\u5219\u6587\u4ef6\u3002<\/h3>\n<pre class=\"post-pre\"><code><span class=\"gp\">pi@raspberrypi:~ $<\/span> <span class=\"nb\">sudo <\/span>vi \/etc\/postgresql\/11\/main\/pg_hba.conf \r\n<\/code><\/pre>\n<p>\u4e3a\u4e86\u5141\u8bb8\u4ece\u672c\u5730\u7f51\u7edc\u8fdb\u884c\u8bbf\u95ee\uff0c\u9700\u8981\u6dfb\u52a0\u4e00\u884c\u4ee3\u7801\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"c\"># IPv4 local connections:<\/span>\r\nhost    all             all             127.0.0.1\/32            md5\r\nhost    all             all             192.168.10.0\/24         md5\r\n<\/code><\/pre>\n<h2>\u91cd\u65b0\u542f\u52a8PostgreSQL<\/h2>\n<p>\u66f4\u65b0\u4e24\u4e2a\u6587\u4ef6\u540e\uff0c\u91cd\u65b0\u542f\u52a8PostgreSQL\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">pi@raspberrypi:~ $<\/span> <span class=\"nb\">sudo <\/span>pg_ctlcluster 11 main restart\r\n<\/code><\/pre>\n<h1>\u4f7f\u7528Python\u8fde\u63a5\u5230PostgreSQL<\/h1>\n<h2>\u5c06 pip3 \u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3002<\/h2>\n<pre class=\"post-pre\"><code><span class=\"gp\">pi@raspberrypi:~ $<\/span> pip3 <span class=\"nb\">install<\/span> <span class=\"nt\">--upgrade<\/span> pip\r\n<span class=\"go\">Looking in indexes: https:\/\/pypi.org\/simple, https:\/\/www.piwheels.org\/simple\r\nCollecting pip\r\n  Downloading https:\/\/files.pythonhosted.org\/packages\/90\/a9\/1ea3a69a51dcc679724e3512fc2aa1668999eed59976f749134eb02229c8\/pip-21.3-py3-none-any.whl (1.7MB)\r\n    100% |????????????????????????????????| 1.7MB 234kB\/s\r\nInstalling collected packages: pip\r\nSuccessfully installed pip-21.3\r\n<\/span><\/code><\/pre>\n<h2>\u5b89\u88c5psycopg2<\/h2>\n<pre class=\"post-pre\"><code><span class=\"gp\">pi@raspberrypi:~ $<\/span> pip3 <span class=\"nb\">install <\/span>psycopg2\r\n<span class=\"go\">WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.\r\nPlease see https:\/\/github.com\/pypa\/pip\/issues\/5599 for advice on fixing the underlying issue.\r\nTo avoid this problem you can invoke Python with '-m pip' instead of running pip directly.\r\nDefaulting to user installation because normal site-packages is not writeable\r\nLooking in indexes: https:\/\/pypi.org\/simple, https:\/\/www.piwheels.org\/simple\r\nCollecting psycopg2\r\n  Downloading https:\/\/www.piwheels.org\/simple\/psycopg2\/psycopg2-2.9.1-cp37-cp37m-linux_armv7l.whl (505 kB)\r\n     |????????????????????????????????| 505 kB 213 kB\/s\r\nInstalling collected packages: psycopg2\r\nSuccessfully installed psycopg2-2.9.1\r\n<\/span><\/code><\/pre>\n<h2>\u4f7f\u7528Python\u8fde\u63a5\u5230PostgreSQL\u3002<\/h2>\n<p>\u6211\u4eec\u5c06\u9996\u5148\u83b7\u53d6\u5e76\u663e\u793a\u5728\u8868\u4e2d\u7684\u6570\u636e\uff0c\u7136\u540e\u6dfb\u52a0\u6570\u636e\uff0c\u6700\u540e\u518d\u6b21\u83b7\u53d6\u5e76\u663e\u793a\u6570\u636e\uff0c\u4ee5\u6267\u884c\u8fd9\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"kn\">import<\/span> <span class=\"nn\">psycopg2<\/span>\r\n\r\n<span class=\"n\">con<\/span> <span class=\"o\">=<\/span> <span class=\"n\">psycopg2<\/span><span class=\"p\">.<\/span><span class=\"n\">connect<\/span><span class=\"p\">(<\/span> <span class=\"n\">database<\/span><span class=\"o\">=<\/span><span class=\"s\">'sample_db'<\/span><span class=\"p\">,<\/span> <span class=\"n\">user<\/span><span class=\"o\">=<\/span><span class=\"s\">'pgadmin'<\/span><span class=\"p\">,<\/span> <span class=\"n\">password<\/span><span class=\"o\">=<\/span><span class=\"s\">'xxxxxx'<\/span><span class=\"p\">,<\/span> <span class=\"n\">host<\/span><span class=\"o\">=<\/span><span class=\"s\">'localhost'<\/span><span class=\"p\">,<\/span> <span class=\"n\">port<\/span><span class=\"o\">=<\/span><span class=\"mi\">5432<\/span><span class=\"p\">)<\/span>\r\n\r\n<span class=\"n\">cur<\/span> <span class=\"o\">=<\/span> <span class=\"n\">con<\/span><span class=\"p\">.<\/span><span class=\"n\">cursor<\/span><span class=\"p\">();<\/span>\r\n\r\n<span class=\"n\">cur<\/span><span class=\"p\">.<\/span><span class=\"n\">execute<\/span><span class=\"p\">(<\/span><span class=\"s\">'SELECT * FROM sample;'<\/span><span class=\"p\">)<\/span>\r\n<span class=\"n\">result<\/span> <span class=\"o\">=<\/span> <span class=\"n\">cur<\/span><span class=\"p\">.<\/span><span class=\"n\">fetchall<\/span><span class=\"p\">()<\/span>\r\n<span class=\"k\">print<\/span><span class=\"p\">(<\/span> <span class=\"n\">result<\/span> <span class=\"p\">)<\/span>\r\n\r\n<span class=\"n\">cur<\/span><span class=\"p\">.<\/span><span class=\"n\">execute<\/span><span class=\"p\">(<\/span><span class=\"s\">\"INSERT INTO sample(name) VALUES ('<\/span><span class=\"se\">\\\"<\/span><span class=\"s\">test02<\/span><span class=\"se\">\\\"<\/span><span class=\"s\">');\"<\/span> <span class=\"p\">)<\/span>\r\n\r\n<span class=\"n\">cur<\/span><span class=\"p\">.<\/span><span class=\"n\">execute<\/span><span class=\"p\">(<\/span><span class=\"s\">'SELECT * FROM sample;'<\/span><span class=\"p\">)<\/span>\r\n<span class=\"n\">result<\/span> <span class=\"o\">=<\/span> <span class=\"n\">cur<\/span><span class=\"p\">.<\/span><span class=\"n\">fetchall<\/span><span class=\"p\">()<\/span>\r\n<span class=\"k\">print<\/span><span class=\"p\">(<\/span> <span class=\"n\">result<\/span> <span class=\"p\">)<\/span>\r\n\r\n<span class=\"n\">con<\/span><span class=\"p\">.<\/span><span class=\"n\">commit<\/span><span class=\"p\">()<\/span>\r\n\r\n<span class=\"n\">cur<\/span><span class=\"p\">.<\/span><span class=\"n\">close<\/span><span class=\"p\">()<\/span>\r\n<span class=\"n\">con<\/span><span class=\"p\">.<\/span><span class=\"n\">close<\/span><span class=\"p\">()<\/span>\r\n<\/code><\/pre>\n<p>\u5728\u6837\u672c\u8868\u4e2d\uff0c\u5df2\u7ecf\u5b58\u5728id\uff1a1\uff0cname\uff1atest01\u7684\u6570\u636e\u3002<br \/>\n\u5728\u793a\u4f8b\u7a0b\u5e8f\u4e2d\uff0c\u6dfb\u52a0\u4e86name\uff1atest02\u3002<br \/>\n\u8fd0\u884c\u793a\u4f8b\u540e\uff0cid\u4f1a\u81ea\u52a8\u589e\u52a0\uff0c\u5e76\u6dfb\u52a0test02\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">pi@raspberrypi:~ $<\/span> python3 sample.py\r\n<span class=\"go\">[(1, '\"test01\"')]\r\n[(1, '\"test01\"'), (2, '\"test02\"')]\r\n<\/span><\/code><\/pre>\n<pre class=\"post-pre\"><code><span class=\"gp\">pi@raspberrypi:~ $<\/span> psql <span class=\"nt\">-U<\/span> pgadmin <span class=\"nt\">-d<\/span> sample_db <span class=\"nt\">-h<\/span> localhost <span class=\"nt\">-p<\/span> 5432\r\n<span class=\"go\">\u30e6\u30fc\u30b6 pgadmin \u306e\u30d1\u30b9\u30ef\u30fc\u30c9:\r\npsql (11.13 (Raspbian 11.13-0+deb10u1))\r\nSSL \u63a5\u7d9a (\u30d7\u30ed\u30c8\u30b3\u30eb: TLSv1.3\u3001\u6697\u53f7\u5316\u65b9\u5f0f: TLS_AES_256_GCM_SHA384\u3001\u30d3\u30c3\u30c8\u9577: 256\u3001\u5727\u7e2e: \u30aa\u30d5)\r\n\"help\" \u3067\u30d8\u30eb\u30d7\u3092\u8868\u793a\u3057\u307e\u3059\u3002\r\n\r\n<\/span><span class=\"gp\">sample_db=#<\/span> <span class=\"k\">select<\/span> <span class=\"k\">*<\/span> from sample<span class=\"p\">;<\/span>\r\n<span class=\"go\"> id |   name\r\n----+----------\r\n  1 | \"test01\"\r\n  2 | \"test02\"\r\n(2 \u884c)\r\n<\/span><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4e86\u5b58\u50a8\u4ece2JCIE-BU\u4e2d\u83b7\u53d6\u7684\u5404\u79cd\u6570\u503c\uff0c\u672c\u6b21\u6211\u4eec\u5c06\u5728\u6811\u8393\u6d3e\u4e0a\u5b89\u88c5\u5e76\u914d\u7f6ePostgreSQL\u3002 \u5b89\u88c5Post [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-41844","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>\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082JCIE-BU\uff09\u3002\uff082\uff09 - 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\/\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082jcie-bu\uff09\u3002\uff082\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082JCIE-BU\uff09\u3002\uff082\uff09\" \/>\n<meta property=\"og:description\" content=\"\u4e3a\u4e86\u5b58\u50a8\u4ece2JCIE-BU\u4e2d\u83b7\u53d6\u7684\u5404\u79cd\u6570\u503c\uff0c\u672c\u6b21\u6211\u4eec\u5c06\u5728\u6811\u8393\u6d3e\u4e0a\u5b89\u88c5\u5e76\u914d\u7f6ePostgreSQL\u3002 \u5b89\u88c5Post [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082jcie-bu\uff09\u3002\uff082\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-27T18:42:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T10:02:13+00:00\" \/>\n<meta name=\"author\" content=\"\u9038, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u9038, \u79d1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \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\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/\",\"name\":\"\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082JCIE-BU\uff09\u3002\uff082\uff09 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-06-27T18:42:34+00:00\",\"dateModified\":\"2024-04-30T10:02:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082JCIE-BU\uff09\u3002\uff082\uff09\"}]},{\"@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\/85c1dae56e6ea1e695c73d33c684d487\",\"name\":\"\u9038, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"caption\":\"\u9038, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082JCIE-BU\uff09\u3002\uff082\uff09 - 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\/\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082jcie-bu\uff09\u3002\uff082\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082JCIE-BU\uff09\u3002\uff082\uff09","og_description":"\u4e3a\u4e86\u5b58\u50a8\u4ece2JCIE-BU\u4e2d\u83b7\u53d6\u7684\u5404\u79cd\u6570\u503c\uff0c\u672c\u6b21\u6211\u4eec\u5c06\u5728\u6811\u8393\u6d3e\u4e0a\u5b89\u88c5\u5e76\u914d\u7f6ePostgreSQL\u3002 \u5b89\u88c5Post [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082jcie-bu\uff09\u3002\uff082\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-27T18:42:34+00:00","article_modified_time":"2024-04-30T10:02:13+00:00","author":"\u9038, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u9038, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/","name":"\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082JCIE-BU\uff09\u3002\uff082\uff09 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-06-27T18:42:34+00:00","dateModified":"2024-04-30T10:02:13+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5c1d\u8bd5\u4f7f\u7528\u6811\u8393\u6d3e\u4f7f\u7528\u6b27\u59c6\u9f99\u73af\u5883\u4f20\u611f\u5668\uff082JCIE-BU\uff09\u3002\uff082\uff09"}]},{"@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\/85c1dae56e6ea1e695c73d33c684d487","name":"\u9038, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","caption":"\u9038, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e6%a0%91%e8%8e%93%e6%b4%be%e4%bd%bf%e7%94%a8%e6%ac%a7%e5%a7%86%e9%be%99%e7%8e%af%e5%a2%83%e4%bc%a0%e6%84%9f%e5%99%a8%ef%bc%882jcie-bu%ef%bc%89%e3%80%82%ef%bc%882\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41844","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\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=41844"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41844\/revisions"}],"predecessor-version":[{"id":93438,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/41844\/revisions\/93438"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=41844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=41844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=41844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}