apt install php7.4 libapache2-mod-php7.4 php7.4-cli
apt install php7.4-curl php7.4-xml php-gd php7.4-json php-mbstring php-zip php-pgsql php-bz2 php-intl php7.4-bcmath php-fpm php-imagick php-gmp php-apcu
/dev/vdb1 /opt/nextcloud xfs defaults 0 0
create database nextcloud;
alter user nextcloud password 'xxx';
vi /etc/apache2/sites-available/nextcloud.conf
Alias /nextcloud "/opt/nextcloud/www"
<Directory /opt/nextcloud/www>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
chown -R www-data:www-data /opt/nextcloud/www
a2enmod ssl
a2ensite default-ssl
service apache2 reload
vi /etc/apache2/sites-enabled/000-default.conf
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
vi /etc/apache2/sites-enabled/default-ssl.conf
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
vi /etc/php/7.4/cli/php.ini
sudo -u www-data php occ maintenance:mode --on
mkdir /opt/nextcloud/pg_nextcloud
chown postgres:postgres pg_nextcloud
create tablespace ts_nextcloud location '/opt/nextcloud/ts_nextcloud';
alter database nextcloud set tablespace ts_nextcloud;
vi /opt/nextcloud/www/lib/private/Installer.php
timeout -> 500 instead of 120
(&(|(objectclass=person))(|(|(memberof=CN=Nextcloud Users,CN=Users,DC=example,DC=com)(primaryGroupID=1111))))
(&(&(|(objectclass=person)))(samaccountname=%uid))