Nextcloud

From wiki

Prerequisite

Install

Add Repository

In order to get an up-to-date ownCloud, it is preferable to install it from the upstream repositories.

Use the following command to install the repository and its key, plus to configure pinning to use it as the default source

$ curl -s https://download.owncloud.org/download/repositories/stable/Debian_8.0/Release.key | sudo apt-key add -
OK
$ echo "deb http://download.owncloud.org/download/repositories/stable/Debian_8.0/ /" | sudo tee /etc/apt/sources.list.d/owncloud.list > /dev/null
$ sudo tee "/etc/apt/preferences.d/owncloud" > /dev/null << EOF
> Package: owncloud
> Pin: origin "download.owncloud.org"
> Pin-Priority: 995
> EOF
$ sudo apt update

Install

$ sudo apt install owncloud

Configure PHP

Edit file /etc/php5/mods-available/local-common.ini and add /var/www/owncloud/:/dev/:/var/log/owncloud/ to the open_basedir setting.

Reload PHP:

$ sudo service php5-fpm reload

Configure Webserver

TODO

Configure DB

TODO

Configure Owncloud

//config.php

$ sudo tee "/usr/local/bin/occ" > /dev/null << EOF
> !/bin/sh
> sudo -u www-data /usr/bin/php /var/www/owncloud/occ "\$@"
> EOF
$ sudo chmod +x /usr/local/bin/occ

//cron