さくらインターネットのレンタルサーバーの Nextcloud 17.0.3 を 18.0.4 へアップデートする

この記事は公開されてから時間が経っています

Nextcloud が 18.0.4 へバージョンアップしたそうで、アップデートしてみました
それと、いくつか設定して、表示される警告を少なくしてみましたので、忘れないようにしておこう!

アップデータのエラー

新しいバージョンがあるようなので、詳細 からアップデートをかけました
すると、次の様に表示して更新ができません

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

暫くしてからリロードする様に!と言うコトなので何度か再表示してみましたが進捗はありませんでした
調べてみると、occ コマンドで、メンテナンス状態をクリアできるようなので実施してみました

TeraTerm でログインして メンテナンスリペアー を実行すると解消するようです

% cd www/nextcloud/
% php occ maintenance:repair
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
The current PHP memory limit is below the recommended value of 512MB.
- 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
- Cleanup cypress files from viewer app
- Switches from deprecated "production" to "stable" update channel
- Sets the enterprise logo
- Repair step already executed
- Update name of the stored view
- Fix component of birthday calendars
- 2 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
- Update OAuth token expiration times
- Add background job to check for backup codes

アップデートする前に、データベースのインデックスを再構成すると早くなると言うメッセージがありましたので、実施してみました

% php occ db:add-missing-indices
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
The current PHP memory limit is below the recommended value of 512MB.
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.
Adding calendarobject_calid_index index to the calendarobjects_props table, this can take some time...
calendarobjects_props table updated successfully.
Check indices of the schedulingobjects table.
Adding schedulobj_principuri_index index to the schedulingobjects table, this can take some time...
schedulingobjects table updated successfully.
%

このあと、通常通り、アップデーターからアップデートを実施しました
17.0.3 から 18.0.4 へのアップデートは問題なく実施できました

アップデート後に、もう一度、インデックスの更新を進めてきますので、同じコマンドで再度実行します

警告メッセージへの対処

php.ini

upload_max_filesize=512M
post_max_size=1024M
memory_limit=512M
default_charset=UTF-8
date.timezone = Asia/Tokyo
extension = imagick.so

こんな感じで Nextcloud のディレクトリーに置いておく

.htaccess

Header set Strict-Transport-Security "max-age=31536000;"
こんな行を一行追加
それと、www の .htaccess にこんなのを追加

RewriteEngine On
RewriteBase /
RewriteRule ^\.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]
RewriteRule ^\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json [QSA,L]
RewriteRule ^\.well-known/webfinger /nextcloud/public.php?service=webfinger [QSA,L]
RewriteRule ^\.well-known/carddav /nextcloud/remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /nextcloud/remote.php/dav/ [R=301,L]


いまだかつて、こんなにスッキリしたメッセージになったことはあっただろうか
…ownCloud の頃から無かった気がする…

ホーム画面もきっちり表示されるし、スマホのアプリも良い調子で動くようになった気がする…

最後に残った memchache は、さくらさんのナレッジでも設定できないって書いてあるのであきらめるとします
https://knowledge.sakura.ad.jp/20648/

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です


The reCAPTCHA verification period has expired. Please reload the page.