Instalando os pacotes necessários:
apt install mysql-server apache2 apt-transport-https -y libapache2-mod-php php7.2 php7.2-xml php7.2-curl php7.2-gd php7.2 php7.2-cgi php7.2-cli php7.2-zip php7.2-mysql php7.2-mbstring php7.2-ldap wget unzip -yConfigurando o MySQL:
mysql -u root -pConfigurando o php.ini
CREATE DATABASE nextclouddb;
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'SUA_SENHA_AQUI';
GRANT ALL PRIVILEGES ON nextclouddb.* TO 'nextcloud'@'localhost';
FLUSH PRIVILEGES;
exit;
vim /etc/php/7.2/apache2/php.iniConfigurando o VirtualHost:
memory_limit = 2048M
upload_max_filesize = 1024M
max_execution_time = 360
post_max_size = 200M
date.timezone = America/Sao_Paulo
<VirtualHost *:80>Demais ajustes do Apache:
ServerAdmin seuemail@seudominio.com.br
DocumentRoot /var/www/nextcloud
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/nextcloud/">
Options MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
chown www-data:www-data /var/www/nextcloud -RDownload do Nextcloud
chmod 750 /var/www/nextcloud -R
mkdir -p /var/nextcloud/data
chown www-data:www-data /var/nextcloud/data
chmod 750 /var/nextcloud/data
cd /var/www/nextcloudApós descompactar o arquivo abra no navegador na URL http://<seuip>/setup-nextcloud.php
wget https://download.nextcloud.com/server/installer/setup-nextcloud.php
chown www-data:www-data setup-nextcloud.php