{"id":12040,"date":"2020-11-25T14:35:01","date_gmt":"2020-11-25T06:35:01","guid":{"rendered":"https:\/\/www.microfusion.cloud\/hk\/?p=12040"},"modified":"2025-01-13T14:39:46","modified_gmt":"2025-01-13T06:39:46","slug":"gcp-storage-20201125","status":"publish","type":"post","link":"https:\/\/www.microfusion.cloud\/hk\/2020\/11\/25\/gcp-storage-20201125\/","title":{"rendered":"GCP Storage \u65e5\u8a8c\u8a18\u9304-\u638c\u63e1\u8a2a\u554f\u8005IP"},"content":{"rendered":"\n\n\n<p>\u00a0<\/p>\n<p>\u67e5\u770b\u700f\u89bd\u3001\u5b58\u53d6\u6a94\u6848\u7684IP\u90fd\u5f9e\u54ea\u88e1\u4f86\u55ce\uff1f\u6b64\u529f\u80fd\u70ba\u8a18\u9304GCP Storage \u7684\u8a2a\u554f\u65e5\u8a8c\uff0c\u53ef\u4f7f\u7528GCP Storage(zerobucket) \u653e\u7f6e\u57fa\u672c\u8cc7\u6599\uff0c\u7136\u5f8c\u4f7f\u7528\u53e6\u5916\u4e00\u500bStorage(zero-save-bucket)\u9032\u884c\u65e5\u8a8c\u6536\u96c6\uff0c\u5c31\u53ef\u4ee5\u77e5\u9053\u54ea\u500b\u5730\u5340\u7684IP\u5c0d\u4f01\u696d\u9019\u500b\u5167\u5bb9\u6700\u611f\u8208\u8da3\u3002<\/p>\n<p><b>1. \u9996\u5148\uff0c\u5148\u5efa\u7acb2\u500bGCP Storage (zerobucket &amp; zero-save-bucket)<\/b><\/p>\n<p>\u53e6\u53ef\u4f7f\u7528 Console \u754c\u9762\u5efa\u7acb\u6216\u662f\u4f7f\u7528 Gsutil \u6307\u4ee4\u9032\u884c\u5efa\u7acb\uff0c\u6307\u4ee4\u5982\u4e0b(\u5efa\u7acb2\u500bbucket)<\/p>\n<p><b><i>gsutil mb gs:\/\/zerobucket\u00a0<br \/><\/i><\/b><b><i>gsutil mb gs:\/\/zero-save-bucket<\/i><\/b><\/p>\n<p>#Gcloud \u6307\u4ee4\u00a0<\/p>\n<p><a style=\"color: #333333;\" href=\"https:\/\/cloud.google.com\/storage\/docs\/access-logs#delivery\" target=\"_blank\" rel=\"noopener\">https:\/\/cloud.google.com\/storage\/docs\/access-logs#delivery<\/a><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/mf-web-plugin-hk.storage.googleapis.com\/wp-content\/uploads\/2020\/11\/01-2.jpg\" alt=\"\" width=\"368\" height=\"94\" \/><\/p>\n<p><b>2. \u8f38\u5165\u4e0b\u5217\u6307\u4ee4\uff0c\u6388\u4e88 Cloud Storage \u5275\u5efa\u65e5\u8a8c\uff0c\u4e26\u5c07\u5176\u5132\u5b58\u70ba\u65b0\u5c0d\u8c61\u7684\u6b0a\u9650\u3002<\/b><\/p>\n<p><b><i>gsutil iam ch group:cloud-storage-analytics@google.com:legacyBucketWriter gs:\/\/zero-save-bucket<\/i><\/b><\/p>\n<p><b>3. \u4f7f\u7528 logging \u6307\u4ee4\uff0c\u70ba\u60a8\u7684\u5132\u5b58\u5206\u5340\u555f\u7528\u65e5\u8a18\u8a18\u9304\u529f\u80fd<\/b><\/p>\n<p><b><i>gsutil logging set on -b gs:\/\/zero-save-bucket [-o log_object_prefix ] gs:\/\/zerobucket<\/i><\/b><\/p>\n<p><b>4. \u82e5\u60a8\u6839\u64da\u5b98\u65b9\u6587\u4ef6\u5efa\u7acb\u5f8c\uff0c\u5f9e Cloud Storage \u5167\u5c07\u6703\u51fa\u73fe\u4ee5\u4e0b\u7684\u65e5\u8a8c\u8a18\u9304\u3002<\/b><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mf-web-plugin-hk.storage.googleapis.com\/wp-content\/uploads\/2020\/11\/03-1-1-1024x403.jpg\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" srcset=\"https:\/\/mf-web-plugin-hk.storage.googleapis.com\/wp-content\/uploads\/2020\/11\/03-1-1-1024x403.jpg 1024w, https:\/\/mf-web-plugin-hk.storage.googleapis.com\/wp-content\/uploads\/2020\/11\/03-1-1-300x118.jpg 300w, https:\/\/mf-web-plugin-hk.storage.googleapis.com\/wp-content\/uploads\/2020\/11\/03-1-1-768x302.jpg 768w, https:\/\/mf-web-plugin-hk.storage.googleapis.com\/wp-content\/uploads\/2020\/11\/03-1-1-600x236.jpg 600w, https:\/\/mf-web-plugin-hk.storage.googleapis.com\/wp-content\/uploads\/2020\/11\/03-1-1.jpg 1471w\" alt=\"\" width=\"1024\" height=\"403\" \/><\/p>\n<p>\u770b\u5b8c\u672c\u7bc7\u6559\u5b78\uff0c\u5c0d\u65bcGCP Storage\u5c31\u6703\u6709\u66f4\u591a\u4e86\u89e3\uff0c\u80fd\u8a18\u9304\u3001\u6536\u96c6\u8a2a\u554f\u8005\u7684IP\uff0c\u5c31\u80fd\u914d\u5408\u5546\u696d\u6c7a\u7b56\uff0c\u6316\u6398\u6f5b\u5728\u5ba2\u6236\u8207\u7121\u9650\u5546\u6a5f\uff01<\/p>\n<p style=\"text-align: center;\">\u9019\u6a23\u5c31\u5927\u529f\u544a\u6210\u5566! \u662f\u4e0d\u662f\u6e05\u695a\u7c21\u55ae\u53c8\u5feb\u901f\u5462?\u00a0<\/p>\n<p style=\"text-align: center;\">\u82e5\u60f3\u4e86\u89e3\u5b8c\u6574\u61c9\u7528\uff0c\u8acb\u6301\u7e8c\u95dc\u6ce8<a href=\"https:\/\/www.microfusion.cloud\/hk\/blog\/\">\u5b8f\u5ead\u67b6\u69cb\u5e2b\u5c08\u6b04<\/a>\uff0c\u82e5\u6709\u4efb\u4f55 \u96f2\u7aef\u9700\u6c42\uff0c\u4e5f\u6b61\u8fce\u96a8\u6642\u8207\u6211\u5011\u806f\u7e6b\u5594!<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.microfusion.cloud\/hk\/contact\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mf-web-plugin-hk.storage.googleapis.com\/wp-content\/uploads\/2020\/02\/%E8%81%AF%E7%B5%A1%E6%88%91%E5%80%91.png\" alt=\"\" width=\"185\" height=\"103\" \/><\/a><\/p>\n<p>\u00a0<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u67e5\u770b\u700f\u89bd\u3001\u5b58\u53d6\u6a94\u6848\u7684IP\u90fd\u5f9e\u54ea\u88e1\u4f86\u55ce\uff1f\u6b64\u529f\u80fd\u70ba\u8a18\u9304GCP Storage \u7684\u8a2a\u554f\u65e5\u8a8c\uff0c\u53ef\u4f7f\u7528GCP Storage(zerobucket) \u653e\u7f6e\u57fa\u672c\u8cc7\u6599\uff0c\u7136\u5f8c\u4f7f\u7528\u53e6\u5916\u4e00\u500bStorage(zero-save-bucket)\u9032\u884c\u65e5\u8a8c\u6536\u96c6\uff0c\u5c31\u53ef\u4ee5\u77e5\u9053\u54ea\u500b\u5730\u5340\u7684IP\u5c0d\u4f01\u696d\u9019\u500b\u5167\u5bb9\u6700\u611f\u8208\u8da3\u3002 1. \u9996\u5148\uff0c\u5148\u5efa\u7acb2\u500bGCP Storage (zerobucket &amp; zero-save-bucket) \u53e6\u53ef\u4f7f\u7528 Console \u754c\u9762\u5efa\u7acb\u6216\u662f\u4f7f\u7528 Gsutil \u6307\u4ee4\u9032\u884c\u5efa\u7acb\uff0c\u6307\u4ee4\u5982\u4e0b(\u5efa\u7acb2\u500bbucket) gsutil mb gs:\/\/zerobucket\u00a0gsutil mb gs:\/\/zero-save-bucket #Gcloud \u6307\u4ee4\u00a0 https:\/\/cloud.google.com\/storage\/docs\/access-logs#delivery 2. \u8f38\u5165\u4e0b\u5217\u6307\u4ee4\uff0c\u6388\u4e88 Cloud Storage \u5275\u5efa\u65e5\u8a8c\uff0c\u4e26\u5c07\u5176\u5132\u5b58\u70ba\u65b0\u5c0d\u8c61\u7684\u6b0a\u9650\u3002 gsutil iam ch group:cloud-storage-analytics@google.com:legacyBucketWriter gs:\/\/zero-save-bucket 3. \u4f7f\u7528 logging \u6307\u4ee4\uff0c\u70ba\u60a8\u7684\u5132\u5b58\u5206\u5340\u555f\u7528\u65e5\u8a18\u8a18\u9304\u529f\u80fd gsutil logging set on -b gs:\/\/zero-save-bucket [-o log_object_prefix ] gs:\/\/zerobucket 4. \u82e5\u60a8\u6839\u64da\u5b98\u65b9\u6587\u4ef6\u5efa\u7acb\u5f8c\uff0c\u5f9e Cloud Storage \u5167\u5c07\u6703\u51fa\u73fe\u4ee5\u4e0b\u7684\u65e5\u8a8c\u8a18\u9304\u3002 \u770b\u5b8c\u672c\u7bc7\u6559\u5b78\uff0c\u5c0d\u65bcGCP [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":12054,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[173],"tags":[199,172],"class_list":["post-12040","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical_gcp","tag-gcp"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/posts\/12040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/comments?post=12040"}],"version-history":[{"count":9,"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/posts\/12040\/revisions"}],"predecessor-version":[{"id":20574,"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/posts\/12040\/revisions\/20574"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/media\/12054"}],"wp:attachment":[{"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/media?parent=12040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/categories?post=12040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microfusion.cloud\/hk\/wp-json\/wp\/v2\/tags?post=12040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}