Как обновить nextcloud ubuntu

Обновлено: 06.07.2024

Кажется, что нет никакого предварительно упакованного двоичного клиента, официально доступного для GNU/Linux (только источники). Существует ли неофициальный .snap, .deb.AppImage? Я в настоящее время застреваю на ownCloud клиенте в то время как.

Клиент Nextcloud жалуется на отсутствие брелка при запуске

У меня есть новая установка Ubuntu 18.04. Каждый раз, когда я включаю компьютер, клиент nextcloud жалуется, что он не знает, как подключиться к моему серверу, потому что он говорит, что нет брелка. .

Ubuntu 16.04 Ошибка Snapd: Загрузите snap & ldquo; ubuntu-core & rdquo; от канала & ldquo; стабильный & rdquo;

Я пытаюсь использовать snap для установки nextcloud, но когда я вхожу в команду: sudo snap install hello или sudo snap install nextcloud Я получаю следующую ошибку: error: не может выполнить следующее .

Есть ли предварительно скомпилированный клиент Nextcloud Ubuntu?

Кажется, что нет готового бинарного клиента, официально доступного для GNU / Linux (только для источников). Есть ли неофициальный .snap, .deb, .AppImage? Я сейчас застрял в клиенте ownCloud, пока .

как обновить клиент nextcloud на ubuntu Ubuntu 20.04.1 LTS

Недавно я обновился с ubuntu 16 LTS с 18 до 20. Прекрасно работает. Моя версия Ubuntu 20.04.1 LTS Теперь мой клиент nextcloud сообщает мне, что ему нужно обновление, с помощью всплывающего окна. Когда я слежу за всплывающим окном .

Новая установка NextCloud требует изменения, но я не уверен, куда выполнить эту строку кода

Как можно визуально сравнить две большие директории?

У меня был огромный каталог всевозможных вещей от семейных фотографий до репозиториев git и программ с тысячами видимых и скрытых файлов, которые синхронизировались на

10 компьютерах. Я был вынужден .

Служба apache2 не может запускаться

Apache2 не может перезагрузиться, потому что процесс управления вышел из кода ошибки. & lt; VirtualHost *: 80 & gt; serveradmin Rabie @ Laassal docummenRoot "/ var / www / html / nextcloud /" serverName 192.168.159 .

Я разрушил свой сервер: лучший способ двигаться вперед?

Как я уже сказал, мой сервер разбит. Не совсем, просто частично. У меня есть безголовый сервер, на котором работает Ubuntu 16.04, и вы можете получить его через SSH (и FTP через порт ssh). На нем у меня есть модифицированный сервер minecraft .

Ubuntu 16.04 Snapd: загрузите оснастку & ldquo; ubuntu-core & rdquo; с канала & ldquo; стабильный & rdquo;

Я пытаюсь использовать snap для установки nextcloud, но когда я ввожу команду: sudo snap install hello или sudo snap install nextcloud, я получаю следующую ошибку: error: не могу выполнить следующее .

Always start by making a fresh backup and disabling all 3rd party apps.

Back up your existing Nextcloud Server database, data directory, and config.php file. (See Backup , for restore information see Restoring backup )

To unpack your new tarball, run: unzip nextcloud-[version].zip or tar -xjf nextcloud-[version].tar.bz2

Stop your Web server.

In case you are running a cron-job for nextcloud’s house-keeping disable it by commenting the entry in the crontab file

crontab -u www-data -e

Rename your current Nextcloud directory, for example nextcloud-old .

Unpacking the new archive creates a new nextcloud directory populated with your new server files. Move this directory and its contents to the original location of your old server. For example /var/www/ , so that once again you have /var/www/nextcloud .

Copy the config/config.php file from your old Nextcloud directory to your new Nextcloud directory.

If you keep your data/ directory in your nextcloud/ directory, copy it from your old version of Nextcloud to your new nextcloud/ . If you keep it outside of nextcloud/ then you don’t have to do anything with it, because its location is configured in your original config.php , and none of the upgrade steps touch it.

If you are using 3rd party application, it may not always be available in your upgraded/new Nextcloud instance. To check this, compare a list of the apps in the new nextcloud/apps/ folder to a list of the of the apps in your backed-up/old nextcloud/apps/ folder. If you find 3rd party apps in the old folder that needs to be in the new/upgraded instance, simply copy them over and ensure the permissions are set up as shown below.

If you are using 3rd party theme make sure to copy it from your themes/ directory to your new one. It is possible you will have to make some modifications to it after the upgrade.

Adjust file ownership and permissions:

Restart your Web server.

Now launch the upgrade from the command line using occ , like this example on Ubuntu Linux:

(!) this MUST be executed from within your nextcloud installation directory

The upgrade operation takes a few minutes to a few hours, depending on the size of your installation. When it is finished you will see a success message, or an error message that will tell where it went wrong.

Reenable the nextcloud cron-job. (See step 4 above.)

crontab -u www-data -e

Login and take a look at the bottom of your Admin page to verify the version number. Check your other settings to make sure they’re correct. Go to the Apps page and review the core apps to make sure the right ones are enabled. Re-enable your third-party apps.

Previous Nextcloud releases

You’ll find previous Nextcloud releases in the Nextcloud Server Changelog.

Troubleshooting

Occasionally, files do not show up after a upgrade. A rescan of the files can help:

Sometimes, Nextcloud can get stuck in a upgrade if the web based upgrade process is used. This is usually due to the process taking too long and encountering a PHP time-out. Stop the upgrade process this way:

The built-in updater automates many of the steps of upgrading a Nextcloud installation. It is useful for installations that do not have root access, such as shared hosting, for installations with a smaller number of users and data, and it automates updating manual installations .

Downgrading is not supported and risks corrupting your data! If you want to revert to an older Nextcloud version, install it from scratch and then restore your data from backup. Before doing this, file a support ticket if you have paid support or ask for help in the Nextcloud forums to see if your issue can be resolved without downgrading.

You should maintain regular backups (see Backup ), and make a backup before every update. The built-in updater does not backup your database or data directory.

What does the updater do?

The updater itself only replaces the existing files with the ones from the version it updates to. The migration steps needs to be executed afterwards. The command line mode provides a way to do this right after the code was successfully replaced.

The built-in updater performs these operations:

Check for expected files: checks if only the expected files of a Nextcloud installation are present, because it turned out that some files that were left in the Nextcloud directory caused side effects that risked the update procedure.

Check for write permissions: checks if all files that need to be writable during the update procedure are actually writable.

Enable maintenance mode: enables the maintenance mode so that no other actions are executed while running the update of the code.

Create backup: creates a backup of the existing code base in /updater-INSTANCEID/backups/nextcloud-CURRENTVERSION/ inside of the data directory (this does not contain the /data directory nor the database).

Downloading: downloads the code in the version it should update to. This is also shown in the web UI before the update is started. This archive is downloaded to /updater-INSTANCEID/downloads/ .

Extracting: extracts the archive to the same folder.

Replace entry points: replaces all Nextcloud entry points with dummy files so that when those files are replaced all clients still get the proper maintenance mode response. Examples for those endpoints are index.php , remote.php or ocs/v1.php .

Delete old files: deletes all files except the above mentioned entry points, the data and config dir as well as non-shipped apps and themes. (And the updater itself of course)

Move new files in place: moves the files from the extracted archive in place.

Keep maintenance mode active?: asks you if the maintenance mode should be kept active. This allows the admin to use the web based updater but run the actual migration steps ( occ upgrade ) on the command line. If the maintenance mode is kept active command line access is required. To use the web based upgrade page disable the maintenance mode and click the link to get to the upgrade page. (This step is only available in the web based updater.)

Done the update of the code is done and you either need to go to the linked page or to the command line to finish the upgrade by executing the migration steps.

Using the web based updater

Using the built-in updater to update your Nextcloud installation is just a few steps:

You should see a notification at the top of any Nextcloud page when there is a new update available. Go to the admin settings page and scroll to the section “Version”. This section has a button to open the updater. This section as well as the update notification is only available if the update notication app is enabled in the apps management.

Click the button “Open updater”.

Verify the information that is shown and click the button “Start update” to start the update.

In case an error happens or the check failed the updater stops processing and gives feedback. You can now try to solve the problem and click the “Retry update” button. This will continue the update and re-run the failed step. It will not re-run the previous succeeded steps.

In case you close the updater, before it finished you can just open the updater page again and proceed at the last succeeded step. Closing the web page will still execute the running step but will not continue with the next one, because this is triggered by the open updater page.

Once all steps are executed the updater will ask you a final question: “Keep maintenance mode active?”. This allows you to use either the web based upgrade page or the command line based upgrade procedure ( occ upgrade ). Command line access is required if the maintenance mode is kept active.

Done. You now can continue either to the web based upgrade page or run occ upgrade . The two examples “Web based upgrade” and “Command line based upgrade” shows how the screens then look like.

Web based upgrade

This is how the web based update would continue:

../_images/updater-7-disable-maintenance.jpg
../_images/updater-9-upgrade-page.jpg

Command line based upgrade

This is how the command line based update would continue:

Using the command line based updater

The command line based updater works in the exact same way the web based updater works. The steps and checks are the very same.

APCu is disabled by default on CLI which could cause issues with nextcloud’s command line based updater. Please make sure you set the apc.enable_cli to 1 on your php.ini config file or append --define apc.enable_cli=1 to the command line based updater call (like sudo -u www-data php --define apc.enable_cli=1 /var/www/nextcloud/updater/updater.phar ).

The steps are basically the same as for the web based updater:

You should see a notification at the top of any Nextcloud page when there is a new update available. Go to the admin settings page and scroll to the section “Version”. This section has a button to open the updater. This section as well as the update notification is only available if the update notication app is enabled in the apps management.

Instead of clicking that button you can now invoke the command line based updater by going into the updater/ directory in the Nextcloud directory and executing the updater.phar as the web server user. (i.e. sudo -u www-data php /var/www/nextcloud/updater/updater.phar )

Verify the information that is shown and enter “Y” to start the update.

In case an error happens or the check failed the updater stops processing and gives feedback. You can now try to solve the problem and re-run the updater command. This will continue the update and re-run the failed step. It will not re-run the previous succeeded steps.

Once all steps are executed the updater will ask you a final question: “Should the “occ upgrade” command be executed?”. This allows you to directly execute the command line based upgrade procedure ( occ upgrade ). If you select “No” then it will finish with Please now execute “./occ upgrade” to finish the upgrade. .

Once the occ upgrade is done you get asked if the maintenance mode should be kept active.

Batch mode for command line based updater

It is possible to run the command line based updater in a non-interactive mode. The updater then doesn’t ask any interactive questions. It is assumed that if an update is available it should be installed and the occ upgrade command is executed as well. After finishing the maintenance mode will be turned off except an error occured during the occ upgrade or the replacement of the code.

Но, если вам хочется большей производительности, а также не хочется видеть предупреждение о текущей конфигурации, которое будет видно каждый раз при заходе в административную панель, то следующие советы для вас.

После внесения изменений не забываем перезапускать php-fpm. Или можете после применения всех изменений перезапустить его один раз.

Содержание:

Убираем первое предупреждение:

Ищем такие строки:

И раскомментируем их.

Или, если побыстрее

Не забываем перезапустить php-fpm

Готово. Идём дальше.

Убираем второе предупреждение

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
opcache.revalidate_freq=1

Убираем третье предупреждение

Некоторые индексы базы данных не были преобразованы в тип big int


Так как преобразование таких индексов может занять продолжительное время, оно должно быть запущенно вручную. Чтобы выполнить преобразование, необходимо включить режим обслуживания и запустить в терминале команду «occ db:convert-filecache-bigint». Дополнительные сведения приведены на соответствующей странице документации.filecache.mtime
filecache.storage_mtime

Для того, чтобы не потерять данные, или чтобы не было ошибок на клиентах, или просто для спокойствия нервной системы введите Nextcloud в режим обслуживания.

В браузере вы можете увидеть, что система находится в режиме обслуживания. Теперь в консоли выполните следующее:

Затем выключите режим обслуживания.

Убираем предупреждение о php

Разрешённое максимальное значение использования памяти PHP ниже рекомендуемого значения в 512 МБ.

Ищем memory_limit и вводим, например, 512M вместо 128M. И перезапускаем php-fpm

или если хотим побыстрее

Убираем предупреждение о кешировании.

Не настроена система кеширования

Для увеличения производительности сервера, по возможности, настройте memcache. Более подробная информация доступна в документации

Поэтому прикручиваем систему кэширования, состоящую из локальной системы кэширования на основе APCu и системы распределённого кеширования Redis.

Ставим APCu

В файле php.ini включаем apcu

вставив в начало

Сохраняем файл и перезапускаем php-fpm.

Редактируем файл config/config.php в директории установки Nextсloud

Ставим Redis.

Проверяем, что он запустился

В тот же файл config/config.php

Сохраняем файл. Перезапускаем php-fpm, если вы это ещё не сделали и наслаждаемся ускоренной работе Nextcloud.

Убираем ошибку отсутствия индексов

В базе данных отсутствуют некоторые индексы.

Так как создание таких индексов может занять достаточно продолжительное время, оно должно быть запущено вручную. Для создания индексов необходимо запустить команду «occ db:add-missing-indices» во время работы сервера Nextcloud. При созданных индексах, как правило, запросы к базе данных выполняются значительно быстрее.

При успешном индексировании будет следующий текст:

Некоторые индексы базы данных не были преобразованы в тип big int.

Так как преобразование таких индексов может занять продолжительное время, оно должно быть запущенно вручную. Чтобы выполнить преобразование, необходимо включить режим обслуживания и запустить в терминале команду «occ db:convert-filecache-bigint». Дополнительные сведения приведены на соответствующей странице документации.

Вводим сервер в режим обслуживания и выполняем преобразование

И выводим из режима обслуживания

Убираем предупреждение о 4-х байтовых символах

MySQL используется в качестве базы данных, но не поддерживает 4-байтовые символы.

Чтобы иметь возможность обрабатывать 4-байтовые символы (например, смайлики) без проблем в именах файлов или комментариях, рекомендуется включить 4-байтовую поддержку в MySQL. Для получения более подробной информации обратитесь к документации.

Так как первоначально Nextcloud я ставил на базе MariaDB, то по ссылке выше для возможности обработки ошибки я не заметил продолжение про MariaDB, а сразу стал применять шаги для MySQL. Не надо так. Поэтому распишу по шагам, что и как надо делать.

P.S. Убедитесь, что MariaDB версии выше 10.2. У меня была версия 15.1

Убедитесь, что на вашем сервере MySQL установлены следующие параметры InnoDB в файле:

и если их нет, то вставьте в конец файла.

Перезапустите сервер MariaDB

Выясните был ли изменён формат файла на Barracuda

Таблицы должны быть перенесены в “barracuda” вручную, одна за другой. Однако команды SQL можно легко создавать:

После всего проделанного формат файла должен поменяться на Barracuda. Проверим.

Инструкции для MySQL

Вводим в режим обслуживания.

Должен быть такой результат

Отключаем режим обслуживания.

Режим шифрования

Задействован устаревший режим шифрования файлов на стороне сервера.

Рекомендуется отключить такое шифрование. Более подробные сведения содержатся в документации.

Как я понял, устаревший режим шифрования был введён в ранних версиях Nextcloud и впоследствии заменён на новый. Однако в хранилище могли остаться файлы со старым (legacy) типом шифрования.

В документации сказано, что найти эти файлы можно командой

или более полный вариант

Такие файлы я просто заменил копиями тех, у кого есть нужные заголовки. Так как таких файлов у меня просто не было.

После этого в файле config.php можно отключить поддержку устаревшего формата шифрования, удалив строку

или, выставив значение false вместо true

С самими файлами в хранилище ничего не произойдёт, они так же будут зашифрованы как и раньше. В данном случае, мы просто отключили поддержку старого режима шифрования.

Настройка обратного прокси для доступа

В файле nextcloud/config/config.php

Для этого добавьте в файл конфигурации nginx на стороне nextcloud следующее содержимое в секцию server

Веб-сервер не настроен должным образом для разрешения «/.well-known/caldav». .

Дополнительная информация может быть найдена в нашей документации

В конфиге nextcloud в статье есть строки с настройкой доступа к этому пути. Для удобства повторю тут

Новый dashboard

Следующая опция для тех, кто обновился до 20 версии и при заходе на главную облака видит новый dashboard вместо знакомого списка файлов.

Исправляется просто добавлением в файл config.php следующей строки

Модуль php-imagick и SVG

Модуль php-imagick в этом случае не поддерживает SVG.

Для лучшей совместимости рекомендуется установить его

Регион размещения сервера

Не указан регион размещения этого сервера Nextcloud, что требуется для возможности проверки номеров телефонов без указания кода страны.

Чтобы разрешить пользователям сервера указывать номера телефонов без указания кода страны, добавьте параметр «default_phone_region» с соответствующим кодом страны в соответствии с ISO 3166-1↗.

Открывает файл config.php, расположенный в директории Nextcloud по пути config/config.php и внизу вставляем строку

Не знаю для чего вообще понадилось разработчикам из Nextcloud вставлять в код такое требование (а это требование, потому что иначе бы не было предупреждения на странице проверки конфигурации), но пока обновляться до 21 версии не стоит. Хотя, возможно, это из-за многочисленных требований регуляторов многих стран, в государственных учреждениях которых используется Nextcloud. Всё может быть. Со временем такое категоричное непринятие 21 версии у меня пропадёт. 🙂

Читайте также: