-
Notifications
You must be signed in to change notification settings - Fork 5
NEXTCLOUD
Info lxc:
-
Debian 10
-
Non Privilegiato
Features da attivare:
-
Nesting
Comandi installazione:
-
apt update -y && apt upgrade -y && reboot
-
dpkg-reconfigure tzdata
-
apt install -y mariadb-server apache2 php libapache2-mod-php php-xml php-cli php-cgi php-mysql php-mbstring php-gd php-curl php-zip php-intl php-bcmath php-gmp php-apcu php-imagick imagemagick
-
systemctl start mariadb && systemctl enable mariadb
-
mysql -u root -p
Nessuna password, se volete renderlo più sicuro
-
mysql_secure_installation
Configurazione MariaDB:
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost';
FLUSH PRIVILEGES;
quit;
Comandi per scaricare nextcloud:
-
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
-
tar -xjvf latest.tar.bz2 -C /var/www
-
rm -f latest.tar.bz2
-
chown -R www-data:www-data /var/www/nextcloud
Configurazione Apache2
-
nano /etc/php/7.3/apache2/php.ini
memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 500M
max_execution_time = 300
-
nano /etc/apache2/sites-available/nextcloud.conf
<VirtualHost 127.0.0.1:8080> Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
ErrorLog /var/log/apache2/nextcloud-error_log
CustomLog /var/log/apache2/nextcloud-access_log common
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/nextcloud/ ServerName nextcloud.example.com
Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/nextcloud Alias /nextcloud "/var/www/nextcloud/"
<Directory "/var/www/nextcloud/"> Options +FollowSymlinks AllowOverride All
Dav offRequire all granted
SetEnv HOME /var/www/nextcloud SetEnv HTTP_HOME /var/www/nextcloud
ErrorLog
-
a2ensite nextcloud.conf
-
a2enmod rewrite headers env dir mime
-
a2dissite 000-default.conf
-
systemctl reload apache2 && systemctl restart apache2
-
systemctl enable apache2
Ottimizzazioni Nextcloud:
-
nano /var/www/nextcloud/config/config.php
'default_phone_region' => 'IT',
'memcache.local' => '\OC\Memcache\APCu',
collegarsi con http://ip-contenitore/nextcloud/
N.B potrebbero passare parecchi minuti prima che si possa accedere, stessa cosa anche dopo aver creato utenza admin nella configurazione