1. 您在安装过程中未设置默认的国际区号。缺失国际区号的电话号码时将使用默认的国际区号进行验证。要允许无国际区号的电话,请在您的配置文件中添加 “default_phone_region” 设置选项并依照 ISO 3166-1 进行设置。 了解更多详情,请参见文档 ↗
修改config/config.php文件,
添加:'default_phone_region' => 'CN',
2. One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command occ maintenance:repair –include-expensive
to perform the migrations.
执行:sudo docker exec -u www-data nextcloud php occ maintenance:repair --include-expensive
3. 服务器没有配置维护时段开始时间。 这意味着资源密集型日常后台作业也将在您的主要使用时间执行。 我们建议将其设置为低使用率的时间,这样用户就不会受到这些繁重任务造成的负载的影响。 了解更多详情,请参见文档 ↗。
修改config/config.php文件,
添加:'maintenance_window_start' => 1,
4. 当前正在使用数据库处理事务性文件锁定。若有内存缓存可用,请进行配置以提升性能。
docker-compose.yml 文件添加:
redis:
image: redis:alpine
container_name: nextcloud-redis
restart: always
ports:
- "6379:6379"
volumes:
- ./redis_data:/data
修改config/config.php文件,添加:
'memcache.locking' => '\\OC\\Memcache\\Redis',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'redis' => array(
'host' => 'redis', // 使用 Docker 服务名
'port' => 6379,
),
5. 上次后台作业执行运行了 3 小时前。 似乎有些不对劲。 Check the background job settings.
手动执行Corn任务: sudo docker exec -u www-data nextcloud bash -c '/usr/local/bin/php -f /var/www/html/cron.php'
看后台提示消失没
# 进入容器
sudo docker exec -it nextcloud bash
# 安装cron
apt update&&apt install -y cron
# 创建任务文件
echo "*/5 * * * * www-data /usr/local/bin/php -f /var/www/html/cron.php" > /etc/cron.d/nextcloud
# 设置正确权限
chmod 0644 /etc/cron.d/nextcloud
# 将任务加载到 cron
crontab /etc/cron.d/nextcloud
# 启动 cron 服务
service cron start
# 其他
检查任务是否已添加:crontab -l
验证 cron 服务状态:service cron status