开启辅助访问
 找回密码
 立即注册

如何自个做一台网盘?

momololoxxxx 回答数0 浏览数1006
自个做云盘,我推荐使用NextCloud,步骤很简单:

1,部署:
      NextCloud 部署环境简单,为了省事和轻松上手,你可以直接部署在Linux,Ubuntu,Centos或者其他支持系统部署 宝塔面板 宝塔面板 - 简单好用的Linux/Windows服务器运维管理面板;
      宝塔面板安装完成后,安装运行的其他环境,PHP,MySql 和 Ngnix,当然 LAMP 也行。
      创建一台网站。

2,安装
      源码安装:目前最新版本是 20.0.6,下载地址:https://download.nextcloud.com/server/releases/nextcloud-20.0.6.zip
      在线安装:下载 文件 setup - NextCloud.php :https://download.nextcloud.com/server/installer/setup-nextcloud.php 上传到网站根目录访问即可。

3,如果有需要,可以下载 NextCloud 的客户端:
      Windows:https://github.com/nextcloud/desktop/releases/download/v3.1.1/Nextcloud-3.1.1-x64.msi
      Mac:https://github.com/nextcloud/desktop/releases/download/v3.1.1/Nextcloud-3.1.1.pkg
      Linux:https://github.com/nextcloud/desktop/releases/download/v3.1.1/Nextcloud-3.1.1-x86_64.AppImage
      Android:https://play.google.com/store/apps/detAIls?id=com.nextcloud.client
      iOS:https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8

4,扩展插件和功能
     如果不涉及到权限分配,多用户使用,可以跳过 安全组,组文件夹 设定,你可以访问 NextCloud 插件,安装任何你需要的功能,比如,在线编辑 Office ,视频通话等等,插件库访问地址:All apps - App Store - Nextcloud

5,安装后后台的出错警告处理
   报错1:PHP 的设置似乎有问题, 无法获取系统环境变量. 使用 getenv(\”PATH\”) 测试时仅返回空结果。
   解决:访问/www/server/php/72/etc/php-fpm.conf,在其尾部添加一行
env[PATH] = /usr/local/bin:/usr/bin:/bin:/usr/local/php/bin   然后重启 PHP
   报错2:PHP 模块 ‘fileinfo’ 缺失. 我们强烈建议启用此模块以便在 MIME 类型检测时获得最准确的结果
   解决:PHP 安装 fileinfo 扩展即可。
   报错3:Your data directory and files are probably accessible from the Internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root.
  解决:修改nextcloud绑定的网站配置文件,添加nextcloud常用目录禁止访问即可
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
        deny all;
}  报错4:The “Strict-Transport-Security” HTTP header is not set to at least “15552000” seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips.
解决: 修改nextcloud绑定的网站配置文件,添加一行header信息
add_header Strict-Transport-Security "max-age=63072000;"; 报错5:内存缓存未配置,为了提升使用体验,请尽量配置内存缓存。
解决:打开/www/wwwroot/你的域名/config/config.php,手动给nextcloud的配置文件中添加一行设置,指定使用APCu作为缓存:
'memcache.local' => '\OC\Memcache\APCu' 报错6:The PHP OPcache is not properly configured. For better performance it is recommended to use the following settings in the php.ini:
解决:PHP安装OPcache模块
报错6:您的网页服务器未正确设置以解析“/.well-known/caldav”及您的网页服务器未正确设置以解析“/.well-known/carddav”
解决:添加两行重定向配置
rewrite /.well-known/carddav /remote.php/dav permanent;
rewrite /.well-known/caldav /remote.php/dav permanent;

实际使用中,速度或是挺快的。值得推荐。
当贝投影