{"id":620,"date":"2020-07-02T11:32:06","date_gmt":"2020-07-02T03:32:06","guid":{"rendered":"https:\/\/www.iotch.xyz\/?p=620"},"modified":"2020-07-02T11:32:06","modified_gmt":"2020-07-02T03:32:06","slug":"%e6%a0%91%e8%8e%93%e6%b4%be%e5%9f%ba%e4%ba%8eseafile%e6%90%ad%e5%bb%ba%e7%a7%81%e6%9c%89%e4%ba%91%e7%bd%91%e7%9b%98","status":"publish","type":"post","link":"https:\/\/www.iotch.xyz\/?p=620","title":{"rendered":"\u6811\u8393\u6d3e\u57fa\u4e8eseafile\u642d\u5efa\u79c1\u6709\u4e91\u7f51\u76d8"},"content":{"rendered":"\n<p>\u6458\u8981\uff1a<\/p>\n\n\n\n<p>\u7f51\u76d8\u662f\u73b0\u5728\u4eba\u4eec\u751f\u6d3b\u4e2d\u7ecf\u5e38\u4f7f\u7528\u7684\u4e92\u8054\u7f51\u5de5\u5177\u3002\u5927\u5bb6\u7ecf\u5e38\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u5230\u767e\u5ea6\u7f51\u76d8\uff0c\u5fae\u4e91\uff0conedrive\u7b49\u7b49\u3002\u8fd9\u4e9b\u7f51\u76d8\u5927\u591a\u6570\u7528\u6237\u4f53\u9a8c\u4e0d\u597d\uff0c\u4e00\u4e2a\u662f\u7f51\u76d8\u4e0a\u4f20\u548c\u4e0b\u8f7d\u9650\u901f\uff0c\u53e6\u4e00\u4e2a\u662f\u7a7a\u95f4\u63d0\u4f9b\u6709\u9650\u3002<\/p>\n\n\n\n<p>\u5728\u5bb6\u5ead\u548c\u5de5\u4f5c\u4e2d\uff0c\u6211\u4eec\u6216\u8005\u4e00\u4e2a\u5c0f\u7684\u56e2\u961f\u7ecf\u5e38\u5728\u4e00\u4e2a\u5c40\u57df\u7f51\u5185\u529e\u516c\u548c\u5de5\u4f5c\uff0c\u4e0d\u53ef\u907f\u514d\u7684\u8981\u4f7f\u7528\u5230\u5171\u4eab\u6587\u4ef6\u7b49\u670d\u52a1\u3002\u6b64\u65f6\u6211\u4eec\u53ef\u4ee5\u6765\u642d\u5efa\u4e00\u4e2a\u5c40\u57df\u7f51\u5185\u7684\u79c1\u6709\u7f51\u76d8\u3002<\/p>\n\n\n\n<p>\u76ee\u524d\u6709\u4e00\u4e9b\u5f00\u6e90\u5e73\u53f0\u63d0\u4f9b\u4e86\u79c1\u6709\u7f51\u76d8\u642d\u5efa\u7684\u670d\u52a1\uff0c\u6bd4\u5982seafile\u3001nextcloud\u7b49\u3002\u5173\u4e8eseafile\uff08https:\/\/baike.baidu.com\/item\/seafile\/14688048?fr=aladdin\uff09\uff0c\u53ef\u4ee5\u8fdb\u884c\u8de8\u5e73\u53f0\u4f7f\u7528\u3002\u6211\u4eec\u5728\u7535\u8111\u4e0a\uff0c\u5b89\u5353\u624b\u673a\u4e0a\u90fd\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u670d\u52a1\u3002\u5173\u4e8enextcloud\uff0c\u6709\u5174\u8da3\u7684\u670b\u53cb\u53ef\u4ee5\u5c1d\u8bd5\u642d\u5efa\u3002<\/p>\n\n\n\n<p>\u5728\u6211\u7684\u5b9e\u9a8c\u5ba4\u4e2d\uff0c\u6709\u4e00\u4e2a\u6811\u8393\u6d3e\u3002\u6240\u4ee5\uff0c\u6211\u5c1d\u8bd5\u5728\u6811\u8393\u6d3e\u4e0a\u642d\u5efa\u57fa\u4e8eseafile\u7684\u79c1\u6709\u7f51\u76d8\uff0c\u4e0b\u9762\u5f00\u59cb\u5b9e\u64cd\u4e86\u3002<\/p>\n\n\n\n<p>\u6b65\u9aa41\uff1a\u66f4\u65b0\u6e90\u548c\u5b89\u88c5python\u73af\u5883<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update\nsudo apt-get upgrade\nsudo apt-get install python2.7 libpython2.7 python-setuptools python-pil python-ldap python-urllib3 sqlite3 python-requests<\/code><\/pre>\n\n\n\n<p>\u6b65\u9aa42\uff1a\u4e0b\u8f7dseafile\u7684linux\u5305<\/p>\n\n\n\n<p>\u5f53\u524d\u76ee\u5f55\u4e3a\uff1a\/home\/pi:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir seafile\nsudo wget https:\/\/github.com\/haiwen\/seafile-rpi\/releases\/download\/v6.2.5\/seafile-server_6.2.5_stable_pi.tar.gz\nsudo tar -xzf seafile-server_6.2.5_stable_pi.tar.gz<\/code><\/pre>\n\n\n\n<p>\u6b65\u9aa43\uff1a\u6267\u884cseafile\u5b89\u88c5\u7a0b\u5e8f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd seafile-server-6.2.5\nsudo .\/setup-seafile.sh<\/code><\/pre>\n\n\n\n<p>\u5176\u4e2d\u7684\u5b89\u88c5\u8fc7\u7a0b\u5982\u4e0b\uff1a\u540e\u9762\u7684\u5de5\u4f5c\u76ee\u5f55\u90fd\u5728\/home\/pi\/seafile-server-6.2.5\/<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>This script will guide you to config and setup your seafile server.\n\nMake sure you have read seafile server manual at\n\n        https:&#47;&#47;github.com\/haiwen\/seafile\/wiki\n\nNote: This script will guide your to setup seafile server using sqlite3,\nwhich may have problems if your disk is on a NFS\/CIFS\/USB.\nIn these cases, we sugguest you setup seafile server using MySQL.\n\nPress &#91;ENTER] to continue \n# \u8fd0\u884c\u5230\u8fd9\u91cc\u70b9\u51fb\u56de\u8f66\uff0c\u4ee5\u7ee7\u7eed\n-----------------------------------------------------------------\n\n\nChecking packages needed by seafile ...\n\nChecking python on this machine ...\nFind python: python2.7\n\n  Checking python module: setuptools ... Done.\n  Checking python module: python-imaging ... Done.\n  Checking python module: python-sqlite3 ... Done.\n\nChecking for sqlite3 ...Done.\n\nChecking Done.\n# \u8fd0\u884c\u5230\u8fd9\u91cc\u4ee3\u8868\u4f9d\u8d56\u68c0\u67e5\u5b8c\u6bd5\n\n\nWhat would you like to use as the name of this seafile server?\nYour seafile users will be able to see the name in their seafile client.\nYou can use a-z, A-Z, 0-9, _ and -, and the length should be 3 ~ 15\n&#91;server name]: zhdisk\n# seafile\u670d\u52a1\u5668\u7684\u540d\u5b57\uff0c\u81ea\u5df1\u6309\u89c4\u5219\u8d77\u4e00\u4e2a\u5c31\u884c\u4e86\n\nWhat is the ip or domain of this server?\nFor example, www.mycompany.com, or, 192.168.1.101\n\n&#91;This server's ip or domain]: 192.168.1.60\n# \u6811\u8393\u6d3e\u673a\u5668\u7684IP\u6216\u57df\u540d\uff0c\u6211\u8fd9\u91cc\u662f\u5c40\u57df\u7f51\u5185\uff0c\u6240\u4ee5\u4e3a\u5c40\u57df\u7f51\u7684IP\u5730\u5740\u3002\n\nWhere would you like to store your seafile data?\nNote: Please use a volume with enough free space.\n<\/code><\/pre>\n\n\n<p>[default: \/home\/pi\/seafile\/seafile-data ]<\/p>\n\n\n\n<p># seafile\u6570\u636e\u7684\u5b58\u653e\u4f4d\u7f6e\uff0c\u6309\u7167\u9ed8\u8ba4\u5373\u53ef What tcp port do you want to use for seafile fileserver? 8082 is the recommended port.<\/p>\n\n\n<p>[default: 8082 ]<\/p>\n\n\n\n<p># seafile\u670d\u52a1\u5668\u7684\u7aef\u53e3\u53f7\uff0c\u9ed8\u8ba48082 This is your config information: server name: zhdisk server ip\/domain: 192.168.1.60 seafile data dir: \/home\/pi\/seafile\/seafile-data fileserver port: 8082 If you are OK with the configuration, press [ENTER] to continue. # \u8fd9\u91cc\u786e\u8ba4\u4f60\u7684seafile\u670d\u52a1\u5668\u914d\u7f6e\uff0c\u6ca1\u95ee\u9898\u7ee7\u7eed\u56de\u8f66 Generating ccnet configuration in \/home\/pi\/seafile\/ccnet... done Successly create configuration dir \/home\/pi\/seafile\/ccnet. Generating seafile configuration in \/home\/pi\/seafile\/seafile-data ... Done. ----------------------------------------------------------------- Seahub is the web interface for seafile server. Now let's setup seahub configuration. Press [ENTER] to continue ----------------------------------------------------------------- # \u8fd9\u91cc\u5f00\u59cb\u5b89\u88c5seahub\uff0c\u56de\u8f66\u7ee7\u7eed Creating seahub database now, it may take one minute, please wait... Done. creating seafile-server-latest symbolic link ... done ----------------------------------------------------------------- Your seafile server configuration has been completed successfully. ----------------------------------------------------------------- # \u5df2\u7ecf\u5b89\u88c5\u5b8c\u6210\u4e86\uff0c\u4e0b\u8fb9\u662f\u544a\u8bc9\u4f60\u600e\u4e48\u542f\u52a8\u5b89\u88c5\u597d\u7684\u7a0b\u5e8f\u3002 run seafile server: .\/seafile.sh { start | stop | restart } run seahub server: .\/seahub.sh { start &lt;port&gt; | stop | restart &lt;port&gt; } ----------------------------------------------------------------- If the server is behind a firewall, remember to open these tcp ports: ----------------------------------------------------------------- # \u4e0b\u8fb9\u662f\u7a0b\u5e8f\u8981\u4f7f\u7528\u7684\u7aef\u53e3\uff0c\u5982\u679c\u5f00\u542f\u4e86\u9632\u706b\u5899\uff0c\u9700\u8981\u5f00\u653e\u8fd9\u4e24\u4e2a\u7aef\u53e3\u3002 port of seafile fileserver: 8082 port of seahub: 8000 When problems occur, refer to https:\/\/github.com\/haiwen\/seafile\/wiki for more information.<\/p>\n\n\n\n<p>\u6b65\u9aa43\uff1a\u542f\u52a8seafile\u670d\u52a1\u548cseahub\u670d\u52a1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#.\/seafile.sh start\n\n&#91;07\/05\/18 13:58:26] ..\/common\/session.c(132): using config file \/home\/pi\/seafile\/conf\/ccnet.conf\nStarting seafile server, please wait ...\nSeafile server started\n\nDone.\n#.\/seahub.sh start\n\nLC_ALL is not set in ENV, set to en_US.UTF-8\n.\/seahub.sh: line 209: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory\nStarting seahub at port 8000 ...\n\n----------------------------------------\nIt's the first time you start the seafile server. Now let's create the admin account\n----------------------------------------\n\nWhat is the email for the admin account?\n&#91; admin email ] xxxxxx@126.com\n# \u6539\u4e3a\u4f60\u7684\u90ae\u7bb1\uff0c\u4f5c\u4e3a\u7ba1\u7406\u5458\u8d26\u53f7\n\nWhat is the password for the admin account?\n&#91; admin password ]\n# \u8f93\u5165\u5bc6\u7801\n\nEnter the password again:\n&#91; admin password again ]\n# \u518d\u6b21\u8f93\u5165\u5bc6\u7801\n\n\n----------------------------------------\nSuccessfully created seafile admin\n----------------------------------------\n\n\n\n\n\nSeahub is started\n\nDone.<\/code><\/pre>\n\n\n\n<p>\u6b65\u9aa44\uff1a\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8seafile\u670d\u52a1\u548cseahub\u670d\u52a1<\/p>\n\n\n\n<p>\u521b\u5efa\u811a\u672c\uff1aseafile_start.sh<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#sudo vim seafile_start.sh\n\n#seafile_start.sh \u5199\u5165\u4ee5\u4e0b\u5185\u5bb9\nsudo .\/seafile.sh start\nsudo .\/seahub.sh start<\/code><\/pre>\n\n\n\n<p>\u5728\/etc\/rc.local\u4e2d\u6dfb\u52a0\u542f\u52a8\u811a\u672c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vim \/etc\/rc.local\n\n#\u6dfb\u52a0\u5185\u5bb9 \u6ce8\u610f \u5728 exit 0\u8fd9\u4e00\u884c\u4e4b\u524d \u5426\u5219\u4e0d\u4f1a\u6267\u884c\n\ncd \/home\/pi\/seafile-server-6.2.5\/\nsudo .\/seafile_start.sh<\/code><\/pre>\n\n\n\n<p>\u6b65\u9aa4\u4e94\uff1a\u9a8c\u8bc1<\/p>\n\n\n\n<p>windows\u7aef\uff1a\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8f93\u5165http:\/\/192.168.1.60:8000\uff0c\u5176\u4e2d192.168.1.60\u6362\u6210\u76f8\u5e94\u7684IP<\/p>\n\n\n\n<p>\u5b89\u5353\u7aef\uff1a\u5e94\u7528\u5e02\u573a\u641c\u7d22seafile\u4e91\u76d8\uff0c\u4e0b\u8f7d\u5e94\u7528\u3002\u914d\u7f6e\u670d\u52a1\u5668IP\uff0c\u8d26\u6237\uff0c\u5bc6\u7801\uff0c\u5373\u53ef\u4f7f\u7528\u3002<\/p>\n\n\n\n<p>\u53c2\u8003\u6587\u732e\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-\u6ce2\u65af\u7801\"><div class=\"wp-block-embed__wrapper\">\nhttp:\/\/blog.bossma.cn\/raspberrypi\/raspberry-3b-plus-deploy-personal-cloud-storage-seafile\/\n<\/div><\/figure>\n\n\n\n<p>\uff08\u6211\u662f\u53c2\u8003\u8fd9\u4e2a\u5199\u7684\uff0c\u4fee\u6539\u4e86\u4e00\u4e9b\u9519\u8bef\uff0c\u6dfb\u52a0\u4e86\u81ea\u5df1\u7684\u4e00\u4e9b\u5176\u4ed6\u7406\u89e3\u548c\u64cd\u4f5c\uff09<\/p>\n\n\n\n<p><a href=\"https:\/\/manual.seafile.com\/build_seafile\/rpi.html\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/manual.seafile.com\/build_seafile\/rpi.html<\/a><\/p>\n\n\n\n<p>\uff08\u5b98\u7f51\u7684\u642d\u5efa\u8fc7\u7a0b\uff0c\u5f88\u9ebb\u70e6\uff09<br>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3aCSDN\u535a\u4e3b\u300c\u901d\u8005\u4e0d\u706d\u300d\u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<br>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/blog.csdn.net\/windsnow1\/article\/details\/96281071\/\" target=\"_blank\" rel=\"noreferrer noopener\" rel=\"nofollow\" >https:\/\/blog.csdn.net\/windsnow1\/article\/details\/96281071\/<\/a><\/p>\n<button class=\"simplefavorite-button\" data-postid=\"620\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981\uff1a \u7f51\u76d8\u662f\u73b0\u5728\u4eba\u4eec\u751f\u6d3b\u4e2d\u7ecf\u5e38\u4f7f\u7528\u7684\u4e92\u8054\u7f51\u5de5\u5177\u3002\u5927\u5bb6\u7ecf\u5e38\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u5230\u767e\u5ea6\u7f51\u76d8\uff0c\u5fae\u4e91\uff0conedrive\u7b49\u7b49\u3002\u8fd9\u4e9b\u7f51\u76d8\u5927\u591a\u6570\u7528\u6237\u4f53 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-620","post","type-post","status-publish","format-standard","hentry","category-nas"],"_links":{"self":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=620"}],"version-history":[{"count":0,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/620\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}