{"id":2439,"date":"2016-09-07T11:12:27","date_gmt":"2016-09-07T11:12:27","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=2439"},"modified":"2017-03-21T15:24:25","modified_gmt":"2017-03-21T06:24:25","slug":"centos-7%ec%97%90%ec%84%9c-postgresql-postgis-%ec%84%a4%ec%b9%98-%ec%a0%88%ec%b0%a8","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=2439","title":{"rendered":"CentOS 7\uc5d0\uc11c, \uc778\ud130\ub137\uc774 \ub418\uc9c0 \uc54a\ub294 \ud658\uacbd\uc5d0\uc11c PostgreSQL, PostGIS \uc124\uce58 \uc808\ucc28"},"content":{"rendered":"<p><P>\uc778\ud130\ub137\uc774 \ub418\uc9c0 \uc54a\uc740 \ud658\uacbd\uc5d0\uc11c PostgreSQL\uacfc PostGIS\ub97c \uc124\uce58\ud558\ub294 \uc808\ucc28\uc5d0 \ub300\ud574 \uc815\ub9ac\ud55c \uae00\uc744 Keep\ud574 \ub461\ub2c8\ub2e4. Windows\uc5d0\uc11c pgAdmin\uc73c\ub85c \uc811\uc18d\ud558\uc5ec &#8216;CREATE EXTENSION postgis&#8217; \uba85\ub839 \ucc98\ub9ac\uc5d0 \ub300\ud55c \ub0b4\uc6a9\uae4c\uc9c0 \ud655\uc778\ud558\uc600\uc2b5\ub2c8\ub2e4.<\/P><\/p>\n<p><P>\uba3c\uc800 PostgreSQL \uc124\uce58 \uc808\ucc28\uc785\ub2c8\ub2e4.<\/P><\/p>\n<p><code># postgresq RPM Install<br \/>\nrpm -Uvh pgdg-centos94-9.4-2.noarch.rpm<br \/>\nrpm -ivh postgresql94-libs-9.4.9-1PGDG.rhel7.x86_64<br \/>\nrpm -ivh postgresql94-9.4.9-1PGDG.rhel7.x86_64.rpm<br \/>\nrpm -ivh postgresql94-server-9.4.9-1PGDG.rhel7.x86_64.rpm<br \/>\nrpm -ivh postgresql94-devel-9.4.9-1PGDG.rhel7.x86_64.rpm<br \/>\nrpm -ivh libxslt-1.1.28-5.el7.x86_64.rpm<br \/>\nrpm -ivh postgresql94-contrib-9.4.9-1PGDG.rhel7.x86_64.rpm<\/p>\n<p># init DB<br \/>\n.\/postgresql194-setup initdb<\/p>\n<p># OS start, start PostgreSQL Server<br \/>\nsystemctl enable postgresql-9.4<\/p>\n<p># Start Postgresql service<br \/>\nsystemctl enable postgresql-9.4.service<br \/>\nsystemctl start postgresql-9.4.service<\/p>\n<p># Firewall allow port 5432<br \/>\nfirewall-cmd --zone=public --add-port=5432\/tcp<\/p>\n<p># allow connection for all client IP<br \/>\nvi postgresql.conf<br \/>\nlisten_addresses = \"*\"<\/p>\n<p># Configuring PostgreSQL Authentication<br \/>\nsu - postgres<br \/>\npsql<br \/>\n\\password postgres<br \/>\n\\q<\/p>\n<p># edit pg_hba.conf<br \/>\nlocal    all    all    peer<br \/>\n-> Do change<br \/>\nlocal    all    all    md5<\/p>\n<p>host    all    all    127.0.0.1\/32    ident<br \/>\n-> Do change<br \/>\nhost    all    all    0.0.0.0\/0    md5<\/p>\n<p>host    all    all    ::1\/128    ident<br \/>\n-> Do change<br \/>\nhost    all    all    ::1\/128    md5<\/p>\n<p># restart Postgresql service<br \/>\nsystemctl stop postgresql-9.4.service<br \/>\nsystemctl start postgresql-9.4.service<\/code><\/p>\n<p><P>\ub2e4\uc74c\uc740 PostGIS \uc124\uce58 \uc808\ucc28\uc785\ub2c8\ub2e4.<\/P><\/p>\n<p><code># proj \uc124\uce58<br \/>\ntar zxf proj-4.8.0.tar.gz<br \/>\ncd proj-4.8.0<br \/>\n.\/configure<br \/>\nmake && make install<\/p>\n<p># geos \ucef4\ud30c\uc77c<br \/>\ntar xvf geos-3.4.2.tar.bz2<br \/>\ncd geos-3.4.2<br \/>\n.\/configure<br \/>\nmake && make install<\/p>\n<p># libxml \uc124\uce58 (rpm\uc5d0\uc11c package \ucd1d\ub3cc\uc2dc --replacefiles \uc635\uc158\uc744 \uc0ac\uc6a9)<br \/>\nrpm -ivh .\/libxml2-2.9.1-5.el7_1.2.x86_64.rpm<br \/>\nrpm -ivh .\/xz-libs-5.1.2-12alpha.el7.x86_64.rpm<br \/>\nrpm -ivh .\/xz-devel-5.1.2-12alpha.el7.x86_64.rpm<br \/>\nrpm -ivh .\/zlib-libs-1.2.7-15.el7.x86_64.rpm<br \/>\nrpm -ivh .\/zlib-devel-1.2.7-15.el7.x86_64.rpm<br \/>\nrpm -ivh .\/libxml2-devel-2.9.1-5.el7_1.2.x86_64.rpm<\/p>\n<p># json \uc124\uce58<br \/>\nrpm -ivh .\/json-c-0.11-4.el7_0.x86_64.rpm<\/p>\n<p># gdal \ucef4\ud30c\uc77c<br \/>\ntar zxf gdal-1.9.2.tar.gz<br \/>\ncd gdal-1.9.2.tar.gz<br \/>\n.\/configure<br \/>\nmake && make install<\/p>\n<p># postgis \ucef4\ud30c\uc77c<br \/>\ntar zxf postgis-2.0.3SVN.tar.gz<br \/>\ncd postgis-2.1.8<br \/>\n.\/configure --with-pgconfig=\/usr\/pgsql-9.4\/bin\/pg_config --with-raster<br \/>\nmake && make install<\/p>\n<p># \ubaa8\ub4c8 \ud30c\uc77c(.so) \uc5c5\ub370\uc774\ud2b8<br \/>\necho \/usr\/local\/lib >> \/etc\/ld.so.conf<br \/>\nldconfig<\/p>\n<p># postgis \ubc30\ud3ec<br \/>\ncd extensions\/postgis<br \/>\nmake clean<br \/>\nmake && make install<br \/>\ncd ..<br \/>\ncd postgis_topology<br \/>\nmake clean<br \/>\nmake && make install<\/p>\n<p># restart Postgresql service<br \/>\nsystemctl restart postgresql-9.4.service<\/code><\/p>\n<p><P>\uc778\ud130\ub137\uc774 \ub418\uc9c0 \uc54a\ub294 \ud658\uacbd\uc5d0\uc11c PostgreSQL\uacfc PostGIS \uc124\uce58\ub97c \ud558\ub294 \ubd84\ub4e4\uc5d0\uac8c \ub3c4\uc6c0\uc774 \ub418\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc778\ud130\ub137\uc774 \ub418\uc9c0 \uc54a\uc740 \ud658\uacbd\uc5d0\uc11c PostgreSQL\uacfc PostGIS\ub97c \uc124\uce58\ud558\ub294 \uc808\ucc28\uc5d0 \ub300\ud574 \uc815\ub9ac\ud55c \uae00\uc744 Keep\ud574 \ub461\ub2c8\ub2e4. Windows\uc5d0\uc11c pgAdmin\uc73c\ub85c \uc811\uc18d\ud558\uc5ec &#8216;CREATE EXTENSION postgis&#8217; \uba85\ub839 \ucc98\ub9ac\uc5d0 \ub300\ud55c \ub0b4\uc6a9\uae4c\uc9c0 \ud655\uc778\ud558\uc600\uc2b5\ub2c8\ub2e4. \uba3c\uc800 PostgreSQL \uc124\uce58 \uc808\ucc28\uc785\ub2c8\ub2e4. # postgresq RPM Install rpm -Uvh pgdg-centos94-9.4-2.noarch.rpm rpm -ivh postgresql94-libs-9.4.9-1PGDG.rhel7.x86_64 rpm -ivh postgresql94-9.4.9-1PGDG.rhel7.x86_64.rpm rpm -ivh postgresql94-server-9.4.9-1PGDG.rhel7.x86_64.rpm rpm -ivh postgresql94-devel-9.4.9-1PGDG.rhel7.x86_64.rpm rpm -ivh libxslt-1.1.28-5.el7.x86_64.rpm rpm -ivh postgresql94-contrib-9.4.9-1PGDG.rhel7.x86_64.rpm # init &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=2439\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;CentOS 7\uc5d0\uc11c, \uc778\ud130\ub137\uc774 \ub418\uc9c0 \uc54a\ub294 \ud658\uacbd\uc5d0\uc11c PostgreSQL, PostGIS \uc124\uce58 \uc808\ucc28&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"class_list":["post-2439","post","type-post","status-publish","format-standard","hentry","category-gis-tools"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2439"}],"version-history":[{"count":4,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2439\/revisions"}],"predecessor-version":[{"id":4704,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2439\/revisions\/4704"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2439"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}