{"id":196,"date":"2020-08-30T10:01:32","date_gmt":"2020-08-30T02:01:32","guid":{"rendered":"https:\/\/www.guger.top\/?p=196"},"modified":"2020-08-30T10:01:32","modified_gmt":"2020-08-30T02:01:32","slug":"%e4%bd%bf%e7%94%a8nextcloud%e8%87%aa%e5%bb%ba%e7%bd%91%e7%9b%98","status":"publish","type":"post","link":"https:\/\/www.guger.top\/index.php\/2020\/08\/30\/%e4%bd%bf%e7%94%a8nextcloud%e8%87%aa%e5%bb%ba%e7%bd%91%e7%9b%98\/","title":{"rendered":"\u4f7f\u7528nextcloud\u81ea\u5efa\u7f51\u76d8"},"content":{"rendered":"<p>[info]\u8bbe\u7f6e\u7684\u7248\u672c\u662f19.1\u7248\u672c\u4e0d\u540c\u8bbe\u7f6e\u7565\u6709\u5dee\u5f02[\/info]<br \/>\n\u7528\u4e86\u8bb8\u4e45\u7684vps\u60f3\u81ea\u5efa\u4e2a\u7f51\u76d8\u5e73\u65f6\u5206\u4eab\u4e2a\u5c0f\u6587\u4ef6\u4f7f\u7528\u3002\u521a\u5f00\u59cb\u9009\u7528\u7684\u662f\u5b9d\u5854\u91cc\u53ef\u4ee5\u4e00\u952e\u642d\u5efa\u7684\u53ef\u9053\u4e91\uff0c\u4f46\u662f\u7ecf\u8fc7\u4e00\u9635\u65f6\u95f4\u7684\u4f7f\u7528\u540e\u53d1\u73b0\u7531\u4e8e\u53ea\u662f\u514d\u8d39\u7248\uff0c\u8bb8\u591a\u529f\u80fd\u65e0\u6cd5\u4f7f\u7528\uff0c\u6587\u4ef6\u64cd\u4f5c\u65b9\u5f0f\u662f\u76f4\u63a5\u663e\u793a\u8be5\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\uff0c\u6709\u5229\u6709\u5f0a\u3002\u800c\u4e14\u754c\u9762ui\u5df2\u7ecf\u6bd4\u8f83\u8001\u4e86\u4e0d\u592a\u9002\u5408\u76ee\u524d\u7b80\u6d01\u98ce\u3002\u540e\u6765\u5c1d\u8bd5\u6362\u6210\u56fd\u4eba\u5f00\u53d1\u7684Cloudreve\uff0c\u754c\u9762\u4e0d\u9519\u800c\u4e14\u53ef\u4ee5\u8054\u5408aira\u8fdb\u884c\u79bb\u7ebf\u4e0b\u8f7d\u5f88\u4e0d\u9519\uff0c\u4f46\u662f\u5bfc\u5165\u6587\u4ef6\u505a\u7684\u975e\u5e38\u5dee\u52b2\uff0c\u6bcf\u6b21\u5176\u4ed6\u6587\u4ef6\u66f4\u65b0\u4e86\u5fc5\u987b\u91cd\u65b0\u624b\u52a8\u64cd\u4f5c\u628a\u6587\u4ef6\u52a0\u5165\u4ed6\u7684\u6570\u636e\u5e93\u3002\u7528\u4e86\u4e00\u9635\u4e5f\u6ca1\u589e\u52a0\u4ec0\u4e48\u6587\u4ef6\uff0c\u5c31\u4f1a\u51fa\u73b0\u6587\u4ef6\u65e0\u6cd5\u4e0a\u4f20\u7684\u95ee\u9898\u4e86\u3002\u65e0\u5948\u53ea\u80fd\u518d\u6b21\u8f6c\u6362\u3002\u8fd9\u6b21\u5c1d\u8bd5\u4e86\u5b8c\u5168\u5f00\u6e90\u7684nextcloud\uff0c\u542c\u8bf4\u662f\u5f00\u53d1\u4eba\u5458\u5bf9\u5546\u4e1a\u5316\u7684\u524d\u7248\u672c\u4e0d\u6ee1\u91cd\u65b0\u5f00\u53d1\u7684\uff0c\u800c\u4e14\u6709\u8bb8\u591a\u63d2\u4ef6\u53ef\u4ee5\u4f7f\u7528\u3002\u8fd9\u4e2a\u5012\u662f\u53ef\u4ee5\u8ba9\u6211\u9f13\u6363\u4e00\u4e0b\u3002\u4e8e\u662f\u5c1d\u8bd5\u5b89\u88c5\u3002<br \/>\n\u5927\u6982\u67e5\u9605\u4e86\u4e00\u4e0b\uff0c\u6709\u5feb\u7167\u7248\uff0c\u7f16\u8bd1\u7248\uff0c\u8fd8\u6709php\u5b89\u88c5\u7248\u3002\u6700\u540e\u9009\u4e86\u6bd4\u8f83\u7b80\u5355\u7684php\u5b89\u88c5\uff0c\u901a\u8fc7<a href=\"https:\/\/download.nextcloud.com\/server\/installer\/setup-nextcloud.php\" rel=\"noopener noreferrer\" target=\"_blank\" rel=\"nofollow\" >\u8fd9\u4e2a\u94fe\u63a5<\/a>\u4e0b\u8f7dphp\u6587\u4ef6\u7136\u540e\u4f7f\u7528\u5b9d\u5854\u5efa\u7acb\u7f51\u7ad9\uff0c\u901a\u8fc7\u6d4f\u89c8\u5668\u6253\u5f00\u8fd9\u4e2a\u6587\u4ef6\u5373\u53ef\u8fdb\u884c\u5b89\u88c5\u3002\u6839\u636e\u63d0\u793a\u6b65\u9aa4\u9010\u6b65\u64cd\u4f5c\uff0c\u5176\u4e2d\u8bb0\u7740\u586b\u5199\u6570\u636e\u5e93\u7684\u5404\u9879\u6570\u636e\uff0c\u8fd9\u91cc\u6ce8\u610f\u6570\u636e\u5e93\u7684\u8def\u5f84\u6700\u597d\u4e0d\u8981\u5728\u7f51\u7ad9\u6587\u4ef6\u5939\u5e95\u4e0b\uff0c\u8981\u79fb\u51fa\u53bb\u3002\u6211\u9009\u7528\u7684\u8def\u5f84\u662f\/www\/studio\/data\u3002\u4f46\u662f\u8fd9\u91cc\u4e0d\u80fd\u76f4\u63a5\u786e\u5b9a\uff0c\u4e0d\u7136\u4f1a\u63d0\u793a\u6ca1\u6709\u8bfb\u5199\u6743\u9650\u3002\u521a\u5f00\u59cb\u4ee5\u4e3a\u662f644\u7684\u6743\u9650\u4e0d\u591f\u4e8e\u662f\u5347\u7ea7\u5230777\u7136\u800c\u8fd8\u662f\u4e0d\u884c\u5c31\u6709\u70b9\u61f5\u903c\u4e86\u3002\u67e5\u8be2\u7f51\u4e0a\u6709\u8bf4\u5173\u95edselinux\u7684\u8fd8\u662f\u4e0d\u884c\u3002\u4e8e\u662f\u7ee7\u7eed\u67e5\u53d1\u73b0\u5b9d\u5854\u6709\u4e2a\u9632\u8de8\u7ad9\u7684\u63aa\u65bd\u8bbe\u7f6e\u4e00\u4e2a\u7f51\u7ad9\u6240\u80fd\u8bbf\u95ee\u7684\u6587\u4ef6\u8def\u5f84\u7684\u6743\u9650\uff0c\u5728\u6839\u76ee\u5f55\u4e0b\u7684.user.ini\u6587\u4ef6\u3002\u4fee\u6539\u8fd9\u4e2a\u6587\u4ef6\u7684\u8def\u5f84\u5373\u53ef\u3002\u7136\u540e\u7b49\u5f85\u521d\u59cb\u5316\u5373\u53ef\u8fdb\u5165\u3002<br \/>\n\u8fdb\u5165\u540e\u5148\u8fdb\u5165\u8bbe\u7f6e-\u6982\u89c8\u8fdb\u884c\u5b89\u5168\u6027\u68c0\u67e5\u3002\u4f1a\u53d1\u73b0\u4e00\u5806\u9519\u8bef\u8fd9\u91cc\u8bb0\u5f55\u4e00\u4e0b\u6211\u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898\u3002<\/p>\n<p>\u4e00\u3001PHP \u7684\u8bbe\u7f6e\u4f3c\u4e4e\u6709\u95ee\u9898, \u65e0\u6cd5\u83b7\u53d6\u7cfb\u7edf\u73af\u5883\u53d8\u91cf. \u4f7f\u7528 getenv(\u201dPATH\u201d) \u6d4b\u8bd5\u65f6\u4ec5\u8fd4\u56de\u7a7a\u7ed3\u679c.<br \/>\n\u7f16\u8f91\/www\/server\/php\/73\/etc\/php-fpm.conf\u6587\u4ef6\uff0c\u8def\u5f84\u4e2d\u768473\u8bf7\u66ff\u6362\u4e3a\u4f60\u7684php\u7248\u672c\uff0c71\u4e3a7.1\uff0c72\u4e3a7.2\uff0c\u4ee5\u6b64\u7c7b\u63a8\u3002<br \/>\n\u5728\u6587\u4ef6\u7684\u6700\u540e\u9762\u6dfb\u52a0\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre class=\"hl\"><code class=\"\">env[HOSTNAME] = $HOSTNAME\r\nenv[PATH] = \/usr\/local\/bin:\/usr\/bin:\/bin\r\nenv[TMP] = \/tmp\r\nenv[TMPDIR] = \/tmp\r\nenv[TEMP] = \/tmp<\/code><\/pre>\n<p>\u4e8c\u3001php\u6a21\u5757\u7f3a\u5931\uff0c\u76f4\u63a5\u53bb\u5b9d\u5854-\u8f6f\u4ef6\u5546\u5e97-phpx.x\u7248\u672c\u4e0b\u5f00\u59cb\u5b89\u88c5\uff0c\u6309\u56fe\u7d22\u9aa5\u5373\u53ef\u3002\uff08\u53e6\u5916\u52a0\u4e2aapcu\uff09<br \/>\n\u53e6\u5916\u8fdb\u5165\u7f51\u7ad9\u6839\u76ee\u5f55\uff0c\u6253\u5f00config\u6587\u4ef6\u5939\uff0c\u7f16\u8f91config.php\u6587\u4ef6\u5728\u6700\u540e\u4e00\u4e2a\u9017\u53f7\u524d\u9762\u589e\u52a0\u4ee5\u4e0b\u4ee3\u7801<\/p>\n<pre class=\"hl\"><code class=\"\">  'memcache.local' => '\\OC\\Memcache\\APCu',\r\n  'memcache.distributed' => '\\OC\\Memcache\\Redis',\r\n  'redis' => \r\n  array(\r\n    'host' => 'localhost',\r\n    'port' => 6379,\r\n  ),\r\n  'memcache.locking' => '\\OC\\Memcache\\Redis',<\/code><\/pre>\n<p>\u5728php\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u4fee\u6539\u4e00\u4e0b\u51e0\u884c<\/p>\n<pre class=\"hl\"><code class=\"\">opcache.enable=1\r\nopcache.enable_cli=1\r\nopcache.interned_strings_buffer=8\r\nopcache.max_accelerated_files=10000\r\nopcache.memory_consumption=128\r\nopcache.save_comments=1\r\nopcache.revalidate_freq=1<\/code><\/pre>\n<p>\u7167\u7740\u6570\u5b57\u6539\u5c31\u597d\uff0c\u6ca1\u6709\u524d\u540e\u987a\u5e8f\u3002<br \/>\n\u4e09\u3001\u8fd8\u6709\u4e00\u4e2a\u4fee\u6539\u6570\u636e\u5e93\u8be5\u4f4d\u56db\u5b57\u8282\u5bf9\u9f50\u7684<br \/>\n\u6309\u7167<a href=\"https:\/\/docs.nextcloud.com\/server\/19\/admin_manual\/configuration_database\/mysql_4byte_support.html\" rel=\"noopener noreferrer\" target=\"_blank\" rel=\"nofollow\" >\u5b98\u7f51<\/a>\u7ed9\u51fa\u7684\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff0c<br \/>\n\u5982\u679c\u51fa\u73b0\u6743\u9650\u4e0d\u8db3\u662f<br \/>\nmysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation'<br \/>\n\u4fee\u6539mysql\u767b\u5f55\u8bbe\u7f6e<br \/>\nvi \/etc\/my.cnf<br \/>\n\u5728[mysqld]\u6bb5\u4e2d\u52a0\u5165 skip-grant-tables<br \/>\n\u4fdd\u5b58\u4e4b\u540e\u91cd\u542fmysql\u670d\u52a1<br \/>\nsystemctl mysqld restart<br \/>\n\u5982\u679c\u5728\u8bbe\u7f6esudo -u www-data php occ maintenance:repair\u8fd9\u6761\u547d\u4ee4\u65f6\u51fa\u73b0\u62a5\u9519\uff0c\u770b\u6e05\u695a\u6570\u636e\u5e93\u7684\u540d\u5b57\u4fee\u6539\u4e0b\u5217\u547d\u4ee4<br \/>\nALTER TABLE `oc_addressbooks`<br \/>\nMODIFY COLUMN `principaluri`  varchar(191) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL AFTER `id`,<br \/>\nMODIFY COLUMN `uri`  varchar(191) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL AFTER `displayname`;<\/p>\n<p>\u5176\u4ed6\u7684\u5173\u4e8e\u5f00\u542fhttps\u4e4b\u7c7b\u7684\u7533\u8bf7ssl\u8bc1\u4e66\u90e8\u7f72\u5373\u53ef\uff0c\u76f4\u5230\u51fa\u73b0\u7eff\u8272\u5bf9\u52fe\u5373\u914d\u7f6e\u5b8c\u6210\u3002\u6211\u770b\u8fd8\u6709\u535a\u4e3b\u914d\u7f6e\u4f2a\u9759\u6001\uff0c\u4e0a\u7f51\u67e5\u8be2\u4e86\u4e00\u4e0b\uff0c\u4f2a\u9759\u6001\u7684\u597d\u5904\u5728\u4e8e\u589e\u52a0\u641c\u7d22\u5f15\u64ce\u7684\u6392\u540d\uff0c\u60f3\u4e86\u60f3\u81ea\u5df1\u4e0d\u9700\u8981\uff0c\u6545\u6ca1\u6709\u64cd\u4f5c\u3002\u81f3\u6b64nextcloud\u914d\u7f6e\u5b8c\u6210\uff0c\u540e\u671f\u53ef\u4ee5\u589e\u52a0\u90ae\u7bb1\uff08\u5b9d\u5854\u90ae\u5c40\u53ef\u4ee5\u5efa\u7acb\u81ea\u5df1\u7684\u57df\u540d\u90ae\u7bb1\u4f46\u662f\u9700\u8981\u4e00\u4e2a\u9762\u677f\uff09\u4ee5\u53ca\u79bb\u7ebf\u4e0b\u8f7d\u7b49\u529f\u80fd\u3002\u6709\u7a7a\u518d\u5199<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[info]\u8bbe\u7f6e\u7684\u7248\u672c\u662f19.1\u7248\u672c\u4e0d\u540c\u8bbe\u7f6e\u7565\u6709\u5dee\u5f02[\/info] \u7528\u4e86\u8bb8\u4e45\u7684vps\u60f3\u81ea\u5efa\u4e2a\u7f51\u76d8\u5e73\u65f6\u5206\u4eab\u4e2a\u5c0f\u6587\u4ef6\u4f7f\u7528\u3002\u521a\u5f00\u59cb\u9009\u7528\u7684 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":""},"categories":[1],"tags":[],"class_list":["post-196","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/posts\/196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/comments?post=196"}],"version-history":[{"count":0,"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/posts\/196\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/media?parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/categories?post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guger.top\/index.php\/wp-json\/wp\/v2\/tags?post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}