{"id":32,"date":"2010-02-24T10:55:37","date_gmt":"2010-02-24T01:55:37","guid":{"rendered":"http:\/\/www2.lancard.com\/blog\/?p=32"},"modified":"2025-03-12T11:31:55","modified_gmt":"2025-03-12T02:31:55","slug":"nat%e3%81%aafusion%e4%b8%8a%e3%81%aewindows%e3%81%8b%e3%82%89%e3%83%9b%e3%82%b9%e3%83%88%e3%81%aepostgresql%e3%81%ab%e6%8e%a5%e7%b6%9a","status":"publish","type":"post","link":"https:\/\/www.lancard.com\/blog\/2010\/02\/24\/nat%e3%81%aafusion%e4%b8%8a%e3%81%aewindows%e3%81%8b%e3%82%89%e3%83%9b%e3%82%b9%e3%83%88%e3%81%aepostgresql%e3%81%ab%e6%8e%a5%e7%b6%9a\/","title":{"rendered":"NAT\u306aFusion\u4e0a\u306eWindows\u304b\u3089\u30db\u30b9\u30c8\u306ePostgreSQL\u306b\u63a5\u7d9a"},"content":{"rendered":"<p>MacBook\u306bPostgreSQL\u3092\u300eMac OS X \u3067 PostgreSQL \u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\u300f(<a href=\"http:\/\/lets.postgresql.jp\/documents\/tutorial\/macosx\/\">http:\/\/lets.postgresql.jp\/documents\/tutorial\/macosx\/<\/a>)\u3092\u53c2\u8003\u306b\u3057\u3064\u3064\u5c0e\u5165\u3057\u305f\u306e\u3067\u3059\u304cpsql\u3067\u65e5\u672c\u8a9e\u304c\u901a\u3089\u305a\u56f0\u3063\u3066\u305f\u308a\u3059\u308b\u4eca\u65e5\u3053\u306e\u9803\u3067\u3059\u3002\u30d8\u30eb\u30d7\u30df\u30fc\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001VMware Fusiion3\u4e0a\u306eWindows7\u306b\u3082PostgreSQL\u3092\u5165\u308c\u305f\u306e\u3067\u3059\u304c\u3001Server\u3060\u3051Mac\u5074\u3092\u4f7f\u304a\u3046\u304b\u306a\u3068\u3002\u30b5\u30fc\u30d0\u30fcUnix\u7cfbOS\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8Windows\u306a\u5b9f\u74b0\u5883\u306b\u8fd1\u304f\u306a\u308a\u307e\u3059\u3057\u3002<\/p>\n<p>\u3063\u3066\u306a\u308f\u3051\u3067\u3001Fusion\u4e0a\u306eWin7\u304c\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u3084\u3089\u8abf\u3079\u307e\u3059\u3002ipconfig\u3067\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30a2\u30c0\u30d7\u30bf\u306fNAT\u3067\u3059\u3002<\/p>\n<pre lang=\"DOS\" line=\"1\">IPv4 \u30a2\u30c9\u30ec\u30b9 . . . . . . . . . . : 192.168.249.131\n\n\u30b5\u30d6\u30cd\u30c3\u30c8 \u30de\u30b9\u30af . . . . . . . . : 255.255.255.0\n\n\u30c7\u30d5\u30a9\u30eb\u30c8 \u30b2\u30fc\u30c8\u30a6\u30a7\u30a4 . . . . . : 192.168.249.2<\/pre>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30db\u30b9\u30c8\u306e\u30a2\u30c9\u30ec\u30b9\u306f192.168.249.1\u306e\u3088\u3046\u3067\u3059\u306d\u3002<\/p>\n<p>\u6b21\u3001OS X \u306b\u5c0e\u5165\u3057\u305fPostgreSQL8.4\u304c\u3069\u3046\u306a\u3063\u3066\u308b\u306e\u304b\u63a2\u308a\u307e\u3059(\u3061\u3087\u3044\u524d\u306b\u5c0e\u5165\u3057\u305f\u3082\u306e\u3067\u8a2d\u5b9a\u3092\u5fd8\u308c\u3066\u307e\u3057\u3066)\u3002\u63a2\u3063\u3066\u3044\u304f\u3068\u3001\/Library\/PostgreSQL\/\u3063\u3066\u306a\u3068\u3053\u308d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3057\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3068\u30c7\u30fc\u30bf\u3068\u540c\u3058\u5834\u6240\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u3059\u306d\u3002<\/p>\n<pre lang=\"Bash\" line=\"1\">$ sudo ls -l \/Library\/PostgreSQL\/8.4\/data\/\ntotal 80\n-rw-------   1 postgres  daemon      4  1 15 08:41 PG_VERSION\ndrwx------   6 postgres  daemon    204  1 16 21:07 base\ndrwx------  42 postgres  daemon   1428  3 18 17:33 global\ndrwx------   3 postgres  daemon    102  1 15 08:41 pg_clog\n-rw-------   1 postgres  daemon   3405  1 15 08:41 pg_hba.conf\n-rw-------   1 postgres  daemon   1631  1 15 08:41 pg_ident.conf\ndrwxr-xr-x  69 postgres  daemon   2346  3 23 00:00 pg_log\ndrwx------   4 postgres  daemon    136  1 15 08:41 pg_multixact\ndrwx------   3 postgres  daemon    102  3 23 11:24 pg_stat_tmp\ndrwx------   3 postgres  daemon    102  1 15 08:41 pg_subtrans\ndrwx------   2 postgres  daemon     68  1 15 08:41 pg_tblspc\ndrwx------   2 postgres  daemon     68  1 15 08:41 pg_twophase\ndrwx------   4 postgres  daemon    136  1 15 08:41 pg_xlog\n-rw-r--r--   1 postgres  wheel   16779  1 15 08:42 postgresql.conf\n-rw-------   1 postgres  daemon     70  3 18 17:33 postmaster.opts\n-rw-------   1 postgres  daemon     52  3 18 17:33 postmaster.pid\n<\/pre>\n<p>\u3042\u308a\u307e\u3057\u305f\u3002\u8a2d\u5b9a\u898b\u305f\u308a\u3001\u3044\u3058\u3063\u305f\u308a\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u306f postgresql.conf\u3002postgres\u3055\u3093\u306e\u6301\u3061\u7269\u3089\u3057\u3044\u306e\u3067\u3001\u306a\u308a\u304d\u3063\u3066GO\u3002<\/p>\n<pre lang=\"Bash\" line=\"1\">\n$ sudo -u postgres vim \/Library\/PostgreSQL\/8.4\/data\/postgresql.conf\n<\/pre>\n<p>\u3067\u3001\u773a\u3081\u308b\u3068\u3001\u5168\u3066\u306e\u30a2\u30c9\u30ec\u30b9\u3067listen\u306f\u3057\u3066\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<pre lang=\"Bash\" line=\"1\">listen_addresses = &#039;*&#039;          # what IP address(es) to listen on;\n<\/pre>\n<p>\u4fee\u6b63\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u6b21\u3001pg_hba.conf\u3092\u540c\u3058\u304fpostgres\u3055\u3093\u306b\u306a\u308a\u304d\u3063\u3066\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u958b\u304d\u307e\u3059\u3002<\/p>\n<pre lang=\"Bash\" line=\"1\">\n# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD\n\n# \"local\" is for Unix domain socket connections only\nlocal   all         all                               md5\n# IPv4 local connections:\nhost    all         all         127.0.0.1\/32          md5\n# IPv6 local connections:\nhost    all         all         ::1\/128               md5\n<\/pre>\n<p>\u5f53\u7136\u3001192.168.249.131\u304b\u3089\u306e\u63a5\u7d9a\u306f\u8a31\u53ef\u3055\u308c\u3066\u307e\u305b\u3093\u3002\u4eca\u56de\u306f192.168.249.*\u304b\u3089trust\uff08\u8a8d\u8a3c\u306a\u3057\uff09\u306b\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre lang=\"Bash\" line=\"1\">\n# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD\n\n# \"local\" is for Unix domain socket connections only\nlocal   all         all                               md5\n# IPv4 local connections:\nhost    all         all         127.0.0.1\/32          md5\n# IPv6 local connections:\nhost    all         all         ::1\/128               md5\n# Win7 on Fusion3 connections\nhost    all         all         192.168.249.0\/24      trust\n<\/pre>\n<p>trust\u306a\u884c\u304c\u8ffd\u8a18\u5206\u3067\u3059\u3002\u4fdd\u5b58\u3057\u3066\u3001PostgreSQL\u3092\u30ea\u30b9\u30bf\u30fc\u30c8\u3002<\/p>\n<p>Fusion \u4e0a\u306e Win7 \u3067 pgAdmin III \u3092\u8d77\u52d5\u3057\u3066\u63a5\u7d9a\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<div><a href=\"http:\/\/www2.lancard.com\/blog\/wp-content\/uploads\/2010\/03\/MacBook_PostgreSQL_connect1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-42\" title=\"MacBook_PostgreSQL_connect\" src=\"http:\/\/www2.lancard.com\/blog\/wp-content\/uploads\/2010\/03\/MacBook_PostgreSQL_connect1.png\" alt=\"\" width=\"743\" height=\"535\" \/><\/a>\n<\/div>\n<p>\u3088\u3057\u3088\u3057\u3002<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F32&#038;t=NAT%E3%81%AAFusion%E4%B8%8A%E3%81%AEWindows%E3%81%8B%E3%82%89%E3%83%9B%E3%82%B9%E3%83%88%E3%81%AEPostgreSQL%E3%81%AB%E6%8E%A5%E7%B6%9A&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F32&#038;p&#091;images&#093;&#091;0&#093;=http%3A%2F%2Fwww2.lancard.com%2Fblog%2Fwp-content%2Fuploads%2F2010%2F03%2FMacBook_PostgreSQL_connect1.png&#038;p&#091;title&#093;=NAT%E3%81%AAFusion%E4%B8%8A%E3%81%AEWindows%E3%81%8B%E3%82%89%E3%83%9B%E3%82%B9%E3%83%88%E3%81%AEPostgreSQL%E3%81%AB%E6%8E%A5%E7%B6%9A\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"http:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F32&#038;text=NAT%E3%81%AAFusion%E4%B8%8A%E3%81%AEWindows%E3%81%8B%E3%82%89%E3%83%9B%E3%82%B9%E3%83%88%E3%81%AEPostgreSQL%E3%81%AB%E6%8E%A5%E7%B6%9A\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F32&#038;title=NAT%E3%81%AAFusion%E4%B8%8A%E3%81%AEWindows%E3%81%8B%E3%82%89%E3%83%9B%E3%82%B9%E3%83%88%E3%81%AEPostgreSQL%E3%81%AB%E6%8E%A5%E7%B6%9A\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-tumblr nolightbox\" data-provider=\"tumblr\" target=\"_blank\" rel=\"nofollow\" title=\"Share on tumblr\" href=\"https:\/\/tumblr.com\/share?s=&#038;v=3&#038;t=NAT%E3%81%AAFusion%E4%B8%8A%E3%81%AEWindows%E3%81%8B%E3%82%89%E3%83%9B%E3%82%B9%E3%83%88%E3%81%AEPostgreSQL%E3%81%AB%E6%8E%A5%E7%B6%9A&#038;u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F32\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"tumblr\" title=\"Share on tumblr\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/tumblr.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=NAT%E3%81%AAFusion%E4%B8%8A%E3%81%AEWindows%E3%81%8B%E3%82%89%E3%83%9B%E3%82%B9%E3%83%88%E3%81%AEPostgreSQL%E3%81%AB%E6%8E%A5%E7%B6%9A&#038;body=%E3%82%B7%E3%82%A7%E3%82%A2%E3%81%99%E3%82%8B%EF%BC%9A:%20https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F32\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>MacBook\u306bPostgreSQL\u3092\u300eMac OS X \u3067 PostgreSQL \u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\u300f(http:\/\/lets.postgresql.jp\/documents\/tutorial\/macosx\/)\u3092\u53c2\u8003\u306b\u3057\u3064 [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[14,135,15],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-1","tag-os-x","tag-postgresql","tag-vmware-fusion"],"_links":{"self":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":32,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":4707,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions\/4707"}],"wp:attachment":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}