nextcloud配置優化和常見問題(FAQ)

FAQ:

  1. 設置cron後臺任務
    使用nginx用戶進行定時任務啓動(爲了優化性能, 正確配置後臺任務非常重要. 對於較大的實例, 推薦配置爲 ‘Cron’. 詳情請參考相關文檔.)
vim   /etc/crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed
*/15  *  *  *  * nginx php -f /var/www/nextcloud/cron.php

重啓crond

systemctl restart crond

  1. 日誌出現錯誤ERROR:you are using a fallback implementation of the intl extension
    由於沒有安裝init模塊
yum install php7.1w-init
systemctl restart php-fpm
systemctl restart nginx

需要注意的是php應該對應自已的版本,nginx對應的是自己的服務器

  1. 提示沒有配置好opcache.ini
vim /etc/php.d/opcache.ini
修改/etc/php.d/opcache.ini,將以下行註釋去掉,並修改爲對應的配置值
zend_extension=opcache.so
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.revalidate_freq=1
opcache.save_comments=1

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章