With the database configured, now it’s time to download Nexcloud. First, navigate to the temporary folder
cd /tmp
Download Nextcloud zip file using the command
wget https://download.nextcloud.com/server/releases/nextcloud-20.0.7.zip
Next, unzip(apt-get install unzip) the compressed file using the command
unzip nextcloud-20.0.7.zip
Next, move the unzipped folder to the webroot directory as shown
mv nextcloud /var/www/html/
Navigate to the document root folder and change the file ownership to www-data
.
cd /var/www/html
chown -R www-data:www-data nextcloud
Also, change the file permissions as shown
chmod -R 755 nextcloud
Restart web server
systemctl restart apache2.service