{"id":4210,"date":"2023-02-21T14:55:07","date_gmt":"2023-02-21T06:55:07","guid":{"rendered":"https:\/\/km94.com\/?p=4210"},"modified":"2023-02-21T14:55:07","modified_gmt":"2023-02-21T06:55:07","slug":"hostwinds-vps%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%af%b9%e8%b1%a1%e5%ad%98%e5%82%a8%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/dy208.cn\/index.php\/2023\/02\/21\/hostwinds-vps%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%af%b9%e8%b1%a1%e5%ad%98%e5%82%a8%e6%95%99%e7%a8%8b\/","title":{"rendered":"Hostwinds VPS\u5b89\u88c5\u914d\u7f6e\u5bf9\u8c61\u5b58\u50a8\u6559\u7a0b"},"content":{"rendered":"<p>\u5bf9\u8c61\u5b58\u50a8\u53ef\u7528\u4e8e\u5b58\u50a8\u5907\u4efd\u3001\u6587\u4ef6\u5171\u4eab\u6216\u5176\u4ed6\u975e\u7ed3\u6784\u5316\u6570\u636e\u3002S3FS\u5141\u8bb8\u7528\u6237\u4f7f\u7528\u8fdc\u7a0b\u5bf9\u8c61\u5b58\u50a8\u5bb9\u5668\u4f5c\u4e3a\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\uff0c\u8fd9\u610f\u5473\u7740Hostwinds\u7684\u5bf9\u8c61\u5b58\u50a8\u53ef\u4ee5\u5b89\u88c5\u5230\u865a\u62df\u4e13\u7528\u670d\u52a1\u5668\uff08VPS\uff09\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u672c\u5730\u8bbf\u95ee\u53ef\u6269\u5c55\u7684\u9759\u6001\u5b58\u50a8\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u4e0b\u5982\u4f55\u5c06\u5bf9\u8c61\u5b58\u50a8\u5b89\u88c5\u5230Hostwinds VPS\u3002<\/p>\n<p><strong>1\u3001\u5b89\u88c5s3fs-fuse<\/strong><\/p>\n<p>\u4f7f\u7528SSH\u5de5\u5177\u8fdc\u7a0b\u8fde\u63a5\u5230Hostwinds VPS\uff08\u672c\u6587\u4ee5\u7f8e\u56fdVPS\u4e3a\u4f8b\uff09\uff0c\u7136\u540e\u8fd0\u884c\u4e0b\u9762\u547d\u4ee4\u5b89\u88c5s3fs-fuse\u3002<\/p>\n<blockquote>\n<p>yum install gcc libstdc++-devel gcc-c++ fuse fuse-devel curl-devel libxml2-devel mailcap git automake make<\/p>\n<p>yum install openssl-devel<\/p>\n<p>git clone https:\/\/github.com\/s3fs-fuse\/s3fs-fuse<\/p>\n<p>cd s3fs-fuse\/<\/p>\n<p>.\/autogen.sh<\/p>\n<p>export PKG_CONFIG_PATH=\/usr\/local\/lib\/pkgconfig<\/p>\n<p>.\/configure &#8211;prefix=\/usr &#8211;with-openssl<\/p>\n<p>make<\/p>\n<p>sudo make install<\/p>\n<\/blockquote>\n<p><strong>2\u3001\u68c0\u7d22Hostwinds\u5bf9\u8c61API Info<\/strong><\/p>\n<p>s3fs-fuse\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u4eceHostwinds\u7684\u4e91\u63a7\u4ef6\u95e8\u6237\u68c0\u7d22\u5bf9\u8c61\u5b58\u50a8API\u4fe1\u606f\u3002\u4ece\u5ba2\u6237\u533a\u5bfc\u822a\u5230\u4e91\u95e8\u6237\uff0c\u7136\u540e\u9009\u62e9Storage &gt; Object Storage\uff0c\u63a5\u7740\u70b9\u51fbCreate Container\u521b\u5efa\u5bb9\u5668\uff0c\u9009\u62e9Object API Info\u5bf9\u8c61API\u4fe1\u606f\uff0c\u6309\u9875\u9762\u63d0\u793a\u586b\u5199\u76f8\u5173\u4fe1\u606f\u5373\u53ef\u3002<\/p>\n<p><strong>3\u3001\u521b\u5efa\u51ed\u636e\u6587\u4ef6<\/strong><\/p>\n<p>\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\uff0c\u521b\u5efa\u51ed\u636e\u6587\u4ef6\uff1a<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">vi \/etc\/passwd-s3fs<\/code><\/pre>\n<p>\u7136\u540e\u5728\u65b0\u6587\u4ef6\u7684\u7b2c\u4e00\u884c\u8f93\u5165Hostwinds API\u51ed\u636e\u3002<\/p>\n<p>ACCESS_KEY: SECRET_KEY<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u66f4\u6539\u6b64\u6587\u4ef6\u7684\u6743\u9650\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">chmod 600 \/etc\/passwd-s3fs<\/code><\/pre>\n<p><strong>4\u3001\u521b\u5efaMountPoint\u548cCache<\/strong><\/p>\n<p>\u4e3a\u5bb9\u5668\u521b\u5efa\u6302\u8f7d\u70b9\u548c\u7f13\u5b58\uff1a<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">mkdir \/tmp\/cache \/mnt\/my-container<\/code><\/pre>\n<p>\u66f4\u6539\u6743\u9650\uff1a<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">chmod 777 \/tmp\/cache \/mnt\/my-container<\/code><\/pre>\n<p><strong>5\u3001\u5728fstab\u4e2d\u521b\u5efa\u65b0\u6761\u76ee<\/strong><\/p>\n<p>\u6700\u540e\uff0c\u60a8\u9700\u8981\u5411\/etc\/fstab\u6dfb\u52a0\u4e00\u884c\uff1a<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">vi \/etc\/fstab<\/code><\/pre>\n<p>\u5c06\u4e0b\u9762\u5185\u5bb9\u6dfb\u52a0\u5230\u91cc\u9762\uff0c\u5e76\u7528\u7a7a\u683c\u9694\u5f00\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">s3fs#\\<br>\n\\<br>\nfuse<br>\nurl=\\,passwd_file=etc\/passwd-s3fs,use_cache=\/tmp\/cache,nonempty,allow_other,use_path_request_style,_netdev<br>\n0<br>\n0<\/code><\/pre>\n<p>\u5b89\u88c5\u5bb9\u5668\u4f7f\u7528\uff1a<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">mount -a<\/code><\/pre>\n<p>\u91cd\u65b0\u542f\u52a8\uff0c\u5e76\u9a8c\u8bc1\u662f\u5426\u5728\u542f\u52a8\u65f6\u4fdd\u6301\u5bb9\u5668\u8fd0\u884c\u3002<\/p>\n<pre class=\"wp-block-code\"><code class=\"hljs text\"><span class=\"hljs-selector-tag\">df -h<\/code><\/pre>\n<p>\u5982\u65e0\u610f\u5916\uff0c\u5e94\u8be5\u4f1a\u5f97\u5230\u7c7b\u4f3c\u4e0b\u9762\u7684\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<p>\n\t<figure class=\"wp-block-image size-full\"><img decoding=\"async\" class=\"wp-image-4212\" alt=\"\u5728fstab\u4e2d\u521b\u5efa\u65b0\u6761\u76ee\" src=\"https:\/\/km94.com\/wp-content\/uploads\/2023\/02\/dnf-1.jpg\"><\/figure>\n\t<\/p>\n\n<div>\n<div>\n\n\n\n<\/div>\n<div>\n\n\n\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\u5bf9\u8c61\u5b58\u50a8\u53ef\u7528\u4e8e\u5b58\u50a8\u5907\u4efd\u3001\u6587\u4ef6\u5171\u4eab\u6216\u5176\u4ed6\u975e\u7ed3\u6784\u5316\u6570\u636e\u3002S3FS\u5141\u8bb8\u7528\u6237\u4f7f\u7528\u8fdc\u7a0b\u5bf9\u8c61\u5b58\u50a8\u5bb9\u5668\u4f5c\u4e3a\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\uff0c\u8fd9\u610f&hellip;<\/p>\n","protected":false},"author":1,"featured_media":4211,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,2],"tags":[],"class_list":["post-4210","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-zjjc","category-jc","entry"],"_links":{"self":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/4210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/comments?post=4210"}],"version-history":[{"count":0,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/posts\/4210\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/media?parent=4210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/categories?post=4210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dy208.cn\/index.php\/wp-json\/wp\/v2\/tags?post=4210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}