{"id":10,"date":"2006-05-24T22:40:52","date_gmt":"2006-05-24T13:40:52","guid":{"rendered":"https:\/\/deskplate.net\/blog\/2006\/05\/24\/postgresql%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab\/"},"modified":"2006-05-24T22:40:52","modified_gmt":"2006-05-24T13:40:52","slug":"postgresql%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/deskplate.net\/blog\/archives\/10","title":{"rendered":"PostgreSQL\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u3092 \/usr\/local\/pgsql7.4.8 \u306b\u3059\u308b\u5834\u5408\u30fb\u30fb\u30fbJDK Ant\u3092\u5165\u308c\u3066\u304a\u304f<br \/>\nmkdir \/usr\/local\/pgsql7.4.8<br \/>\nchown postgres.postgres \/usr\/local\/pgsql7.4.8<br \/>\nsu &#8211; postgres<br \/>\ntar xvzf postgresql-7.4.8.tar.gz<br \/>\ncd postgresql-7.4.8<br \/>\nls<br \/>\n.\/configure &#8211;prefix=\/usr\/local\/pgsql7.4.8 &#8211;with-java<br \/>\nmake<br \/>\nmake install<br \/>\nvi \/home\/postgres\/.bash_profile \u306b\u74b0\u5883\u5909\u6570\u3092\u8a18\u8ff0<br \/>\n=========================================<br \/>\n.bash_profile<br \/>\n# PGHOME : \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u820c\u559c<br \/>\nPGHOME=\/usr\/local\/pgsql7.4.8<br \/>\n# PATH<br \/>\nPATH=$PATH:$PGHOME\/bin<br \/>\n# PGLIB : \u30e9\u30a4\u30d6\u30e9\u30ea\u683c\u7d0d\u820c\u559c<br \/>\nPGLIB=$PGHOME\/lib<br \/>\n# PGDATA : \u30c7\u30fc\u30bf\u683c\u7d0d\u820c\u559c<br \/>\nPGDATA=\/usr\/local\/pgsql7.4.8\/data<br \/>\n# LD_LIBRARY_PATH : \u30e9\u30a4\u30d6\u30e9\u30ea\u30d1\u30b9<br \/>\nLD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PGLIB<br \/>\n# \u8f38\u51fa<br \/>\nexport LANG PATH PGHOME PGLIB PGDATA LD_LIBRARY_PATH<br \/>\n=======================================================<br \/>\n\u74b0\u5883\u5909\u6570\u3092\u53cd\u6620\u3055\u305b\u308b<br \/>\nexit<br \/>\nsu &#8211; postgres<br \/>\nenv \u3067\u78ba\u8a8d<br \/>\nDB\u521d\u671f\u5316\u3000\u3053\u3093\u306a\u611f\u3058\u3067\u3044\u3044\u304b\u306a\uff1f<br \/>\n\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u5909\u3048\u308b\u3068\u304d\u306f\uff24\uff22\u3092\u4f5c\u308b\u3068\u304d\u306b\u3084\u3063\u3066\u307e\u3059<br \/>\ncd \/usr\/local\/pgsql7.4.8\/bin<br \/>\n.\/initdb &#8211;encoding=EUC_JP &#8211;no-locale -D \/usr\/local\/pgsql7.4.8\/data<br \/>\ncd ..\/data\/<br \/>\nls<br \/>\n\u5916\u304b\u3089\u3064\u306a\u3052\u308b\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a<br \/>\nvi pg_hba.conf_org<br \/>\nhost    all         all         0.0.0.0           0.0.0.0           trust<br \/>\n\u9762\u5012\u306a\u3068\u304d\u306f\u3053\u3093\u306a\u98a8\u306b\u8a18\u8ff0\u8ffd\u52a0\u3000\u3042\u307e\u308a\u304a\u52e7\u3081\u3067\u306f\u306a\u3044\uff57<br \/>\nvi postgresql.conf<br \/>\ntcpip_socket = true  \u306b\u3059\u308b<br \/>\n\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u89e3\u51cd\u3057\u305f\u3068\u3053\u308d\u306b\u30b7\u30a7\u30eb\u304c\u3042\u308b\u306e\u3067\u79fb\u52d5\u3055\u305b\u3066\u304a\u304f<br \/>\ncp \/home\/postgres\/postgresql-7.4.8\/contrib\/linux \/etc\/init.d\/pgsql<br \/>\nchmod +x \/etc\/init.d\/pgsql<br \/>\nvi \/etc\/init.d\/pgsql  \u3067\u74b0\u5883\u3092\u3042\u308f\u305b\u308b<br \/>\n\u3053\u306e\u3069\u3061\u3089\u304b\u3067\u8d77\u52d5\u3059\u308b\u3000<br \/>\n.\/postmaster -i -S -D \/usr\/local\/pgsql7.4.8\/data\/ &#038;<br \/>\n\/etc\/init.d\/pgsql start<br \/>\n\u6b62\u3081\u308b\u3068\u304d<br \/>\n.\/pg_ctl -mf stop -D \/usr\/local\/pgsql7.4.8\/data\/<br \/>\n\/etc\/init.d\/pgsql stop<br \/>\n\u306e\u3069\u3061\u3089\u304b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u3092 \/usr\/local\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":0,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"wp:attachment":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}