Table of Contents
Installing NextCloud 19.0.0 on Linux Ubuntu 20.04 LTS with Apache2 Webserver
Open PhpMyAdmin and Create a Database:
database name: yourusername_nextcloud
Select the Database from the left panel
Create Username - yourusername - and Grant All Privileges for the username on the database.
db username: yourusername
db Password: $Pwd#4646116 (Something that meets complexity requirements)
Download the NextCloud Zip File to the Server
SSH to login to the server and obtain a command line prompt. Make a directory names downloads.
sudo mkdir /downloads/
Change directory to the downloads directory:
Download the nextcloud-19.0.0.zip file using the option to change the target filename to nextcloud.zip in the /downloads/ directory.
sudo wget -O nextcloud.zip https://download.nextcloud.com/server/releases/nextcloud-19.0.0.zip
Extract the Downloaded nextcloud.zip file to the root directory of the Website virtual directory
Example Extract Folder to the path of the root directory of the website:
Install Unzip utility
sudo apt install unzip
Unzip the nextcloud.zip file to the directory one step in the path before the root 'nextcloud' sub-directory of your website virtual directory, which will extract the files into the nextcloud sub-directory. So the target subdirectory should terminate at /exampledomain_com/ because /nextcloud/ will be the sub-directory where the nextcloud files will be extracted per the structure within the Zip file. Change 'exampledomain' to your secondary domain name where it appears in the unzip path below. You must adjust the path based on where you set up the virtual directory in your website.conf file in the /etc/apache2/sites-available/ directory, and ultimately, as the path of your website.conf file enabled in you /sites-enabled/ directory.
cd /downloads/ sudo unzip nextcloud.zip -d /var/www/exampledomain/public_html/exampledomain_com/
Make the Apache web-user the owner of the nextcloud directory so that the Apache server has access to the website root and all subdirectories.
sudo chown www-data:www-data /var/www/exampledomain/public_html/exampledomain_com/nextcloud/ -R