{"id":1573,"date":"2017-12-19T22:53:48","date_gmt":"2017-12-19T13:53:48","guid":{"rendered":"https:\/\/www.beeete2.com\/blog\/?p=1573"},"modified":"2018-11-17T23:12:10","modified_gmt":"2018-11-17T14:12:10","slug":"postgresql-10-0%e3%82%92centos-7%e3%81%ab%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.beeete2.com\/blog\/?p=1573","title":{"rendered":"PostgreSQL 10.0\u3092CentOS 7\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>\u4e45\u3005\u306bPostgreSQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u306e\u3067\u30e1\u30e2\u3002<br \/>\n\u6614\u306f\u30bd\u30fc\u30b9\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u305f\u3093\u3067\u3059\u3051\u3069\u4eca\u306fyum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307e\u3059\u3002<\/p>\n<p>2018-02-28\u8ffd\u8a18<br \/>\nCentOS\u6a19\u6e96\u30ec\u30dd\u30b8\u30c8\u30ea\u304b\u3089PostgreSQL\u3092\u9664\u5916\u3059\u308b\u65b9\u6cd5\u3092<strong>vim<\/strong>\u306e\u30a8\u30c7\u30a3\u30c3\u30c8\u304b\u3089<strong>yum-config-manager<\/strong>\u3092\u4f7f\u3046\u65b9\u6cd5\u3078\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u6a19\u6e96\u30d1\u30c3\u30b1\u30fc\u30b8\u306ePostgreSQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre><code class=\"language-bash\">\nsudo yum install yum-utils\nsudo yum-config-manager --setopt=base.exclude=postgresql* --save\nsudo yum-config-manager --setopt=updates.exclude=postgresql* --save\n<\/code><\/pre>\n<p>PostgreSQL 10.0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/p>\n<pre><code class=\"language-bash\">\nsudo yum install https:\/\/download.postgresql.org\/pub\/repos\/yum\/10\/redhat\/rhel-7-x86_64\/pgdg-centos10-10-2.noarch.rpm\nsudo yum install postgresql10-server\n\n# initdb\u3092\u5b9f\u884c\u3059\u308b\uff08--no-locale\u3068\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306butf-8\u3092\u6307\u5b9a\uff09\nsudo PGSETUP_INITDB_OPTIONS=\"--encoding=UTF-8 --no-locale\" \/usr\/pgsql-10\/bin\/postgresql-10-setup initdb\n\n# \u8d77\u52d5\u3059\u308b\nsudo systemctl start postgresql-10\n\n# \u78ba\u8a8d\nsudo -i -u postgres psql -l\n<\/code><\/pre>\n<p>initdb\u6642\u306b\u6307\u5b9a\u3057\u305f\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d<\/p>\n<pre><code class=\"language-text\">\n                             List of databases\n   Name    |  Owner   | Encoding | Collate | Ctype |   Access privileges   \n-----------+----------+----------+---------+-------+-----------------------\n postgres  | postgres | UTF8     | C       | C     | \n template0 | postgres | UTF8     | C       | C     | =c\/postgres          +\n           |          |          |         |       | postgres=CTc\/postgres\n template1 | postgres | UTF8     | C       | C     | =c\/postgres          +\n           |          |          |         |       | postgres=CTc\/postgres\n(3 rows)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e45\u3005\u306bPostgreSQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u306e\u3067\u30e1\u30e2\u3002 \u6614\u306f\u30bd\u30fc\u30b9\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u305f\u3093\u3067\u3059\u3051\u3069\u4eca\u306fyum\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307e\u3059\u3002 2018-02-28\u8ffd\u8a18 CentOS\u6a19\u6e96\u30ec\u30dd\u30b8\u30c8\u30ea\u304b\u3089Postgr &#8230; <\/p>\n","protected":false},"author":1,"featured_media":603,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75],"tags":[12],"views":7095,"_links":{"self":[{"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1573"}],"collection":[{"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1573"}],"version-history":[{"count":12,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1573\/revisions"}],"predecessor-version":[{"id":2300,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1573\/revisions\/2300"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/603"}],"wp:attachment":[{"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beeete2.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}