Cloud関連
Next cloud
install
php8.4の場合
sudo apt install php8.4 php8.4-curl php8.4-cli php8.4-mysql php8.4-gd php8.4-common php8.4-xml php-json php8.4-intl php-pear php8.4-imagick php8.4-dev php8.4-mbstring php8.4-zip php8.4-soap php8.4-bz2 php8.4-bcmath php8.4-gmp php8.4-apcu libmagickcore-dev
または
sudo apt install php8.4-{cli,fpm,mysql,zip,xml,gd,curl,mbstring,intl,bcmath,gmp,imagick}
/etc/php/8.4/apache2/php.ini 設定変更 アップロード64GB
memory_limit = -1
upload_max_filesize = 64G
post_max_size = 64G
max_execution_time = 300
Apache2の設定
リバースプロキシで設定したサンプル、Debian 12 BookwormでCloudflareのTunnel機能で設定した場合
<VirtualHost *:49xxx>
DocumentRoot /home/www/html/tunnels/nextcloud
ServerName drive.xxxxx.com
ServerAdmin xxx@xxxx
ErrorLog /var/log/apache2/debian1/tunnels/drive-xxxx.error.log
CustomLog /var/log/apache2/debian1/tunnels/drive--xxxx.access.log combined
ProxyRequests Off
<Directory /home/www/html/tunnels/nextcloud>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ProxyPass /html http://localhost:49xxx/
ProxyPassReverse /html http://localhost:49xxx/
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
</VirtualHost>
MariaDB
参考にしたサイト:https://docs.nextcloud.com/server/latest/admin_manual/installation/examp...
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost';
FLUSH PRIVILEGES;
アップデート作業
Google gemini3 AIモードで生成しました。
データベースとnextcloudのディレクトリをバックアップする
Enable CLI APCu: For the updater to run efficiently, ensure APCu is enabled for the CLI by adding "apc.enable_cli=1" to "/etc/php/8.4/mods-available/apcu.ini."
cd ....../nextcloud/updater/
sudo -u www-data php8.4 --define apc.enable_cli=1 updater.phar
Follow Prompts: The script will verify permissions, download the update, and ask if you want to run occ upgrade. Choose Yes.
リペア・最適化
sudo -u www-data php8.4 ....../nextcloud/occ maintenance:repair sudo -u www-data php8.4 ....../nextcloud/occ db:add-missing-indices
メインテナンスモード解除
sudo -u www-data php8.4 ...../nextcloud/occ maintenance:mode --off
再起動
sudo systemctl restart php8.4-fpm apache2




