CREATE USER 'dev'@'localhost' IDENTIFIED BY 'dev';
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'dev'@'localhost';
FLUSH PRIVILEGES;
quit;
# Verify the SHA256 sum
wget https://download.nextcloud.com/server/releases/nextcloud-22.2.0.zip
wget https://download.nextcloud.com/server/releases/nextcloud-22.2.0.zip.sha256
sha256sum -c nextcloud-22.2.0.zip.sha256 < nextcloud-22.2.0.zip
# Verify the PGP signature
wget https://download.nextcloud.com/server/releases/nextcloud-22.2.0.zip.asc
wget https://nextcloud.com/nextcloud.asc
gpg --import nextcloud.asc
gpg --verify nextcloud-22.2.0.zip.asc nextcloud-22.2.0.zip
# Extract
sudo apt install unzip
unzip nextcloud-22.2.0.zip
# Copy to its final destination
sudo cp -r nextcloud /var/www
# Clean
rm -rf nextcloud*
Open file /etc/apache2/sites-available/nextcloud.conf
sudo vi /etc/apache2/sites-available/nextcloud.conf
Alias / "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/nextcloud/
ServerName YOUR.SERVER.COM
<Directory /var/www/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
</VirtualHost>
Open file
/etc/apache2/sites-available/nextcloud.conf
Continue with
Additional
Restart Apache