nextcloud可以看做是一款基于owncloud的私有云解决方案。如果只需要简单的使用nextcloud,最基本的部署环境只需要nginx(apache)+php即可。
记录一下在宝塔面板环境下搭建nextcloud的过程中出现的一些问题及解决。
=======更新========
Nextcloud 14.x版本后会出现一些新的警告,可以参照:
Nextcloud 16.x
一、部署
部署的过程不再详述,总结一下就是:
1.宝塔面板安装nginx+php7.2(注意nextcloud从13.0版本开始才支持php 7.2)
3.服务端解压并访问
4.填写安装信息(用户名、密码),如果只是简单使用,可直接使用SQLite作为数据库,不需要MySQL
二、发现问题
经过部署,nextcloud已经可以在web端或者客户端使用了,体验上来说,是没有任何影响的。但是从web端进入管理页面,会有如下错误
PHP 的设置似乎有问题, 无法获取系统环境变量. 使用 getenv(\”PATH\”) 测试时仅返回空结果.
Please check the installation documentation ↗ for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.
PHP 模块 ‘fileinfo’ 缺失. 我们强烈建议启用此模块以便在 MIME 类型检测时获得最准确的结果.
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.
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.
内存缓存未配置,为了提升使用体验,请尽量配置内存缓存。更多信息请参见文档。
The PHP OPcache is not properly configured. For better performance it is recommended to use the following settings in the php.ini:
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opca