{"id":338,"date":"2019-09-09T10:08:27","date_gmt":"2019-09-09T02:08:27","guid":{"rendered":"https:\/\/aichh.com\/?p=338"},"modified":"2021-12-23T14:02:47","modified_gmt":"2021-12-23T06:02:47","slug":"seafile%e6%8c%82%e8%bd%bdnfs%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/aichh.com\/338.html","title":{"rendered":"seafile\u6302\u8f7dNFS\u5b89\u88c5"},"content":{"rendered":"<!--wp-compress-html--><!--wp-compress-html no compression--><h2>seafile\u4ecb\u7ecd<\/h2>\n<p><i>seafile\u7a0b\u5e8f\u548c\u6570\u636e\u5206\u79bb\uff0c\u7a0b\u5e8f\u5b89\u88c5\u5728\u865a\u62df\u673a\u4e0a\uff0c\u6570\u636e\u901a\u8fc7NFS\u6302\u8f7d\u65b9\u5f0f\uff0c\u81ea\u52a8\u5907\u4efd\u6570\u636e\u5e93\u5230NFS\u3002<\/i><\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"user-content-\u90e8\u7f72\u548c\u76ee\u5f55\u8bbe\u8ba1\" data-slate-node=\"element\"><span data-slate-node=\"text\">\u90e8\u7f72\u548c\u76ee\u5f55\u8bbe\u8ba1<\/span><\/h2>\n<p>NFS\u6302\u8f7d\u76ee\u5f55\uff1a\/mnt\/nfs<\/p>\n<p>seafile\u7a0b\u5e8f\u76ee\u5f55\uff1a\/opt\/seafile<\/p>\n<p>seafile Data\u76ee\u5f55\uff1a\/opt\/seafile\/seafile-data --&gt; \/mnt\/nfs\/seafile-data<\/p>\n<h2>\u5b89\u88c5<\/h2>\n<p>\u670d\u52a1\u7aef\u652f\u6301linux\u548cwindows\u4e24\u79cd\u64cd\u4f5c\u7cfb\u7edf\uff0c\u672c\u6587\u7684\u9009\u62e9\u662fubuntu 20.4 x64seafilepro 8.0.15\u3002<\/p>\n<p><strong>\u51c6\u5907\u5b58\u50a8<\/strong><\/p>\n<p>\u5b89\u88c5nfs client\uff0c\u6dfb\u52a0\u5f00\u673a\u542f\u52a8\uff0c\u4fdd\u8bc1\u91cd\u542f\u540e\u6302\u8f7d\u4ecd\u7136\u751f\u6548\uff0c\u7136\u540e\u6302\u8f7dNFS<\/p>\n<figure class=\"highlight\">\n<pre><span class=\"preprocessor\">apt install nfs-common\r\nmkdir -p \/mnt\/nfs<\/span>\r\n<span class=\"preprocessor\">echo \"192.168.55.120:\/seafile  \/mnt\/nfs  nfs  defaults  0 0\" &gt;&gt; \/etc\/fstab<\/span>\r\n<span class=\"preprocessor\">mount \/mnt\/nfs<\/span>\r\n<\/pre>\n<\/figure>\n<p><strong>\u51c6\u5907\u8fd0\u884c\u73af\u5883<\/strong><\/p>\n<figure class=\"highlight\">\n<pre>sudo apt-get update\r\nsudo apt-get install python3 python3-setuptools python3-pip python3-ldap libmysqlclient-dev -y\r\nsudo pip3 install --timeout=3600 django==2.2.* future mysqlclient pymysql Pillow pylibmc  \r\ncaptcha jinja2 sqlalchemy==1.4.3 psd-tools django-pylibmc django-simple-captcha<\/pre>\n<pre>\r\n<\/pre>\n<\/figure>\n<p><strong>\u5b89\u88c5<\/strong><\/p>\n<p>\u67e5\u770b\u7cfb\u7edf\u67b6\u6784\uff0c32bit or 64bit<\/p>\n<pre><code><span class=\"preprocessor\"># uname -m      <\/span><\/code><\/pre>\n<p>\u521b\u5efaseafile\u6839\u76ee\u5f55\uff0c\u6e90\u6587\u4ef6\u5c06\u89e3\u538b\u5230\u8be5\u6839\u76ee\u5f55\u4e0b<\/p>\n<pre><code><span class=\"preprocessor\"># mkdir \/usr\/local\/src\/seafile<\/span>\r\n<span class=\"preprocessor\"># tar -C \/usr\/local\/src\/seafile -zxvf seafile-server_1.7.0_i386.tar.gz<\/span><\/code><\/pre>\n<p>that's all.<\/p>\n<h2>\u914d\u7f6e<\/h2>\n<figure class=\"highlight\">\n<pre><span class=\"preprocessor\"># cd \/usr\/local\/src\/seafile-server-*<\/span>\r\n<span class=\"preprocessor\"># .\/setup-seafile.sh<\/span>\r\n<\/pre>\n<\/figure>\n<p>\u914d\u7f6e\u53c2\u6570\u5982\u4e0b\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>seafile server name<\/td>\n<td>seafile\u670d\u52a1\u5668\u7684\u540d\u5b57\uff0c3~15 \u4e2a\u5b57\u7b26\uff0c\u53ef\u7528\u82f1\u6587\u5b57\u6bcd\uff0c\u6570\u5b57\uff0c\u4e0b\u5212\u7ebf<\/td>\n<\/tr>\n<tr>\n<td>seafile server ip or domain<\/td>\n<td>seafile\u670d\u52a1\u5668\u7684IP\u5730\u5740\u6216\u8005\u57df\u540d\u3002\u5ba2\u6237\u7aef\u5c06\u901a\u8fc7\u8fd9\u4e2aIP\u6216\u8005\u57df\u540d\u6765\u8bbf\u95eeSeafile\u670d\u52a1\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5728\u672c\u4f8b\u4e2d\uff0c\u8be5IP\u5730\u5740\u5e94\u8bbe\u4e3a\u9632\u706b\u5899\u7684\u4e92\u8054\u7f51IP<\/td>\n<\/tr>\n<tr>\n<td>ccnet server port<\/td>\n<td>\u9ed8\u8ba4\uff1a10001<\/td>\n<\/tr>\n<tr>\n<td>seafile data dir<\/td>\n<td>seafile\u6570\u636e\u5b58\u653e\u76ee\u5f55\uff0c\u9ed8\u8ba4\u662f.\/seafile\/seafile-data\uff0c\u5efa\u8bae\u653e\u5728\u4e00\u4e2aNFS\u670d\u52a1\u5668\u4e2d\uff0c\u65b9\u4fbf\u65e5\u540e\u7684\u6269\u5bb9\u548c\u7ef4\u62a4\u3002<\/td>\n<\/tr>\n<tr>\n<td>seafile server port<\/td>\n<td>seafile\u670d\u52a1\u5668\u4f7f\u7528\u7684TCP\u7aef\u53e3\uff0c\u9ed8\u8ba4\u4e3a12001<\/td>\n<\/tr>\n<tr>\n<td>seafile httpserver port<\/td>\n<td>seafile httpserver\u4f7f\u7528\u7684TCP\u7aef\u53e3\uff0c\u9ed8\u8ba4\u4e3a8082<\/td>\n<\/tr>\n<tr>\n<td>seahub admin email<\/td>\n<td>sehaub\u7ba1\u7406\u5458\u7684\u5e10\u6237\u3002\u8be5\u5e10\u53f7\u4ec5\u662f\u7ba1\u7406\u5458\u5e10\u53f7\uff0c\u7528\u4e8e\u53d1\u9001\u90ae\u4ef6\u901a\u77e5\u7684email\u5e10\u53f7\u9700\u5728seafile.conf\u4e2d\u8fdb\u884c\u914d\u7f6e\u3002<\/td>\n<\/tr>\n<tr>\n<td>seahub admin password<\/td>\n<td>seahub\u7ba1\u7406\u5458\u7684\u5bc6\u7801<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>seafile\u7684\u914d\u7f6e\u6587\u4ef6\u662f\u5206\u5e03\u5f0f\u7684\uff0c\u4e0d\u540c\u7ec4\u4ef6\u7684\u914d\u7f6e\u6587\u4ef6\u5355\u72ec\u5206\u5f00\uff0c\u4e0d\u5229\u4e8e\u7ef4\u62a4\u3002<\/p>\n<p><strong>\u542f\u52a8<\/strong><\/p>\n<figure class=\"highlight\">\n<pre><span class=\"comment\"># .\/seafile.sh start<\/span>\r\n<span class=\"comment\"># .\/seahub.sh start<\/span><span class=\"xml\">\r\n\u5047\u5982seahub\u7684\u7aef\u53e3\u4e0d\u662f\u9ed8\u8ba4\u7684<\/span><span class=\"number\">8000<\/span><span class=\"xml\">\uff0c\u5219\r\n.\/seahub.sh start <span class=\"tag\">&lt;<span class=\"title\">new_port<\/span>&gt;<\/span><\/span>\r\n<\/pre>\n<\/figure>\n<p><strong>\u505c\u6b62<\/strong><\/p>\n<figure class=\"highlight\">\n<pre><span class=\"preprocessor\"># .\/seafile.sh stop<\/span>\r\n<span class=\"preprocessor\"># .\/seahub.sh stop<\/span>\r\n<\/pre>\n<\/figure>\n<p><strong>\u91cd\u542f<\/strong><\/p>\n<figure class=\"highlight\">\n<pre><span class=\"preprocessor\"># .\/seafile.sh restart<\/span>\r\n<span class=\"preprocessor\"># .\/seahub.sh restart<\/span>\r\n<\/pre>\n<\/figure>\n<p>\u5047\u5982seahub\u7684\u7aef\u53e3\u4e0d\u662f\u9ed8\u8ba4\u76848000\uff0c\u5219<\/p>\n<figure class=\"highlight\">\n<pre># .\/seahub.sh restart <span class=\"tag\">&lt;<span class=\"title\">new_port<\/span>&gt;<\/span>\r\n<\/pre>\n<\/figure>\n<h1>\u5347\u7ea7<\/h1>\n<p>\u7531\u4e8eseafile\u7684\u5f00\u53d1\u975e\u5e38\u6d3b\u8dc3\uff0c\u65b0\u7248\u672c\u5c42\u51fa\u4e0d\u7a77\uff0c\u56e0\u800c\u7ecf\u5e38\u9700\u8981\u5347\u7ea7\u3002<\/p>\n<p>\u5347\u7ea7\u524d\u9700\u5148\u4e2d\u6b62seahub\u548cseafile\u8fdb\u7a0b\uff1a<\/p>\n<figure class=\"highlight\">\n<pre><span class=\"preprocessor\"># .\/seahub.sh stop<\/span>\r\n<span class=\"preprocessor\"># .\/seafile.sh stop<\/span>\r\n<\/pre>\n<\/figure>\n<p>\u65b0\u4e0b\u8f7d\u7684\u7248\u672c\u4e5f\u4e00\u5e76\u89e3\u538b\u5230seafile\u7684\u6839\u76ee\u5f55\u4e0b\uff0c\u5728\u672c\u6587\u4e2d\u6307\u7684\u662f<code>\/usr\/local\/src\/seafile<\/code>\uff0c\u8bfb\u8005\u4e5f\u53ef\u4ee5\u81ea\u884c\u9009\u62e9\u5176\u5b83\u76ee\u5f55\u3002\u6700\u7ec8\u7684\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n<figure class=\"highlight\">\n<pre><span class=\"comment\">\/usr\/local\/src<\/span>\r\n   <span class=\"literal\">-<\/span><span class=\"literal\">-<\/span> <span class=\"comment\">seafile<\/span>-<span class=\"comment\">server<\/span>-<span class=\"comment\">1<\/span>.<span class=\"comment\">7<\/span>.<span class=\"comment\">0<\/span>\r\n   <span class=\"literal\">-<\/span><span class=\"literal\">-<\/span> <span class=\"comment\">seafile<\/span>-<span class=\"comment\">server<\/span>-<span class=\"comment\">1<\/span>.<span class=\"comment\">4<\/span>.<span class=\"comment\">5<\/span>\r\n   <span class=\"literal\">-<\/span><span class=\"literal\">-<\/span> <span class=\"comment\">ccnet<\/span>\r\n   <span class=\"literal\">-<\/span><span class=\"literal\">-<\/span> <span class=\"comment\">seafile<\/span>-<span class=\"comment\">data\r\n<\/span><\/pre>\n<\/figure>\n<p><strong>\u5c0f\u7248\u672c\u5347\u7ea7<\/strong><\/p>\n<p>\u6307\u7684\u662f\u4ece1.6.0\u5347\u7ea7\u52301.6.1\u3002<\/p>\n<figure class=\"highlight\">\n<pre><span class=\"comment\">cd<\/span> <span class=\"comment\">\/usr\/local\/src\/seafile\/seafile<\/span>-<span class=\"comment\">server<\/span>-<span class=\"comment\">1<\/span>.<span class=\"comment\">3<\/span>.<span class=\"comment\">1\/seahub\/media<\/span>\r\n<span class=\"comment\">cp<\/span> <span class=\"literal\">-<\/span><span class=\"comment\">rf<\/span> <span class=\"comment\">avatars\/*<\/span> <span class=\"string\">.<\/span><span class=\"string\">.<\/span><span class=\"comment\">\/<\/span>.<span class=\"string\">.<\/span><span class=\"comment\">\/<\/span>.<span class=\"string\">.<\/span><span class=\"comment\">\/seahub<\/span>-<span class=\"comment\">data\/avatars\/<\/span>\r\n<span class=\"comment\">rm<\/span> <span class=\"literal\">-<\/span><span class=\"comment\">rf<\/span> <span class=\"comment\">avatars<\/span>\r\n<span class=\"comment\">ln<\/span> <span class=\"literal\">-<\/span><span class=\"comment\">s<\/span> <span class=\"string\">.<\/span><span class=\"string\">.<\/span><span class=\"comment\">\/<\/span>.<span class=\"string\">.<\/span><span class=\"comment\">\/<\/span>.<span class=\"string\">.<\/span><span class=\"comment\">\/seahub<\/span>-<span class=\"comment\">data\/avatars\r\n<\/span><\/pre>\n<\/figure>\n<p><strong>\u8fde\u7eed\u7248\u672c\u5347\u7ea7<\/strong><\/p>\n<p>\u6307\u7684\u662f\u4ece1.6.0\u5347\u7ea7\u52301.7.0\u3002<\/p>\n<figure class=\"highlight\">\n<pre><span class=\"title\">cd<\/span> \/usr\/local\/src\/seafile-server1.<span class=\"number\">7<\/span>.<span class=\"number\">0<\/span>\/upgrade\r\n.\/update_1.6_1.<span class=\"number\">7<\/span>.sh\r\n<\/pre>\n<\/figure>\n<p><strong>\u975e\u8fde\u7eed\u7248\u672c\u5347\u7ea7<\/strong><\/p>\n<p>\u73b0\u5728\u7684\u7248\u672c\u4e3a1.4\uff0c\u6700\u65b0\u7248\u672c\u4e3a1.7\uff0c\u9700\u8fde\u7eed\u6267\u884c<\/p>\n<figure class=\"highlight\">\n<pre><span class=\"comment\">cd<\/span> <span class=\"comment\">\/usr\/local\/src\/seafile<\/span>-<span class=\"comment\">server1<\/span>.<span class=\"comment\">7<\/span>.<span class=\"comment\">0\/upgrade<\/span>\r\n<span class=\"string\">.<\/span><span class=\"comment\">\/update_1<\/span>.<span class=\"comment\">4_1<\/span>.<span class=\"comment\">5<\/span>.<span class=\"comment\">sh<\/span>\r\n<span class=\"string\">.<\/span><span class=\"comment\">\/update_1<\/span>.<span class=\"comment\">5_1<\/span>.<span class=\"comment\">6<\/span>.<span class=\"comment\">sh<\/span>\r\n<span class=\"string\">.<\/span><span class=\"comment\">\/update_1<\/span>.<span class=\"comment\">6_1<\/span>.<span class=\"comment\">7<\/span>.<span class=\"comment\">sh\r\n<\/span><\/pre>\n<\/figure>\n<p>\u5347\u7ea7\u5b8c\u6bd5\u540e\u542f\u52a8seahub\u548cseafile\u8fdb\u7a0b\u3002<\/p>\n<p><strong>\u968f\u673a\u542f\u52a8<\/strong><\/p>\n<p>seafile\u670d\u52a1\u7531\u591a\u4e2a\u8fdb\u7a0b\u5171\u540c\u534f\u4f5c\u800c\u6210\uff0c<\/p>\n<p>\u521b\u5efa<code>\/etc\/init.d\/seafile-server<\/code><\/p>\n<figure class=\"highlight\">\n<pre><span class=\"shebang\">#!\/bin\/sh<\/span>\r\n<span class=\"comment\">### BEGIN INIT INFO<\/span>\r\n<span class=\"comment\"># Provides:\t\tseafile-server<\/span>\r\n<span class=\"comment\"># Required-Start:\t$all<\/span>\r\n<span class=\"comment\"># Required-Stop:\t$all<\/span>\r\n<span class=\"comment\"># Should-Start:\t\t$local_fs<\/span>\r\n<span class=\"comment\"># Should-Stop:\t\t$local_fs<\/span>\r\n<span class=\"comment\"># Default-Start:\t2 3 4 5<\/span>\r\n<span class=\"comment\"># Default-Stop:\t\t0 1 6<\/span>\r\n<span class=\"comment\">### END INIT INFO<\/span>\r\n\r\n<span class=\"comment\"># Change the value of \"user\" to your user name<\/span>\r\nuser=root\r\n\r\n<span class=\"comment\"># Change the value of \"script_path\" to your path of seafile installation<\/span>\r\nscript_path=\/usr\/local\/src\/seafile\/seafile-server-1.7.0\r\n\r\nsudo -u <span class=\"variable\">${user}<\/span> <span class=\"variable\">${script_path}<\/span>\/seafile.sh start &gt; \/tmp\/seafile.init.log 2&gt;&amp;1\r\nsudo -u <span class=\"variable\">${user}<\/span> <span class=\"variable\">${script_path}<\/span>\/seahub.sh start &gt; \/tmp\/seahub.init.log 2&gt;&amp;1\r\n<\/pre>\n<\/figure>\n<p>\u4ee5\u4e0a\u811a\u672c\u4ec5\u7528\u4e8estart\uff0c\u7f3a\u4e4fstop\u548crestart\u7684\u529f\u80fd\u3002<\/p>\n<p>\u66f4\u65b0<\/p>\n<figure class=\"highlight\">\n<pre><span class=\"preprocessor\"># chmod +x \/etc\/init.d\/seafile-server<\/span>\r\n<span class=\"preprocessor\"># update-rc.d seafile-server defaults<\/span>\r\n<\/pre>\n<\/figure>\n<h2>tips<\/h2>\n<ul>\n<li>\u53d8\u66f4\u9ed8\u8ba4\u7aef\u53e3\u540e\uff0cseafile\u53ef\u80fd\u4f1a\u51fa\u73b0\u95ee\u9898\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0b\u5efa\u8bae\u76f4\u63a5\u91cd\u88c5\u4e86\u4e8b\uff0c\u5305\u62ec\u670d\u52a1\u7aef\u548c\u5ba2\u6237\u7aef\u3002<\/li>\n<li>\u5ba2\u6237\u7aef\u7684\u5220\u9664\n<ul>\n<li>\u5220\u9664\u5ba2\u6237\u7aef\u4e4b\u524d\u8bf7\u786e\u4fddccnet\u8fdb\u7a0b\u5df2\u6740\u6389\uff0c\u5426\u5219\u65e0\u6cd5\u6b63\u5e38\u5378\u8f7d\u3002<\/li>\n<li>\u5378\u8f7d\u5b8c\u540e\uff0c\u624b\u5de5\u5220\u9664\u5ba2\u6237\u7aef\u7684\u914d\u7f6e\u6587\u4ef6\u5939<code>C:\u7528\u6237&lt;\u7528\u6237\u540d&gt;ccnet<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u5ba2\u6237\u7aef\u7684\u914d\u7f6e\u5ba2\u6237\u7aef\u7684\u914d\u7f6e\u6587\u4ef6\u4e3a<code>C:\u7528\u6237&lt;\u7528\u6237\u540d&gt;ccnetccnet.conf<\/code>\uff0c\u5047\u5982\u670d\u52a1\u7aef\u7684\u53d8\u66f4\u4e86\u9ed8\u8ba4\u7aef\u53e3\u53f7\uff0c\u9700\u5728\u6b64\u8fdb\u884c\u53d8\u66f4\u3002<\/li>\n<\/ul>\n<p>VIA:http:\/\/ioiioi.github.io\/categories\/seafile\/<\/p>\n<!--wp-compress-html no compression--><!--wp-compress-html-->","protected":false},"excerpt":{"rendered":"seafile\u4ecb\u7ecd seafile\u7a0b\u5e8f\u548c\u6570\u636e\u5206\u79bb\uff0c\u7a0b\u5e8f\u5b89\u88c5\u5728\u865a\u62df\u673a\u4e0a\uff0c\u6570\u636e\u901a\u8fc7NFS\u6302\u8f7d\u65b9\u5f0f\uff0c\u81ea\u52a8\u5907\u4efd\u6570\u636e\u5e93\u5230NFS\u3002 &nbsp; \u90e8\u7f72\u548c\u76ee\u5f55\u8bbe\u8ba1 NFS\u6302\u8f7d\u76ee\u5f55\uff1a\/mnt\/nfs seafile\u7a0b \u00b7\u00b7\u00b7","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[98,6,105],"class_list":["post-338","post","type-post","status-publish","format-standard","hentry","category-jiaocheng","tag-nfs","tag-seafile","tag-105"],"views":1304,"_links":{"self":[{"href":"https:\/\/aichh.com\/api\/wp\/v2\/posts\/338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aichh.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aichh.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aichh.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aichh.com\/api\/wp\/v2\/comments?post=338"}],"version-history":[{"count":5,"href":"https:\/\/aichh.com\/api\/wp\/v2\/posts\/338\/revisions"}],"predecessor-version":[{"id":1014,"href":"https:\/\/aichh.com\/api\/wp\/v2\/posts\/338\/revisions\/1014"}],"wp:attachment":[{"href":"https:\/\/aichh.com\/api\/wp\/v2\/media?parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aichh.com\/api\/wp\/v2\/categories?post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aichh.com\/api\/wp\/v2\/tags?post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}