{"id":349,"date":"2019-02-22T16:42:04","date_gmt":"2019-02-22T08:42:04","guid":{"rendered":"https:\/\/www.wurend.com\/?p=349"},"modified":"2019-12-30T13:05:31","modified_gmt":"2019-12-30T05:05:31","slug":"%e9%98%bf%e9%87%8cescoss%e6%90%ad%e5%bb%ba%e4%b8%aa%e4%ba%ba%e4%ba%91","status":"publish","type":"post","link":"https:\/\/www.wurend.com\/?p=349","title":{"rendered":"\u963f\u91ccESC+oss\u642d\u5efa\u4e2a\u4eba\u4e91"},"content":{"rendered":"\n<p class=\"is-style-text-indent-2em\">\u8bf4\u5230\u4e91\u76d8\uff0c\u5927\u5bb6\u7b2c\u4e00\u65f6\u95f4\u5e94\u8be5\u60f3\u5230\u7684\u5c31\u662f\u767e\u5ea6\u4e91\uff0c\u4f46\u662f\u5bf9\u4e8e\u975e\u4f1a\u5458\u7684\u7528\u6237\uff0c\u5b83\u4f1a\u5bf9\u4f60\u8fdb\u884c\u53ca\u5176\u6076\u5fc3\u7684\u9650\u901f\uff0c\u867d\u7136\u5bf9\u4e8e\u4f1a\u5458\u6765\u8bf4\u6ca1\u6709\u8fd9\u4e00\u9650\u5236\uff0c\u4f46\u662f\u767e\u5ea6\u4e91\u76d8\u6bd5\u7adf\u662f\u522b\u4eba\u5bb6\u7684\u4e1c\u897f\uff0c\u6570\u636e\u9690\u79c1\u96be\u514d\u4f1a\u88ab\u6cc4\u9732\u51fa\u53bb\uff0c\u8fd9\u65f6\u5019\u6211\u4eec\u5c31\u9700\u8981\u4e00\u4e2a\u81ea\u5df1\u7684\u79c1\u4eba\u4e91\u76d8\u4e86\u3002<\/p>\n\n\n\n<p class=\"is-style-text-indent-2em\">\u5982\u6807\u9898\uff0c\u670d\u52a1\u5668\u6211\u9009\u62e9\u7684\u662f\u963f\u91cc\u4e91\uff0c\u7cfb\u7edf\u6211\u9009\u62e9\u7684\u662fcentos7.5\uff0c\u800c\u4e00\u822c\u4e91\u670d\u52a1\u5668\u7684\u5b58\u50a8\u7a7a\u95f4\u90fd\u4e0d\u662f\u5f88\u5927\uff0c\u8fd9\u91cc\u6211\u989d\u5916\u53c8\u8d2d\u4e70\u4e86\u963f\u91cc\u4e91\u7684oss\u5bf9\u8c61\u50a8\u5b58\u670d\u52a1\u3002<\/p>\n\n\n\n<p class=\"is-style-text-indent-2em\">\u4e91\u76d8\u7cfb\u7edf\u7684\u8bdd\u6211\u5219\u662f\u9009\u62e9\u7684next cloud\u8fd9\u5957\u5f00\u6e90\u7684\u4e91\u76d8\u7cfb\u7edf\uff0c\u8fd9\u91cc\u9644\u4e0a\u8fd9\u4e2a\u9879\u76ee\u7684\u5b98\u7f51\u5730\u5740\uff1a<a href=\"https:\/\/nextcloud.com\/\">nextcloud<\/a><\/p>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_01\"><p> <strong>1\u3001\u642d\u5efa\u7f51\u7ad9\u8fd0\u884c\u73af\u5883<\/strong> <\/p><\/div><\/div>\n\n\n\n<p>\u6216\u8005\u4f60\u4e5f\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165\u4e0b\u9762\u7684\u8fd9\u53e5\u547d\u4ee4<\/p>\n\n\n\n<p>\u505a\u597d\u51c6\u5907\uff0c\u9996\u5148\u9700\u8981\u5728\u4e91\u670d\u52a1\u5668\u4e0a\u642d\u5efa\u4e00\u4e2a\u7f51\u7ad9\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c\u7684\u8fd0\u884c\u73af\u5883\uff0c\u6211\u9009\u62e9\u7684\u662flnmp\u73af\u5883\uff0c\u7528\u7684lnmp\u4e00\u952e\u811a\u672c\uff0c\u7701\u53bb\u9ebb\u70e6\uff0clnmp\u4e00\u952e\u811a\u672c\u5b98\u7f51\u5730\u5740\uff1a<a href=\"https:\/\/lnmp.org\/install.html\">lnmp<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wget http:\/\/soft.vpser.net\/lnmp\/lnmp1.6.tar.gz -cO lnmp1.6.tar.gz &amp;&amp; tar zxf lnmp1.6.tar.gz &amp;&amp; cd lnmp1.6 &amp;&amp; .\/install.sh lnmp<\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Mysql\u672c\u7248\u6211\u9009\u62e9\u7684\u662f5.7\uff0c\u9700\u8981<strong>\u6ce8\u610f\u7684\u662fMySQL 5.6,5.7\u53caMariaDB 10\u5fc5\u987b\u57281G\u4ee5\u4e0a\u5185\u5b58\u7684\u66f4\u9ad8\u914d\u7f6e\u4e0a\u624d\u80fd\u9009\u62e9<\/strong>\uff01<\/p>\n\n\n\n<p>\u7136\u540ePHP\u7684\u7248\u672c\u5efa\u8bae\u9009\u62e97.0\u4ee5\u4e0a\uff0c\u6574\u4e2alnmp\u73af\u5883\u7684\u5b89\u88c5\u65f6\u95f4\u8017\u65f6\u8f83\u957f\uff0c\u5927\u6982\u572820-60\u5206\u949f\u4e0d\u7b49\u3002<\/p>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\u5982\u679c\u663e\u793aNginx: OK\uff0cMySQL: OK\uff0cPHP: OK\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/www.wurend.com\/wp-content\/uploads\/2019\/08\/lnmp1.5-install-success.png\" alt=\"\u963f\u91ccESC+oss\u642d\u5efa\u4e2a\u4eba\u4e91\" title=\"\u963f\u91ccESC+oss\u642d\u5efa\u4e2a\u4eba\u4e91\"><img decoding=\"async\" src=\"https:\/\/www.wurend.com\/wp-content\/uploads\/2019\/08\/lnmp1.5-install-success.png\" alt=\"\u963f\u91ccESC+oss\u642d\u5efa\u4e2a\u4eba\u4e91\" title=\"\u963f\u91ccESC+oss\u642d\u5efa\u4e2a\u4eba\u4e91\" \/><\/a><\/figure><\/div>\n\n\n\n<p>\u5e76\u4e14Nginx\u3001MySQL\u3001PHP\u90fd\u662frunning\uff0c80\u548c3306\u7aef\u53e3\u90fd\u5b58\u5728\uff0c\u5e76\u63d0\u793a\u5b89\u88c5\u4f7f\u7528\u7684\u65f6\u95f4\u53caInstall lnmp V1.5 completed! enjoy it.\u7684\u8bdd\uff0c\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5\u6210\u529f\u3002<br>\u67d0\u4e9b\u7cfb\u7edf\u53ef\u80fd\u4f1a\u4e00\u76f4\u5361\u5728Install lnmp V1.5 completed! enjoy it.\u4e0d\u81ea\u52a8\u9000\u51fa\uff0c\u53ef\u4ee5\u6309Ctrl+c\u9000\u51fa\u3002<\/p>\n\n\n\n<p>\u8fd9\u65f6\u5f53\u4f60\u5728\u6d4f\u89c8\u5668\u8f93\u5165\u4f60\u670d\u52a1\u5668IP\u7684\u65f6\u5019\u5219\u4f1a\u51fa\u73b0\u5982\u4e0b\u663e\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/www.wurend.com\/wp-content\/uploads\/2019\/08\/P5B0SCKWF_HL8Y9R0EAFN8-1024x555.png\" alt=\"\u963f\u91ccESC+oss\u642d\u5efa\u4e2a\u4eba\u4e91\" title=\"\u963f\u91ccESC+oss\u642d\u5efa\u4e2a\u4eba\u4e91\"><img decoding=\"async\" src=\"https:\/\/www.wurend.com\/wp-content\/uploads\/2019\/08\/P5B0SCKWF_HL8Y9R0EAFN8-1024x555.png\" alt=\"\u963f\u91ccESC+oss\u642d\u5efa\u4e2a\u4eba\u4e91\" title=\"\u963f\u91ccESC+oss\u642d\u5efa\u4e2a\u4eba\u4e91\" \/><\/a><\/figure><\/div>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_01\"><p> <strong>2<\/strong>\u3001\u5b89\u88c5\u8f6f\u4ef6\u7a0b\u5e8f <\/p><\/div><\/div>\n\n\n\n<p>\n\nlnmp\u811a\u672c\u642d\u5efa\u597d\u7684\u73af\u5883\uff0c\u7f51\u7ad9\u9ed8\u8ba4\u8fd0\u884c\u76ee\u5f55\u662f\u5b58\u653e\u5728\/home\/wwwroot\u76ee\u5f55\u4e0b\u7684\uff0c\u8fd9\u4e2a\u4f60\u53ef\u4ee5\u5728\u6dfb\u52a0\u7f51\u7ad9\u6307\u5b9a\u7684\u65f6\u5019\u81ea\u884c\u4fee\u6539\n\n<\/p>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_02\"><h3 id=\"h3-0\"> 2-1\u3001\u6dfb\u52a0\u7f51\u7ad9\u6307\u5b9a <\/h3><\/div><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>lnmp vhost add<\/code><\/pre>\n\n\n\n<p>\n\n\u8fd9\u4e00\u6b65\u4f60\u4e5f\u53ef\u4ee5\u653e\u5230\u7f51\u7ad9\u7a0b\u5e8f\u5b89\u88c5\u5b8c\u6210\u4ee5\u540e\n\n<\/p>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_02\"><h3 id=\"h3-1\"> 2-2\u3001\u5b89\u88c5\u7f51\u7ad9\u7a0b\u5e8f <\/h3><\/div><\/div>\n\n\n<p>\u5982\u679c\u5728\u8fd9\u4e4b\u524d\u4f60\u8fd8\u6ca1\u6709\u6dfb\u52a0\u7f51\u7ad9\u6307\u5b9a\uff0c\u4f60\u9700\u8981\u5728<span style=\"color: #ff0000;\">\/home\/wwwroot<span style=\"color: #000000;\">\u76ee\u5f55<\/span><\/span>\u5148\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55<\/p>\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\/wwwroot\nmkdir aaa   #aaa\u6539\u4e3a\u4f60\u81ea\u5df1\u7684\u7f51\u7ad9\u540d\u6216\u8005\u4f60\u81ea\u5df1\u60f3\u8981\u7684\uff0c\u7f51\u7ad9\u6307\u5b9a\u76ee\u5f55\u65f6\u4e24\u8005\u540d\u79f0\u8981\u4e00\u81f4<\/code><\/pre>\n\n\n\n<p>  \u8fdb\u5230\u521a\u521b\u5efa\u597d\u7684\u76ee\u5f55\u91cc\u4e0b\u8f7d\u7f51\u7ad9\u7a0b\u5e8f\u5e76\u89e3\u538b <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/download.nextcloud.com\/server\/releases\/nextcloud-16.0.0.zip\nunzip nextcloud-16.0.0.zip\nmv \/home\/wwroot\/#\u4f60\u521b\u5efa\u7684\u7f51\u7ad9\u76ee\u5f55\u540d#\/nextcloud\/* \/home\/wwroot\/#\u4f60\u521b\u5efa\u7684\u7f51\u7ad9\u76ee\u5f55\u540d#<\/code><\/pre>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_02\"><h3 id=\"h3-2\"> 2-3\u3001\u4fee\u6539\u7528\u6237\u7ec4 <\/h3><\/div><\/div>\n\n\n\n<p>\n\n\u505a\u52302-2\u90a3\u6b65\u5176\u5b9e\u5c31\u5df2\u7ecf\u5b8c\u6210\u4e86\uff0c\u901a\u8fc7\u4f60\u7ed1\u5b9a\u7684\u57df\u540d\u5c31\u53ef\u4ee5\u8bbf\u95ee\u7f51\u7ad9\u4e86\uff0c\u4f46\u8fd9\u65f6\u4f60\u901a\u8fc7\u57df\u540d\u8bbf\u95ee\u7f51\u7ad9\u65f6\u4f60\u4f1a\u53d1\u73b0\u7f51\u9875\u63d0\u793a\u201c\u670d\u52a1\u5668\u5185\u90e8\u9519\u8bef\u201d\uff0c\u9047\u5230\u8fd9\u4e2a\u95ee\u9898\u4e00\u822c\u90fd\u662f\u6743\u9650\u95ee\u9898\uff0c\u4f46\u5e76\u4e0d\u662f\u8bfb\u5199\u6743\u9650\uff0c\u800c\u662f\u7528\u6237\u6743\u9650\n\n<\/p>\n\n\n<p><strong>\u6211\u4eec\u5728wwwroot\u76ee\u5f55\u4e0b \u8f93\u5165<span style=\"color: #ff0000;\">ls -l #\u4f60\u7f51\u7ad9\u76ee\u5f55\u540d#<\/span>&nbsp; \u5c31\u53ef\u4ee5\u770b\u5230\u7528\u6237\u7ec4\u4e86\uff0c\u8fd9\u65f6\u4f60\u4f1a\u53d1\u73b0\u6b64\u65f6\u7684\u7528\u6237\u548c\u7528\u6237\u7ec4\uff0c\u90fd\u662froot\uff08\u4e0d\u540c\u7684\u5b89\u88c5\u65b9\u5f0f\u7528\u6237\u6743\u9650\u53ef\u80fd\u4e0d\u540c\uff0c\u5982\u679c\u67e5\u770b\u7684\u7528\u6237\u7ec4\u975eroot\uff0c\u53ef\u4ee5\u5ffd\u7565\uff09<\/strong><\/p>\n\n\n<p>\n\n\u9047\u5230\u8fd9\u79cd\u60c5\u51b5\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e0b\u9762\u8fd9\u6761\u547d\u4ee4\u8fdb\u884c\u4fee\u6539\uff0c\u5c06root\u7528\u6237\u7ec4\u6539\u4e3awww\n\n<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown -R www:www #\u4f60\u7684\u7f51\u7ad9\u76ee\u5f55#<\/code><\/pre>\n\n\n<p>\u4fee\u6539\u5b8c\u6210\u540e\u518d\u6b21\u7528<strong><span style=\"color: #ff0000;\">ls -l #\u4f60\u7f51\u7ad9\u76ee\u5f55\u540d# <\/span><\/strong><span style=\"color: #ff0000;\"><span style=\"color: #000000;\">\u67e5\u770b\uff0c\u53d1\u73b0\u6b64\u65f6\u7684\u7528\u6237\u7ec4\u90fd\u5df2\u7ecf\u6539\u4e3a\u4e86www<\/span><\/span><\/p>\n\n\n<p>\n\n\u8fd9\u65f6\u6211\u4eec\u518d\u6b21\u901a\u8fc7\u57df\u540d\u8bbf\u95ee\u7f51\u7ad9\u4e00\u5207\u5c31\u6b63\u5e38\u4e86\n\n<\/p>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_01\"><h2 id=\"h2-3\"> <strong>3\u3001\u6302\u8f7d\u963f\u91cc\u4e91oss<\/strong> <\/h2><\/div><\/div>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_02\"><h3 id=\"h3-4\"> 3-1\u3001\u6302\u8f7doss <\/h3><\/div><\/div>\n\n\n\n<p>\u6839\u636e\u963f\u91cc\u4e91\u5b98\u65b9\u6587\u6863\uff0c\u6211\u4eec\u9700\u8981\u7528\u5230\u5b98\u65b9\u7684ossfs\u63d2\u4ef6\uff0c\u6ce8\u610f\uff0c\u6b64\u63d2\u4ef6\u53ea\u9002\u7528linux\u7cfb\u7edf&nbsp; &nbsp; &nbsp;&nbsp;<strong><a href=\"https:\/\/helpcdn.aliyun.com\/document_detail\/32196.html\">\u5b98\u65b9\u6587\u6863<\/a><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>ossfs\u5b89\u88c5\u65b9\u6cd5<\/li><\/ul>\n\n\n\n<p>\u5bf9\u4e8eUbuntu\uff0c\u5b89\u88c5\u547d\u4ee4\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get update\napt-get install gdebi-core\ngdebi your_ossfs_package<\/code><\/pre>\n\n\n\n<p>\n\n\u5bf9\u4e8eCentOS6.5\u53ca\u4ee5\u4e0a\uff0c\u5b89\u88c5\u547d\u4ee4\u4e3a\uff1a\n\n<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum localinstall your_ossfs_package<\/code><\/pre>\n\n\n\n<p>\n\n\u5bf9\u4e8eCentOS5\uff0c\u5b89\u88c5\u547d\u4ee4\u4e3a\uff1a\n\n<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum localinstall your_ossfs_package --nogpgcheck<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>\u4f7f\u7528\u65b9\u6cd5<\/li><\/ul>\n\n\n\n<p>\u8bbe\u7f6ebucket name \u548c AccessKeyId\/Secret\u4fe1\u606f\uff0c\u5c06\u5176\u5b58\u653e\u5728\/etc\/passwd-ossfs \u6587\u4ef6\u4e2d\u3002\u6ce8\u610f\u8fd9\u4e2a\u6587\u4ef6\u7684\u6743\u9650\u5fc5\u987b\u6b63\u786e\u8bbe\u7f6e\uff0c\u5efa\u8bae\u8bbe\u4e3a640\u3002\n\n<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo my-bucket:my-access-key-id:my-access-key-secret > \/etc\/passwd-ossfs\nchmod 640 \/etc\/passwd-ossfs<\/code><\/pre>\n\n\n\n<p>\n\n\u5c06OSS bucket \u6302\u8f7d\u5230\u6307\u5b9a\u76ee\u5f55\u3002\n\n<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ossfs my-bucket my-mount-point -ourl=my-oss-endpoint<\/code><\/pre>\n\n\n\n<p>\n\n\u793a\u4f8b\uff1a\n\n<\/p>\n\n\n<p>\u5c06<code class=\"ph codeph\">my-bucket<\/code>\u8fd9\u4e2abucket\u6302\u8f7d\u5230<code class=\"ph codeph\">\/tmp\/ossfs<\/code>\u76ee\u5f55\u4e0b\uff0cOSS endpoint\u662f<code class=\"ph codeph\">http:\/\/oss-cn-hangzhou.aliyuncs.com<\/code><\/p>\n\n\n<pre class=\"wp-block-code\"><code>ossfs my-bucket \/tmp\/ossfs -ourl=http:\/\/oss-cn-hangzhou.aliyuncs.com<\/code><\/pre>\n\n\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u4ece\u963f\u91cc\u4e91\u8d2d\u4e70\u7684\u4e91\u670d\u52a1\u5668\uff08ECS\uff09\u6765\u63d0\u4f9bossfs\u670d\u52a1\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5185\u7f51\u57df\u540d\uff0c\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\u60a8\u53ef\u4ee5\u5c06OSS endpoint \u6539\u4e3a&nbsp;<code class=\"ph codeph\">oss-cn-hangzhou-internal.aliyuncs.com<\/code>\uff0c\u8fd9\u6837\u53ef\u4ee5\u8282\u7701\u5e26\u5bbd\u65b9\u9762\u7684\u8d39\u7528\u3002OSS\u7684\u5185\u7f51\u57df\u540d\u8bf7\u53c2\u8003<a title=\"\" href=\"https:\/\/helpcdn.aliyun.com\/document_detail\/31837.html?spm=a2c4g.11186623.2.16.47907358c1QZ4s#concept-zt4-cvy-5db\" data-spm-anchor-id=\"a2c4g.11186623.2.16\">\u8bbf\u95ee\u57df\u540d\u548c\u6570\u636e\u4e2d\u5fc3<\/a>\u3002<\/p>\n<p><span style=\"color: #ff0000;\">\u6ce8\u610f\uff1a<\/span>\u76f4\u63a5\u901a\u8fc7\u8fd9\u6761\u547d\u4ee4\u6302\u8f7d\u7684\u7528\u6237\u7ec4\u4e3aroot\uff0c\u5982\u679c\u4f60\u662f\u6302\u8f7d\u5230\u4e86nextcloud\u7684\u6570\u636e\u76ee\u5f55data\u76ee\u5f55\u4e0b\uff0c\u4f60\u9700\u8981\u5c06\u7528\u6237\u7ec4\u4fee\u6539\u4e3awww\uff0c\u540c\u65f6\u8fd8\u9700\u8981\u5c06\u6743\u9650\u4e5f\u4fee\u6539\u4e3a770\uff0c\u6302\u8f7d\u65f6\u9700\u5c06\u547d\u4ee4\u4fee\u6539\u5982\u4e0b\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>ossfs my-bucket \/tmp\/ossfs -ourl=http:\/\/oss-cn-hangzhou.aliyuncs.com -o uid=1001 -o gid=1001 -o umask=007 -o allow_other<\/code><\/pre>\n\n\n\n<p>\/\/\u5982\u679c\u4f60\u60f3\u6302\u8f7d\u4e0b\u6765\u7684\u76ee\u5f55\u5c5e\u4e8e\u67d0\u4e2a\u7528\u6237\uff0c\u5219\u53ef\u4ee5\u8bbe\u7f6e<strong>uid<\/strong>\u548c<strong>gid<\/strong>\u53c2\u6570\u3002user_id\u548cgroup_id\u662f\u7528\u6237\u7684uid\u548cgid\u53c2\u6570(\u901a\u8fc7<strong>id user_name<\/strong>\u547d\u4ee4\u5373\u53ef\u67e5\u770b)<\/p>\n\n\n\n<p>\/\/\u4e0a\u9762\u7684<strong>umask<\/strong>\u662f\u7528\u6765\u8bbe\u7f6e\u6302\u8f7d\u4e0b\u6765\u7684\u6587\u4ef6\u5939\u53ca\u6587\u4ef6\u7684\u6743\u9650\u7684\u3002\u6bd4\u5982\u5982\u679c\u4f60\u60f3\u6302\u8f7d\u4e0b\u7684\u6587\u4ef6\u5939\u7684\u6743\u9650\u4e3a<strong>770<\/strong>\uff0c\u4f60\u5c31\u8bbe\u7f6e<strong>umask=007<\/strong>\uff0c\u4e5f\u5373<strong>777-770<\/strong>\u3002\u4e00\u5b9a\u4e0d\u80fd\u76f4\u63a5\u8bbe\u7f6e<strong>umask=770<\/strong>\uff0c\u800c\u662f\u8981\u7528777\u51cf\u53bb\u4f60\u60f3\u8d4b\u4e88\u7684\u6743\u9650\uff0c\u4e5f\u5373777-770\uff01<\/p>\n\n\n\n<p>\/\/<strong>allow_other<\/strong>\u662f\u4e3a\u4e86\u5141\u8bb8\u5176\u4ed6\u7528\u6237\u8bbf\u95ee\u6302\u8f7d\u6587\u4ef6\u5939<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u6302\u8f7d\u65f6\uff0c\u4f60\u6240\u8981\u6302\u8f7d\u7684\u76ee\u5f55\u4e00\u5b9a\u8981\u662f\u7a7a\u7684\uff0c\u91cc\u9762\u6ca1\u6709\u4efb\u4f55\u6587\u4ef6\uff0c\u5426\u5219\u5c06\u4f1a\u6302\u8f7d\u4e0d\u4e0a<\/p>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_02\"><h3 id=\"h3-5\"> 3-2\u3001\u8bbe\u7f6e\u5f00\u673a\u81ea\u52a8\u6302\u8f7d <\/h3><\/div><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/init.d\/<\/code><\/pre>\n\n\n\n<p>\n\n\u65b0\u5efaossfs\u6587\u4ef6\uff0c\u5199\u5165\u4fe1\u606f\n\n<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#! \/bin\/bash\n\n#\n\n# ossfs      Automount Aliyun OSS Bucket in the specified direcotry.\n\n#\n\n# chkconfig: 2345 90 10\n\n# description: Activates\/Deactivates ossfs configured to start at boot time.\n\n \n\nossfs my-bucket \/tmp\/ossfs -ourl=http:\/\/oss-cn-hangzhou.aliyuncs.com -o uid=1001 -o gid=1001 -o umask=007 -o allow_other<\/code><\/pre>\n\n\n\n<p>\u4fdd\u5b58\u9000\u51fa<\/p>\n\n\n\n<p>\u4e4b\u540e\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod a+x \/etc\/init.d\/ossfs<\/code><\/pre>\n\n\n\n<p>\u628a\u65b0\u5efa\u7acb\u7684ossfs\u811a\u672c\u8d4b\u4e88\u53ef\u6267\u884c\u6743\u9650\u3002<\/p>\n\n\n\n<p>\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chkconfig ossfs on<\/code><\/pre>\n\n\n\n<p>\n\n\u6302\u8f7d\u5b8c\u6bd5\u540e\u5229\u7528df -h\u547d\u4ee4\u67e5\u770b\u4f1a\u53d1\u73b0\u4e00\u4e2a256T\u7684\u5bb9\u91cf\uff0c\u56e0\u4e3aoss\u6700\u5927\u652f\u6301\u5bb9\u91cf\u4e3a256T\n\n<\/p>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_02\"><h3 id=\"h3-6\"> 3-3\u3001\u5378\u8f7dbucket <\/h3><\/div><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>fusermount -u \/tmp\/ossfs<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\n\n\u81f3\u6b64\uff0c\u5229\u7528\u963f\u91cc\u4e91\u670d\u52a1\u5668+oss\u642d\u5efa\u7684\u79c1\u4eba\u4e91\u76d8\u5c31\u642d\u597d\u4e86\n\n<\/p>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_01\"><h2 id=\"h2-7\">\u89c6\u9891\u6559\u7a0b<\/h2><\/div><\/div>\n\n\n\n<p class=\"has-text-align-center\">\u4e0a\u7bc7 <\/p>\n\n\n\n<figure><iframe src=\"\/\/player.bilibili.com\/player.html?aid=53300213&amp;cid=93248261&amp;page=1\" allowfullscreen=\"true\" style=\"width: 100%; height: 720px; max-width: 100%\uff1balign:center; padding:0px 0;\"><\/iframe><\/figure>\n\n\n\n<p class=\"has-text-align-center\">\u4e0b\u7bc7<\/p>\n\n\n\n<figure><iframe src=\"\/\/player.bilibili.com\/player.html?aid=53633899&amp;cid=93823300&amp;page=1\" allowfullscreen=\"true\" style=\"width: 100%; height: 720px; max-width: 100%\uff1balign:center; padding:0px 0;\"><\/iframe><\/figure>\n\n\n\n<div class=\"wp-block-pandastudio-title\"><div class=\"title_style_01\"><h2 id=\"h2-8\">\u534f\u52a9\u5b89\u88c5<\/h2><\/div><\/div>\n\n\n\n<p>\u672c\u7ad9\u63d0\u4f9b\u4ed8\u8d39\u534f\u52a9\u642d\u5efa\uff0c\u6709\u8fd9\u4e2a\u9700\u8981\u7684\u53ef\u4ee5\u7559\u8a00\u6216\u8005\u8054\u7cfb\u7ad9\u957f\uff01<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf4\u5230\u4e91\u76d8\uff0c\u5927\u5bb6\u7b2c\u4e00\u65f6\u95f4\u5e94\u8be5\u60f3\u5230\u7684\u5c31\u662f\u767e\u5ea6\u4e91\uff0c\u4f46\u662f\u5bf9\u4e8e\u975e\u4f1a\u5458\u7684\u7528\u6237\uff0c\u5b83\u4f1a\u5bf9\u4f60\u8fdb\u884c\u53ca\u5176\u6076\u5fc3\u7684\u9650\u901f\uff0c\u867d\u7136\u5bf9\u4e8e\u4f1a\u5458\u6765\u8bf4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":350,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,15],"tags":[3,16],"class_list":["post-349","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-nextcloud","tag-linux","tag-nextcloud"],"_links":{"self":[{"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/posts\/349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wurend.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=349"}],"version-history":[{"count":0,"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/posts\/349\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wurend.com\/index.php?rest_route=\/wp\/v2\/media\/350"}],"wp:attachment":[{"href":"https:\/\/www.wurend.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wurend.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wurend.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}