Install Nextcloud 11 on Debian Jessie

Install Nexcloud

# apt install php5-cli php5-json php5-curl php5-imap php5-gd php5-mysql php5-xmlrpc php-pclzip php5-intl php5-mcrypt php5-imagick libapache2-mod-php5 wget bzip2

php.ini recommendations:
memory_limit = 512Mupload_max_filesize = 200Mpost_max_size = 200M

Create database:
# mysql -u root -pmysql> create database nextclouddb;Query OK, 1 row affected (0.03 sec)mysql> GRANT ALL PRIVILEGES ON nextclouddb.* TO 'nextcloud_user'@'localhost' IDENTIFIED BY 'SUPER_SECRET_PASSWD';Query OK, 0 rows affected (0.03 sec)mysql> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.00 sec)mysql> exitBye

Download and verify checksum:
# wget wget md5sum -c  nextcloud-11.0.1.tar.bz2.md5nextcloud-11.0.1.tar.bz2: OK

Expand and move to Apache's document root.
# tar -xjf nextcloud-11.0.1.tar.bz2# mv nextcloud /var/www/

Change permissions:
# sudo chown -R www-data:www-data /var/www/nextcloud/

Create Apache site:
# vim /etc/apache2/sites-available/nextcloud.confAlias /nextcloud "/var/www/nextcloud/"<Directory /var/www/nextcloud/>  Options +FollowSymlinks  AllowOverride All <IfModule mod_dav.c>  Dav off </IfModule> <IfModule mod_headers.c>  Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload" </IfModule> SetEnv HOME /var/www/nextcloud SetEnv HTTP_HOME /var/www/nextcloud</Directory>

Enable Apache site, install modules and restart:
# a2ensite nextcloud# a2enmod rewrite headers env dir mime # service apache2 restart

Edit Apache's crontab:
# crontab -u www-data -e*/15  *  *  *  * php -f /var/www/nextcloud/cron.php

Change cron settings on:

Enable caching:
# apt install php5-apcu# vim /var/www/nextcloud/config/config.php

Add 'memcache.local' => '\OC\Memcache\APCu', at the end