{"id":242,"date":"2018-05-12T16:28:26","date_gmt":"2018-05-12T08:28:26","guid":{"rendered":"https:\/\/wp.yaanren.win\/?p=242"},"modified":"2018-05-12T16:28:26","modified_gmt":"2018-05-12T08:28:26","slug":"nanopi-neo2%e5%92%8c1-bay-nas-kit-%e5%ae%89%e8%a3%85ownclound","status":"publish","type":"post","link":"https:\/\/wp.625300.xyz\/?p=242","title":{"rendered":"NanoPI NEO2\u548c1-bay NAS kit \u5b89\u88c5ownclound"},"content":{"rendered":"<div class=\"h1 fl\">\n<p id=\"subject_tpc\" class=\"fl\">\u57fa\u4e8e\uff1ananopi-neo2_ubuntu-core-xenial_4.11.0_20170523<\/p>\n<\/div>\n<div class=\"c\">\u00a0\u8f6c\u8f7d\u81ea\uff1ahttp:\/\/www.arm9home.net\/read.php?tid-161986.html<\/div>\n<div class=\"tpc_content\">\n<div id=\"p_tpc\"><\/div>\n<div id=\"read_tpc\" class=\"f14\">\u3000\u3000\u672c\u6765\u4e70\u4e2a\u5c31\u662f\u60f3\u8981\u4e2a\u4e91\u76d8\uff0c\u7c7b\u4f3c360\u3001\u817e\u8baf\u3001\u767e\u5ea6\u4e91\uff0c\u60f3\u968f\u65f6\u968f\u5730\u90fd\u53ef\u4ee5\u4e0a\u4f20\u4e0b\u8f7d\u6587\u4ef6\uff0c\u65b9\u4fbf\u5e73\u677f\u3001\u624b\u673a\u3001\u529e\u516c\u5ba4\u3001\u7b14\u8bb0\u672c\u4ee5\u53ca\u5bb6\u91cc\u9762\u53f0\u5f0f\u673a\u540c\u6b65\uff0c\u61d2\u5f97\u5e26\u7535\u8111\u3002<br \/>\n\u5b89\u88c5seafile\u5931\u8d25\uff0c\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\uff0c\u53ef\u80fd\u662f\u7f16\u8bd1\u5668\u4e0d\u4e00\u6837\uff0c\u603b\u4e4blinux\u4e0d\u719f\u6089\uff0c\u5b89\u88c5\u4e0d\u8d77\u3002<br \/>\n\u540e\u6765\u7528\u4e86nanopi-neo2_debian-nas-jessie_4.11.0_20170525\u7248\u672c\uff0c\u91cc\u9762\u7531rsync\uff0c\u4f46\u597d\u50cf\u548c\u4e91\u76d8\u4e0d\u592a\u4e00\u6837\uff0c\u4e91\u76d8\u5c31\u662f\u672c\u5730\u6587\u4ef6\u4e00\u65e6\u4fee\u6539\uff0c\u81ea\u52a8\u540c\u6b65\u4e0a\u53bb\uff0c\u800c\u4e0d\u9700\u8981\u8bbe\u7f6e\u5b9a\u65f6\u4e4b\u7c7b\u7684\uff0c\u4e5f\u6709\u53ef\u80fd\u6211\u641e\u4e0d\u6765\u3002<br \/>\n\u4e70nanopi\u662f\u56e0\u4e3aopenmediavault\uff0comv\u672c\u6765\u6709owncloud\u7684\u63d2\u4ef6\uff0c\u53ef\u60dc\u73b0\u5728\u6ca1\u6709\u4e86\uff0c\u5728omv\u73af\u5883\u4e0b\u770b\u4e86\u5f88\u591a\u6559\u7a0b\uff0c\u4e0d\u662f\u8fd9\u91cc\u4e0d\u5bf9\u5c31\u662f\u90a3\u91cc\u4e0d\u5bf9\uff0c\u592a\u9ebb\u70e6\u4e86\u3002<br \/>\n\u7ed3\u679c\u8fd8\u662f\u6e05\u96f6\uff0c\u7528\u5728nanopi-neo2_ubuntu-core-xenial_4.11.0_20170523\u5168\u90e8\u91cd\u65b0\u5b89\uff0c\u7ed3\u679c\u5f88\u5bb9\u6613\u3002\u4e3a\u907f\u514d\u8d70\u5f2f\u8def\uff0c\u4e5f\u65b9\u4fbf\u4ee5\u540e\u81ea\u5df1\u67e5\u8be2\uff0c\u5199\u4e2a\u6559\u7a0b\u3002<\/p>\n<p><b>\u66f4\u65b0\u6e90<\/b><br \/>\n\u56e0\u4e3aowncloud\u597d\u50cf\u4ee5\u524d\u662fphp5\u7684\uff0c\u6240\u4ee5\u514d\u5f97\u517c\u5bb9\u6027\u7b49\u95ee\u9898\uff0c\u8fd8\u662f\u5b89\u88c5php5\u611f\u89c9\u597d\u4e9b\uff0c\u4f46ubuntu16.04\u662fphp7\u3002\u53e6\u5916apache2\u4e5f\u4e0d\u80fd\u5b89\u88c5\uff0c\u56e0\u6b64\u8981\u66f4\u65b0\u6e90\u3002<br \/>\nvi \/etc\/apt\/sources.list<br \/>\n\u52a0\u4e0a<br \/>\ndeb\u00a0<a id=\"url_1\" href=\"http:\/\/ftp.es.debian.org\/debian\" target=\"_blank\" rel=\"noopener\">http:\/\/ftp.es.debian.org\/debian<\/a>\u00a0stable main contrib non-free<br \/>\ndeb-src\u00a0<a id=\"url_2\" href=\"http:\/\/ftp.es.debian.org\/debian\" target=\"_blank\" rel=\"noopener\">http:\/\/ftp.es.debian.org\/debian<\/a>\u00a0stable main contrib non-free<br \/>\ndeb\u00a0<a id=\"url_3\" href=\"http:\/\/ftp.debian.org\/debian\/\" target=\"_blank\" rel=\"noopener\">http:\/\/ftp.debian.org\/debian\/<\/a>\u00a0wheezy-updates main contrib non-free<br \/>\ndeb-src\u00a0<a id=\"url_4\" href=\"http:\/\/ftp.debian.org\/debian\/\" target=\"_blank\" rel=\"noopener\">http:\/\/ftp.debian.org\/debian\/<\/a>\u00a0wheezy-updates main contrib non-free<br \/>\ndeb\u00a0<a id=\"url_5\" href=\"http:\/\/security.debian.org\/\" target=\"_blank\" rel=\"noopener\">http:\/\/security.debian.org\/<\/a>\u00a0wheezy\/updates main contrib non-free<br \/>\ndeb-src\u00a0<a id=\"url_6\" href=\"http:\/\/security.debian.org\/\" target=\"_blank\" rel=\"noopener\">http:\/\/security.debian.org\/<\/a>\u00a0wheezy\/updates main contrib non-free<br \/>\n\u518d\u8fd0\u884c<br \/>\nsudo apt-get update<\/p>\n<p><b>\u5b89\u88c5 mysql<\/b><br \/>\n\u5b89\u88c5\u4e2d\u8bbe\u7f6emysql\u7684root\u8d26\u53f7\u548c\u5bc6\u7801<br \/>\nsudo apt-get install mysql-server<br \/>\n\u5982\u679c\u662fsqlite3<br \/>\nsudo apt-get install sqlite3<\/p>\n<p><b>\u5b89\u88c5Apache2<\/b><br \/>\nsudo apt-get install apache2<\/p>\n<p><b>\u5b89\u88c5PHP5<\/b><br \/>\nsudo apt-get install php5 php5-gd php-xml-parser php5-intl php5-mysql<br \/>\n\u5982\u679c\u662fsqlite3<br \/>\nsudo apt-get install php5 php5-gd php-xml-parser php5-intl php5-sqlite<\/p>\n<p><b>\u5b89\u88c5Curl<\/b><br \/>\nsudo apt-get install curl libcurl3 php5-curl<\/p>\n<p><b>\u4e0b\u8f7downcloud<\/b><br \/>\nsudo wget\u00a0<a id=\"url_7\" href=\"https:\/\/download.owncloud.org\/community\/owncloud-latest.tar.bz2\" target=\"_blank\" rel=\"noopener\">https:\/\/download.owncloud.org\/community\/owncloud-latest.tar.bz2<\/a><\/p>\n<p><b>\u89e3\u538b\u5b89\u88c5owncloud<\/b><br \/>\nsudo tar xjf owncloud-*<br \/>\nsudo cp -r owncloud\/ \/html\/<\/p>\n<p><b>\u5efa\u7acbdata\u6587\u4ef6\u5939<\/b><br \/>\ncd \/html\/owncloud<br \/>\nsudo mkdir data<\/p>\n<p><b>\u6302\u8f7d\u786c\u76d8<\/b><br \/>\n\u67e5\u770b\u786c\u76d8\u5206\u533a<br \/>\nfdisk -l<br \/>\n\u67e5\u770b\u6211\u7684\u786c\u76d8\u662f\/dev\/sda1<br \/>\n\u6302\u8f7d<br \/>\nmount \/dev\/sda1 data<br \/>\n\u6c38\u4e45\u6302\u8f7d<br \/>\nvi \/etc\/fstab<br \/>\n\u6dfb\u52a0<br \/>\n\/dev\/sda1 \/html\/owncloud\/data ext4 defaults 1 2<br \/>\n\u4fdd\u5b58\u9000\u51fa\u9a8c\u8bc1<br \/>\nmount\u00a0-a<br \/>\n\u5982\u679c\u6709\u9519\uff0c\u4ee5\u540e\u8d77\u4e0d\u8d77\u6765\uff0cneopi\u6ca1\u6709\u663e\u793a\u5668\uff0c\u53ea\u6709\u91cd\u6765\uff0c\u4e00\u5b9a\u6ce8\u610f<br \/>\n\u91cd\u65b0mount<br \/>\nmount -n -o remount,rw \/<br \/>\n\u91cd\u542f<br \/>\nreboot<\/p>\n<p><b>\u8bbe\u7f6e\u6743\u9650<\/b><br \/>\ncd \/html\/owncloud<br \/>\nsudo chown -R www-data:www-data data<br \/>\nsudo chown -R www-data:www-data config<br \/>\nsudo chown -R www-data:www-data apps<\/p>\n<p><b>\u914d\u7f6eweb\u670d\u52a1\u5668<\/b><br \/>\nvi \/etc\/apache2\/apache2.conf<br \/>\n\u4fee\u6539<br \/>\n&lt;Directory \/&gt;<br \/>\nOptions Indexes FollowSymLinks<br \/>\nAllowOverride All<br \/>\nRequire all granted<br \/>\n&lt;\/Directory&gt;<\/p>\n<p><b>\u914d\u7f6e\u670d\u52a1<\/b><br \/>\nsudo service apache2 restart<br \/>\nsudo a2enmod rewrite<br \/>\nsudo a2enmod headers<br \/>\nsudo service apache2 restart<\/p>\n<p><b>\u914d\u7f6eowncloud\u5f00\u6d4f\u89c8\u5668<\/b><br \/>\n\u4ee5\u6211\u7684\u76ee\u6807\u673a\u5668\u7684ip\u5730\u5740192.168.1.16\u4e3a\u4f8b\uff0c<a id=\"url_8\" href=\"http:\/\/192.168.1.16\/owncloud\" target=\"_blank\" rel=\"noopener\">http:\/\/192.168.1.16\/owncloud<\/a>\u540e\u4e0d\u8be6\u8bc9\u4e86<\/p>\n<p><b>\u4fee\u6539IP\u5730\u5740\u4e3a\u56fa\u5b9aIP<\/b><br \/>\nvi \/etc\/network\/interfaces<br \/>\n\u6dfb\u52a0<br \/>\n# The primary network interface<br \/>\nauto eth0<br \/>\niface eth0 inet static<br \/>\naddress 192.168.1.100<br \/>\nnetmask 255.255.255.0<br \/>\ngateway 192.168.1.1<br \/>\n\u91cd\u542f\u7f51\u7edc<br \/>\nsudo \/etc\/init.d\/networking restart<\/p>\n<p><b>\u9632\u706b\u5899\u8bbe\u7f6e<\/b><br \/>\n\u5b89\u88c5\u9632\u706b\u5899<br \/>\nsudo apt-get install ufw<br \/>\n\u914d\u7f6e\u9632\u706b\u5899<br \/>\nsudo vi \/etc\/default\/ufw<br \/>\nIPV6=yes<br \/>\n\u4fdd\u5b58\u9000\u51fa<br \/>\n\u6253\u5f00ssh,http,https,\u82b1\u751f\u58f3<br \/>\nsudo ufw default deny incoming<br \/>\nsudo ufw default allow outgoing<br \/>\nsudo ufw allow ssh<br \/>\nsudo ufw allow http<br \/>\nsudo ufw allow https<br \/>\nsudo ufw allow 6060\/tcp<br \/>\nsudo ufw allow 6060\/udp<br \/>\nsudo ufw enable<\/p>\n<p><b>\u5b89\u88c5\u82b1\u751f\u58f3<\/b><br \/>\n\u9996\u5148\u5b89\u88c5g++<br \/>\nsudo apt-get install g++<br \/>\n\u4e0b\u8f7d\u4e0b\u6765<br \/>\nwget\u00a0<a id=\"url_9\" href=\"http:\/\/download.oray.com\/peanuthull\/phddns-2.0.2.16556.tar.gz\" target=\"_blank\" rel=\"noopener\">http:\/\/download.oray.com\/peanuthull\/phddns-2.0.2.16556.tar.gz<\/a><br \/>\n\u89e3\u538b\u538b\u7f29\u5305<br \/>\ntar zxvf phddns-2.0.2.16556.tar.gz<br \/>\n\u8f6c\u5230\u89e3\u538b\u5305\u91cc\u9762<br \/>\ncd phddns-2.0.2.16556\/<br \/>\n\u7136\u540e<br \/>\n.\/configure<br \/>\nmake<br \/>\ncd src<br \/>\nsudo .\/phddns<br \/>\n\u8f93\u5165\u4e00\u7cfb\u5217\u5982\u8d26\u53f7\u5bc6\u7801\u540e\u8fde\u63a5\u6210\u529f<br \/>\ncp phddns \/usr\/bin\/<br \/>\n\u5f00\u673a\u81ea\u52a8\u8fd0\u884c<br \/>\nvi \/etc\/rc.local<br \/>\n\u6dfb\u52a0<br \/>\n\/usr\/bin\/phddns -c \/etc\/phlinux.conf -d<\/p>\n<p><b>\u8bbe\u7f6e\u786c\u76d8\u4f11\u7720\uff0c\u8282\u80fd<\/b><br \/>\n\u5b89\u88c5hdparm<br \/>\nsudo apt-get install hdparm<br \/>\n\u786e\u4fdd\u4f60\u7684\u786c\u76d8\u652f\u6301hdparm,<br \/>\nsudo hdparm -y \/dev\/sda1<br \/>\n\u5982\u679c\u8f93\u51fa\u5982\u4e0b\u7ed3\u679c\uff0c\u5c31\u8868\u660e\u652f\u6301\uff0c<br \/>\n\/dev\/sda1:<br \/>\nissuing standby command<br \/>\n\u5982\u679c\u770b\u5230\u7c7b\u4f3c\u5982\u4e0b\u8f93\u51fa\uff0c\u5c31\u8868\u660e\u4e0d\u652f\u6301\uff0c\u53ef\u4ee5\u8df3\u5230 hd-idle \u6216\u8005 sdparm\uff0c<br \/>\n\/dev\/sda2:<br \/>\nissuing standby command<br \/>\nSG_IO: bad\/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00<\/p>\n<p>\u68c0\u67e5\u786c\u76d8\u662f\u5426\u652f\u6301\u5199\u7f13\u5b58\u529f\u80fd\uff0c<br \/>\nsudo hdparm -I \/dev\/sda1 | grep &#8216;Write cache&#8217;<br \/>\n\u5982\u679c\u770b\u5230 * (\u661f\u53f7)\uff0c\u8868\u793a\u652f\u6301\uff0c<br \/>\n* Write cache<br \/>\n\u5982\u679c\u6ca1\u6709\u770b\u5230 * (\u661f\u53f7)\uff0c\u8868\u793a\u4e0d\u652f\u6301\uff0c<br \/>\nWrite cache<\/p>\n<p>\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff0c<br \/>\nsudo vim \/etc\/hdparm.conf<br \/>\n\u6dfb\u52a0<br \/>\n\/dev\/sda1 {<br \/>\nwrite_cache = on<br \/>\nspindown_time = 120<br \/>\n}<br \/>\n\u5982\u679c\u4e0d\u652f\u6301\u5199\u7f13\u5b58\uff0c\u53bb\u6389 write_cache = on\u3002<br \/>\n\u91cd\u542f hdparm \u670d\u52a1\uff0c<br \/>\nsudo service hdparm restart<\/p>\n<p>\u5927\u529f\u544a\u6210<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u4e8e\uff1ananopi-neo2_ubuntu-core-xenial_4.11.0_20170523 \u00a0\u8f6c\u8f7d\u81ea\uff1a&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"class_list":["post-242","post","type-post","status-publish","format-standard","hentry","category-30"],"_links":{"self":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=242"}],"version-history":[{"count":0,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/242\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}