{"id":424,"date":"2019-08-09T10:34:12","date_gmt":"2019-08-09T02:34:12","guid":{"rendered":"https:\/\/www.aiqinqin.info\/?p=424"},"modified":"2020-08-20T09:38:16","modified_gmt":"2020-08-20T01:38:16","slug":"centos7%e5%ae%89%e8%a3%85postgresql11%e5%b9%b6%e4%bf%ae%e6%94%b9%e9%bb%98%e8%ae%a4%e6%95%b0%e6%8d%ae%e5%ba%93%e8%b7%af%e5%be%84","status":"publish","type":"post","link":"https:\/\/www.aiqinqin.info\/?p=424","title":{"rendered":"centos7\u5b89\u88c5postgresql11\u5e76\u4fee\u6539\u9ed8\u8ba4\u6570\u636e\u5e93\u8def\u5f84"},"content":{"rendered":"<blockquote><p>\n  \u5b89\u88c5\u7cfb\u7edf\u4e3acentos7.x\n<\/p><\/blockquote>\n<pre><code class=\"\">yum install centos-release-scl -y\ncd \/opt &amp;&amp; wget https:\/\/download.postgresql.org\/pub\/repos\/yum\/reporpms\/EL-7-x86_64\/pgdg-redhat-repo-latest.noarch.rpm\nrpm -i pgdg-redhat-repo-latest.noarch.rpm\n[ -f \/opt\/pgdg-redhat-repo-latest.noarch.rpm ] &amp;&amp; rm \/opt\/pgdg-redhat-repo-latest.noarch.rpm -rf\nyum clean all &amp;&amp; yum makecache &amp;&amp; yum install postgresql11* -y\n\/usr\/pgsql-11\/bin\/postgresql-11-setup initdb \nsystemctl enable postgresql-11 &amp;&amp; systemctl stop postgresql-11\nmkdir -p \/opt\/data\/postgresql11 &amp;&amp; chown postgres:postgres \/opt\/data\/postgresql11 -R\ncd \/var\/lib\/pgsql\/11\/ &amp;&amp; mv * \/opt\/data\/postgresql11\/  \nsed -i 's\/Environment=PGDATA=\\\/var\\\/lib\\\/pgsql\\\/11\\\/data\\\/\/Environment=PGDATA=\\\/opt\\\/data\\\/postgresql11\\\/data\\\/\/g' \/usr\/lib\/systemd\/system\/postgresql-11.service\nsystemctl daemon-reload\nsystemctl start postgresql-11\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u7cfb\u7edf\u4e3acentos7.x yum install centos-release-scl -y cd \/op [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,3],"tags":[],"class_list":["post-424","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux"],"_links":{"self":[{"href":"https:\/\/www.aiqinqin.info\/index.php?rest_route=\/wp\/v2\/posts\/424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aiqinqin.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aiqinqin.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aiqinqin.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aiqinqin.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=424"}],"version-history":[{"count":4,"href":"https:\/\/www.aiqinqin.info\/index.php?rest_route=\/wp\/v2\/posts\/424\/revisions"}],"predecessor-version":[{"id":669,"href":"https:\/\/www.aiqinqin.info\/index.php?rest_route=\/wp\/v2\/posts\/424\/revisions\/669"}],"wp:attachment":[{"href":"https:\/\/www.aiqinqin.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aiqinqin.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aiqinqin.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}