Nextcloud Upgrade error

CONTENTS


Lastmodified 2024-03-29 (金) 13:46:09


Web上からバージョンアップをしてみると、新バージョンのダウンロードでエラー
CLIで実施して成功。

# cd /usr/local/www/nextcloud/updater
# sudo -u www php updater.phar

ブルートフォース対策機能

Nextclooud管理画面へのログインを数回間違うと・・・こうなる。

あなたのIPアドレスは、 "xxx.xxx.xxx.xxx" として認識されており、現在ブルートフォース対策機能により様々なリクエストのパフォーマンスが低下しています。

https://manualmaton.com/2023/12/14/nextcloud%E3%80%81%E3%83%96%E3%83%AB%E3%83%BC%E3%83%88%E3%83%95%E3%82%A9%E3%83%BC%E3%82%B9%E3%81%AE%E8%AA%A4%E6%A4%9C%E7%9F%A5%E5%AF%BE%E5%BF%9Cocc%E5%AE%9F%E8%A1%8C/

https://nextcloud.stylez.co.jp/blog/techblog/too_many_requests.html

# cd /usr/local/www/nextcloud
# sudo -u www php occ security:bruteforce:reset {xxx.xxx.xxx.xxx}

php80 to php81

history

 1003  8:01    pkg info \*php80\* > ~/installed-php-ports-list
 1004  8:02    pkg delete \*php80\*
 1005  8:02    portinstall lang/php81                                        ←  ZTS にチェック
 1005  8:02    portinstall lang/php81-extensions                ← PDO firebird 以外全部チェック
 1006  8:20    portinstall www/mod_php81                          ←  ZTS にチェック
 1007  8:26    portinstall databases/phpmyadmin devel/pecl-APCu graphics/pecl-imagick --batch && apachectl restart

すべてのチェックに合格しました。


Redis

Nextcloud_Sus.PNG

セットアップに関して警告がいくつかあります。

データベースは取引ファイルを見ることに使われています。パフォーマンスをあげるには、可能であればメモリーのキャッシュを設定してください。詳しくは こちらの文書↗をご覧ください。

https://docs.nextcloud.com/server/27/admin_manual/configuration_files/files_locking_transactional.html

# portinstall databases/redis

Installing redis-7.0.11...
===> Creating groups.
Creating group 'redis' with gid '535'.
===> Creating users
Creating user 'redis' with uid '535'.
      To setup "redis" you need to edit the configuration file:
      /usr/local/etc/redis.conf

      To run redis from startup, add redis_enable="YES"
      in your /etc/rc.conf.

===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/bin/redis-sentinel
/usr/local/bin/redis-cli
/usr/local/bin/redis-server
/usr/local/bin/redis-check-rdb
/usr/local/bin/redis-check-aof
/usr/local/bin/redis-benchmark

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
https://redis.io/
===>  Cleaning for redis-7.0.11

/etc/rc.conf

redis_enable="YES"

# portinstall databases/pecl-redis

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/ports/databases/pecl-redis/work-php81/redis-5.3.7/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
--- all ---
Build complete.
Don't forget to run 'make test'.
===>  Staging for php81-pecl-redis-5.3.7
===>   php81-pecl-redis-5.3.7 depends on file: /usr/local/include/php/main/php.h - found
===>   php81-pecl-redis-5.3.7 depends on file: /usr/local/lib/php/20210902-zts/session.so - found
===>   Generating temporary packing list
====> Compressing man pages (compress-man)
--->  Installing the new version via the port
===>  Deinstalling for php81-pecl-redis
===>   php81-pecl-redis not installed, skipping
===>  Installing for php81-pecl-redis-5.3.7
===>  Checking if php81-pecl-redis is already installed
===>   Registering installation for php81-pecl-redis-5.3.7
Installing php81-pecl-redis-5.3.7...
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-30-redis.ini

===>  Cleaning for php81-pecl-redis-5.3.7

/usr/local/www/nextcloud/config/config.php

'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
     'host' => 'localhost',
     'port' => 6379,
     'timeout' => 0.0,
     'password' => '', // Optional, if not defined no password will be used.
      ),

apachectl restart

Nextcloud_OK.PNG

Nextcloud Hub 5 (27.0.0)

【概要】

あなたは現在、PHP 8.0.29 を使用しています。

ディストリビューションでサポートされたら、すぐにPHPのバージョンをアップグレードして、PHPグループ↗の提供するパフォーマンスとセキュリティメリットを享受してください。

http://www.lifewithunix.jp/notes/2023/06/18/freebsd12_4-updating-php-version-from-8_0-to-8_1-for-wordpress/

/usr/ports/UPDATING

20221126:
AFFECTS: users of lang/php80
AUTHOR: bofh@FreeBSD.org

The default version of PHP has been switched from 8.0 to 8.1.

If you use binary packages you should make a list of php packages
before running 'pkg upgrade':

# pkg info \*php80\* > ~/installed-php-ports-list

After the upgrade, check with such list if all your php extensions
are still installed, and reinstall them if needed.

I f you use mod_php80 you need to deinstall it and install mod_php81.
# pkg delete  \*php80\*  

して、

# portinstall lang/php81-extensions
# portinstall www/mod_php81

したら、Nextcloud が Internal Server Error で開かなくなった (ーー;)

あれこれログとか見てみたら 、config.php の設定「'memcache.local' => '\\OC\\Memcache\\APCu',」関連で、エラーが出ているらしい。

本来なら、Memcache \OC\Memcache\APCu

# php -i | grep -i apcu
/usr/local/etc/php/ext-20-apcu.ini,
apcu
APCu Support => Enabled
APCu Debugging => Disabled

となるはずが、

# php -i | grep -i apcu
PHP Warning:  PHP Startup: Unable to load dynamic library 'apcu.so' (tried: /usr/local/lib/php/20210902-zts/apcu.so (Cannot open "/usr/local/lib/php/20210902-zts/apcu.so"), /usr/local/lib/php/20210902-zts/apcu.so.so (Cannot open "/usr/local/lib/php/20210902-zts/apcu.so.so")) in Unknown on line 0
/usr/local/etc/php/ext-20-apcu.ini,

こんな・・・具合。

とりあえず、正常にインストール・動作しているサーバから、apcu.so と ext-20-apcu.ini を取ってきてコピー。

アクセス出来た!

追加インストールすべきports

portinstall databases/phpmyadmin devel/pecl-APCu graphics/pecl-imagick --batch && apachectl restart

コレをしておけば上記エラーは解消できる模様( ̄。 ̄;)

バックグラウンドジョブの設定を確認してください↗。

最後のバックグラウンドジョブの実行は1 時間前を実行しました。何かがおかしいようです。 バックグラウンドジョブの設定を確認してください↗。

www権限でcronを設定

# crontab -u www -e
*/5     *       *       *       *       /usr/local/bin/php -f /usr/local/www/nextcloud/cron.php

書き込んだファイルは、/var/cron/tabs に、www として保存される。

https://nofu.jp/wiki/freebsd/freebsd_12_install_nextcloud_16

データベースは取引ファイルを見ることに使われています。

パフォーマンスをあげるには、可能であればメモリーのキャッシュを設定してください。

データベースにいくつかのインデックスがありません。

大きなテーブルにインデックスを追加すると、自動的に追加されないまでに時間がかかる可能性があるためです。 "occ db:add-missing-indices"を実行することによって、インスタンスが実行し続けている間にそれらの欠けているインデックスを手動で追加することができます。 インデックスが追加されると、それらのテーブルへのクエリは通常はるかに速くなります。

テーブル "oc_mounts"のインデックス "mounts_user_root_path_index"が見つかりません。

# su -m www -c "php /usr/local/www/nextcloud/occ db:add-missing-indices"

Nextcloud 26.0.2 to Nextcloud 27.0.0

Downloading でエラー

# sudo -u www php occ maintenance:repair

後、リトライ


Nextcloud 25.0.7 to Nextcloud 26.0.2

WebUpdate 中の

Extracting
Parsing response failed.
Show detailed response

でエラー

#cd /usr/local/www/nextcloud
# sudo -u www php occ maintenance:repair

でもう一度WebUpdate

すべてのチェックに合格しました。


Nextcloud 24.0.12 to Nextcloud 25.0.7

WebUpdate && Page reload

データベースにいくつかのインデックスがありません。

# su -m www -c "php /usr/local/www/nextcloud/occ db:add-missing-indices"

OK


Nextcloud 24.0.0 to Nextcloud 24.0.12

Site backup

# cd /usr/local/www
# tar cvfzp nextcloud_20230620.tar.gz nextcloud

WebUpdate

Page reload de 概要をみる

データベースにいくつかのインデックスがありません。 大きなテーブルにインデックスを追加すると、自動的に追加されないまでに時間がかかる可能性があるためです。 "occ db:add-missing-indices"を実行することによって、インスタンスが実行し続けている間にそれらの欠けているインデックスを手動で追加することができます。 インデックスが追加されると、それらのテーブルへのクエリは通常はるかに速くなります。
テーブル "oc_filecache"のインデックス "fs_parent"が見つかりません。
テーブル "oc_mounts"のインデックス "mounts_class_index"が見つかりません。
# su -m www -c "php /usr/local/www/nextcloud/occ db:add-missing-indices"
Check indices of the share table.
Check indices of the filecache table.
Adding additional parent index to the filecache table, this can take some time...
Filecache table updated successfully.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.
Check indices of the oc_mounts table.
Adding mounts_class_index index to the oc_mounts table, this can take some time...
oc_mounts table updated successfully.

Web Page reload

PHP OPcacheモジュールが正しく設定されていません。詳細は ドキュメント を参照してください。
OPcacheのインターン化文字列バッファーがまもなく一杯になります。全てのスクリプトをキャッシュに保管できるようにするには、opcache.interned_strings_bufferの値を8より多い値で、PHP設定に適用することを推奨します。

/usr/local/etc/php.ini

      :
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8      ←ここを 16 へ
      :
 # apachectl restart
データベース内の一部のカラムで、大きなint型への変換が欠落しています。大きなテーブルのカラムタイプの変更には時間がかかるため、それらは自動的に変更されませんでした。occ db:convert-filecache-bigint" を実行することで、それらの保留中の変更を手動で適用することができます。この操作は、インスタンスがオフラインの時に行う必要があります。
# su -m www -c "php /usr/local/www/nextcloud/occ dbconvert-filecache-bigint"
Command "dbconvert-filecache-bigint" is not defined.


Do you want to run "db:convert-filecache-bigint" instead?  (yes/no) [no]:
> yes

Following columns will be updated:

* files_trash.auto_id
* file_metadata.id

This can take up to hours, depending on the number of files in your instance!
Continue with the conversion (y/n)? [n] yes

WebPageReload

すべてのチェックに合格しました。


Nextcloud 24.0.0

データベースにいくつかのインデックスがありません。 大きなテーブルにインデックスを追加すると、自動的に追加されないまでに時間がかかる可能性があるためです。 
"occ db:add-missing-indices"を実行することによって、インスタンスが実行し続けている間にそれらの欠けているインデックスを手動で追加することができます。 インデックスが追加されると、それらのテーブルへのクエリは通常はるかに速くなります。
                       テーブル "oc_direct_edit"のインデックス "direct_edit_timestamp"が見つかりません。

# su -m www -c "php /usr/local/www/nextcloud/occ db:add-missing-indices"

Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.
Adding direct_edit_timestamp index to the oc_direct_edit table, this can take some time...
oc_direct_edit table updated successfully.

 PHPを7.3>7.4へ

pkg set -o lang/php73:lang/php74
pkg remove '*php73*'
cd /usr/ports/lang/php74 && make config
      ZTS にチェック
portinstall lang/php74 --batch
cd /usr/ports/lang/php74-extensions && make config
portinstall lang/php74-extensions --batch
portinstall devel/pecl-APCu --batch
portinstall /usr/ports/graphics/pecl-imagick --batch
cd /usr/ports/www/mod_php74 && make config
    ZTS にチェック
portinstall /usr/ports/www/mod_php74 --batch
   

Nextcloud 21.0.2 to Nextcloud 21.0.4

Web Update で、「Step 3 is currently in process. Please reload this page later」

/usr/local/www/nextcloud をバックアップする。

# tar cvfzp nextcloud_20210815.tar.gz nextcloud

コマンドラインで、修復操作する

# sudo -u www php occ maintenance:repair

{"reqId":"DxllvxhIlveX2Q9yZKTH","level":1,"time":"2021-08-15T00:52:59+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"21.0.2.1"}
- Repair MySQL collation
{"reqId":"DxllvxhIlveX2Q9yZKTH","level":1,"time":"2021-08-15T00:52:59+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::info: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"21.0.2.1"}
    - All tables already have the correct collation -> nothing to do
{"reqId":"DxllvxhIlveX2Q9yZKTH","level":1,"time":"2021-08-15T00:52:59+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"21.0.2.1"}
:   :    :
:   :    :
:   :    : 
{"reqId":"djJba9NV3q0oeXpeCv1Y","level":1,"time":"2021-08-15T01:01:40+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"21.0.2.1"}
- Add background job to check for backup codes
{"reqId":"djJba9NV3q0oeXpeCv1Y","level":1,"time":"2021-08-15T01:01:40+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"21.0.2.1"}
- Populating added database structures for workflows

Webからの操作が可能になっていれば、WebUpdateする。

途中でエラーでメンテナンスモードになってしまったら、

/usr/local/www/nextcloud/config/config.php の

'maintenance' => false,

として、再度

# sudo -u www php occ maintenance:repair

をすると、再度WebUpdate出来る様になるので、再Update すると、完了までrunした。

https://docs.nextcloud.com/server/19/admin_manual/maintenance/manual_upgrade.html


root@blackcube2:~ # /usr/bin/su -m www -c "php /usr/local/www/nextcloud/occ upgrade"
Cannot write into "config" directory!
This can usually be fixed by giving the webserver write access to the config directory.

But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
See https://docs.nextcloud.com/server/22/go.php?to=admin-config
root@blackcube2:~ # portupgrade -ar --batch && reboot
[Reading data from pkg(8) ... - 484 packages found - done]
--->  Upgrading 'nextcloud-php73-22.0.0' to 'nextcloud-php73-22.0.0_1' (www/nextcloud)
--->  Building '/usr/ports/www/nextcloud'
===>  Cleaning for nextcloud-php73-22.0.0_1
===>  Cleaning for nextcloud-php74-22.0.0_1
===>  Cleaning for nextcloud-php80-22.0.0_1
===>  License AGPLv3 accepted by the user
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by nextcloud-php73-22.0.0_1 for building
===>  Extracting for nextcloud-php73-22.0.0_1
=> SHA256 Checksum OK for nextcloud/nextcloud-22.0.0.tar.bz2.
===>  Patching for nextcloud-php73-22.0.0_1
===>  Applying FreeBSD patches for nextcloud-php73-22.0.0_1 from /usr/ports/www/nextcloud/files
===>   nextcloud-php73-22.0.0_1 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>  Configuring for nextcloud-php73-22.0.0_1
===>  Staging for nextcloud-php73-22.0.0_1
===>   nextcloud-php73-22.0.0_1 depends on package: php73-pecl-APCu>0 - found
===>   nextcloud-php73-22.0.0_1 depends on package: php73-pecl-imagick>=2.2.2 - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/include/php/main/php.h - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/bcmath.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/bz2.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/ctype.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/curl.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/dom.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/fileinfo.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/filter.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/gd.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/gmp.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/hash.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/iconv.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/json.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/mbstring.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/pcntl.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/pdo.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/posix.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/session.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/simplexml.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/xml.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/xmlreader.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/xmlwriter.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/xsl.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/zip.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/zlib.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/exif.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/intl.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/ldap.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/pdo_mysql.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/opcache.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/pcntl.so - found
===>   nextcloud-php73-22.0.0_1 depends on file: /usr/local/lib/php/20180731-zts/openssl.so - found
===>   Generating temporary packing list
install  -m 555 /usr/ports/www/nextcloud/work-php73/config.sample.php  /usr/ports/www/nextcloud/work-php73/stage/usr/local/www/nextcloud/config/config.sample.php
(cd /usr/ports/www/nextcloud/work-php73/nextcloud; /usr/bin/find . -type f) | /usr/bin/sort |  /usr/bin/sed -Ee '/^\.\/\.(htaccess\.dist|user\.ini)/d'  -e '/^\.\/config\/config\.sample\.php/d'  -e 's,^\.,www/nextcloud,' >> /usr/ports/www/nextcloud/work-php73/.PLIST.mktmp
/bin/cat /usr/ports/www/nextcloud/work-php73/plist.post >> /usr/ports/www/nextcloud/work-php73/.PLIST.mktmp
====> Compressing man pages (compress-man)
--->  Backing up the old version
--->  Uninstalling the old version
[Reading data from pkg(8) ... - 484 packages found - done]
--->  Deinstalling 'nextcloud-php73-22.0.0'
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        nextcloud-php73: 22.0.0

Number of packages to be removed: 1

The operation will free 403 MiB.
[1/1] Deinstalling nextcloud-php73-22.0.0...
[1/1] Deleting files for nextcloud-php73-22.0.0: 100%
You may need to manually remove /usr/local/www/nextcloud/config/config.php if it is no longer needed.
[Reading data from pkg(8) ... - 483 packages found - done]
--->  Installing the new version via the port
===>  Deinstalling for nextcloud-php73
===>   nextcloud-php73 not installed, skipping
===>  Installing for nextcloud-php73-22.0.0_1
===>  Checking if nextcloud-php73 is already installed
===>   Registering installation for nextcloud-php73-22.0.0_1
Installing nextcloud-php73-22.0.0_1...
/!\ The FreeBSD package REQUIRES the apps_paths configuration as    /!\
/!\ seen in config/config.sample.php to function                    /!\

Please note that everything has been installed in /usr/local/www/nextcloud.

You will probably want to add an alias to your httpd.conf file,
something like this:

        Alias /nextcloud /usr/local/www/nextcloud
        AcceptPathInfo On
        <Directory /usr/local/www/nextcloud>
            AllowOverride All
            Require all granted
        </Directory>

And restart Apache. Nextcloud will start the bundled installer on first
access. Once the bundled installer finishes, further configuration can
be done via 'Settings', 'Administration'. Additional configuration
options are available in

        /usr/local/www/nextcloud/config/config.php

You can find annotated configuration options in config.documented.php
in the same directory. Nextcloud's configuration documentation is at

        https://docs.nextcloud.com/server/stable/admin_manual/configuration_server

The caching options require additional Nextcloud configuration.

===>  Cleaning for nextcloud-php73-22.0.0_1
===>  Cleaning for nextcloud-php74-22.0.0_1
===>  Cleaning for nextcloud-php80-22.0.0_1
--->  Cleaning out obsolete shared libraries

/usr/bin/su -m www -c "php /usr/local/www/nextcloud/occ upgrade"

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Updated database
Checking for update of app accessibility in appstore
Checked for update of app "accessibility" in App Store
Checking for update of app activity in appstore
Checked for update of app "activity" in App Store
Checking for update of app bruteforcesettings in appstore
Checked for update of app "bruteforcesettings" in App Store
Checking for update of app calendar in appstore
Checked for update of app "calendar" in App Store
Checking for update of app circles in appstore
Checked for update of app "circles" in App Store
Checking for update of app cloud_federation_api in appstore
Checked for update of app "cloud_federation_api" in App Store
Checking for update of app comments in appstore
Checked for update of app "comments" in App Store
Checking for update of app contacts in appstore
Checked for update of app "contacts" in App Store
Checking for update of app contactsinteraction in appstore
Checked for update of app "contactsinteraction" in App Store
Checking for update of app dashboard in appstore
Checked for update of app "dashboard" in App Store
Checking for update of app dav in appstore
Checked for update of app "dav" in App Store
Checking for update of app federatedfilesharing in appstore
Checked for update of app "federatedfilesharing" in App Store
Checking for update of app federation in appstore
Checked for update of app "federation" in App Store
Checking for update of app files in appstore
Checked for update of app "files" in App Store
Checking for update of app files_pdfviewer in appstore
Checked for update of app "files_pdfviewer" in App Store
Checking for update of app files_rightclick in appstore
Checked for update of app "files_rightclick" in App Store
Checking for update of app files_sharing in appstore
Checked for update of app "files_sharing" in App Store
Checking for update of app files_trashbin in appstore
Checked for update of app "files_trashbin" in App Store
Checking for update of app files_versions in appstore
Checked for update of app "files_versions" in App Store
Checking for update of app files_videoplayer in appstore
Checked for update of app "files_videoplayer" in App Store
Checking for update of app firstrunwizard in appstore
Checked for update of app "firstrunwizard" in App Store
Checking for update of app logreader in appstore
Checked for update of app "logreader" in App Store
Checking for update of app lookup_server_connector in appstore
Checked for update of app "lookup_server_connector" in App Store
Checking for update of app mail in appstore
Checked for update of app "mail" in App Store
Checking for update of app nextcloud_announcements in appstore
Checked for update of app "nextcloud_announcements" in App Store
Checking for update of app notifications in appstore
Checked for update of app "notifications" in App Store
Checking for update of app oauth2 in appstore
Checked for update of app "oauth2" in App Store
Checking for update of app password_policy in appstore
Checked for update of app "password_policy" in App Store
Checking for update of app photos in appstore
Checked for update of app "photos" in App Store
Checking for update of app privacy in appstore
Checked for update of app "privacy" in App Store
Checking for update of app provisioning_api in appstore
Checked for update of app "provisioning_api" in App Store
Checking for update of app recommendations in appstore
Checked for update of app "recommendations" in App Store
Checking for update of app richdocuments in appstore
Checked for update of app "richdocuments" in App Store
Checking for update of app serverinfo in appstore
Checked for update of app "serverinfo" in App Store
Checking for update of app settings in appstore
Checked for update of app "settings" in App Store
Checking for update of app sharebymail in appstore
Checked for update of app "sharebymail" in App Store
Checking for update of app spreed in appstore
Checked for update of app "spreed" in App Store
Checking for update of app support in appstore
Checked for update of app "support" in App Store
Checking for update of app survey_client in appstore
Checked for update of app "survey_client" in App Store
Checking for update of app systemtags in appstore
Checked for update of app "systemtags" in App Store
Checking for update of app text in appstore
Checked for update of app "text" in App Store
Checking for update of app theming in appstore
Checked for update of app "theming" in App Store
Checking for update of app twofactor_backupcodes in appstore
Checked for update of app "twofactor_backupcodes" in App Store
Checking for update of app updatenotification in appstore
Checked for update of app "updatenotification" in App Store
Checking for update of app user_status in appstore
Checked for update of app "user_status" in App Store
Checking for update of app viewer in appstore
Checked for update of app "viewer" in App Store
Checking for update of app weather_status in appstore
Checked for update of app "weather_status" in App Store
Checking for update of app workflowengine in appstore
Checked for update of app "workflowengine" in App Store
Starting code integrity check...
Finished code integrity check
Update successful
Maintenance mode is kept active
Resetting log level

Nextcloud ver 21.0.2.1

/usr/bin/su -m www -c "php /usr/local/www/nextcloud/occ upgrade"

すると、コンソールに、

{   :"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead."
,"userAgent":"--","version":"21.0.2.1"}
{"reqId":"xxxxxxxx","level":0,"time":"2021-06-28T06:47:30+00:00","remoteAddr":"","user":"--","app":"files_sharing","method":".","userAgent":"--","version":"21.0.2.1"}
Nextcloud is already latest version

とでるのは、

/usr/local/www/nextcloud/config/config.php

'loglevel' => 1, 

が、

'loglevel' => 0,

と変更されたためのよう。"1"へ戻すと、エラーメッセージは抑制される。

Nextcloud 20.0.5.2

/usr/bin/su -m www -c "php /usr/local/www/nextcloud/occ upgrade"

{"reqId":"********************","level":1,"time":"2021-01-19T23:07:23+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for local cache","userAgent":"--","version":"20.0.5.2"}
{"reqId":"********************","level":1,"time":"2021-01-19T23:07:23+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for distributed cache","userAgent":"--","version":"20.0.5.2"}
{"reqId":"********************","level":0,"time":"2021-01-19T23:07:24+00:00","remoteAddr":"","user":"--","app":"files_sharing","method":"","url":"--","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"--","version":"20.0.5.2"}
Nextcloud is already latest version
{"reqId":"********************","level":3,"time":"2021-01-19T23:07:24+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"chmod(): Operation not permitted at /usr/local/www/nextcloud/lib/private/Log/File.php#87","userAgent":"--","version":"20.0.5.2"}

Nextcloud 20.0.5.2にUPしたところ、このwarningが出るようになった。抑制するには、

/usr/local/www/nextcloud/config/config.php

  'loglevel' => 2,

で消えるがいいのか?

Nextcloud 19.0.3

•データベースにいくつかのインデックスがありません。 大きなテーブルにインデックスを追加すると、自動的に追加されないまでに時間がかかる可能性があるためです。 "occ db:add-missing-indices"を実行することによって、インスタンスが実行し続けている間にそれらの欠けているインデックスを手動で追加することができます。

root@g7:~:20_09_11:14:30 # cd /usr/local/www/nextcloud
root@g7:/usr/local/www/nextcloud:20_09_11:14:32 # su -m www -c "php /usr/local/www/nextcloud/occ db:add-missing-columns"
Check columns of the comments table.
Adding additional reference_id column to the comments table, this can take some time...
Comments table updated successfully.
root@g7:/usr/local/www/nextcloud:20_09_11:14:32 #

https://matoken.org/blog/2020/06/05/upgrade-from-nextcloud-18-to-19-with-beta-channel/

テーブル “oc_properties”のインデックス “properties_path_index”が見つかりません。

phpmyadmin で、properties_path_index ちうindex を「新規作成」した

Step 4 is currently in process. Please reload this page later.

https://nc.suzunet.info/blogs/blog_entries/view/5/c694d127b8f7018e7f68c35a5ca6fa0e

root@sun1:~:20_09_12:8:12 # cd /usr/local/www/nextcloud
root@sun1:/usr/local/www/nextcloud:20_09_12:8:12 # sudo -u www php occ maintenance:repair
- Repair MySQL collation
    - All tables already have the correct collation -> nothing to do
- Repair mime types
- Clean tags and favorites
    - 0 tags of deleted users have been removed.
    - 0 tags for delete files have been removed.
    - 0 tag entries for deleted tags have been removed.
    - 0 tags with no entries have been removed.
- Repair invalid shares
- Move .step file of updater to backup location
    - .step file exists
    - .step-previous-update removed
    - .step file moved to .step-previous-update
- Fix potential broken mount points
    - No mounts updated
- Add log rotate job
- Clear frontend caches
    - Image cache cleared
    - SCSS cache cleared
    - JS cache cleared
- Clear every generated avatar on major updates
- Add preview background cleanup job
- Queue a one-time job to cleanup old backups of the updater
- Cleanup invalid photocache files for carddav
- Add background job to cleanup login flow v2 tokens
- Remove potentially over exposing share links
    - No need to remove link shares.
- Clear access cache of projects
- Switches from deprecated "production" to "stable" update channel
- Sets the enterprise logo
    - Repair step already executed
- Reset generated avatar flag
- Fix component of birthday calendars
    - 1 birthday calendars updated.
- Regenerating birthday calendars to use new icons and fix old birthday events without year
    - Repair step already executed
- Fix broken values of calendar objects
   0 [>---------------------------]
- Registering building of calendar search index as background job
    - Repair step already executed
- Registering background jobs to update cache for webcal calendars
    - Added 0 background jobs to update webcal calendars
- Registering building of calendar reminder index as background job
    - Repair step already executed
- Clean up orphan event and contact data
    - 0 events without a calendar have been cleaned up
    - 0 properties without an events have been cleaned up
    - 0 changes without a calendar have been cleaned up
    - 0 cached events without a calendar subscription have been cleaned up
    - 0 changes without a calendar subscription have been cleaned up
    - 0 contacts without an addressbook have been cleaned up
    - 0 properties without a contact have been cleaned up
    - 0 changes without an addressbook have been cleaned up
- Remove activity entries of private events
    - Removed 0 activity entries
- Fix the share type of guest shares when migrating from ownCloud
- Copy the share password into the dedicated column
- Set existing shares as accepted
- Update OAuth token expiration times
- Switches from default updater server to the customer one if a valid subscription is available
    - Repair step already executed
- Add background job to check for backup codes
- Populating added database structures for workflows

 PHPを7.2>7.3へ

https://piano2nd.smb.net/PukiWiki/index.php?PHP%205.6%20%E3%81%8B%E3%82%89%20PHP%207%20%E3%81%B8%E3%82%A2%E3%83%83%E3%83%97%E3%82%B0%E3%83%AC%E3%83%BC%E3%83%89

pkg set -o lang/php72:lang/php73
pkg remove '*php72*'
cd /usr/ports/lang/php73 && make config
      ZTS にチェック
portinstall lang/php73 --batch
cd /usr/ports/lang/php73-extensions && make config
portinstall lang/php73-extensions --batch
portinstall devel/pecl-APCu --batch
portinstall /usr/ports/graphics/pecl-imagick --batch
cd /usr/ports/www/mod_php73 && make config
    ZTS にチェック
portinstall /usr/ports/www/mod_php73 --batch
   

Total access 2060:本日 1:昨日 5

Counter: 2060, today: 1, yesterday: 5

添付ファイル: fileNextcloud_Sus.PNG 60件 [詳細] fileNextcloud_OK.PNG 73件 [詳細]

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2024-03-29 (金) 13:46:09