Difference between revisions of "Nextcloud"

From wiki
(create sections)
Line 27: Line 27:
  
 
=== Configure PHP ===
 
=== Configure PHP ===
{{TODO|msg=}}
+
Edit file <code>[[PHP#Common_configuration|/etc/php5/mods-available/local-common.ini]]</code> and add <code>/var/www/owncloud/:/dev/:/var/log/owncloud/</code> to the <code>open_basedir</code> setting.
 +
 
 +
Reload PHP:
 +
<syntaxhighlight lang="console">
 +
$ sudo service php5-fpm reload
 +
</syntaxhighlight>
  
 
=== Configure Webserver ===
 
=== Configure Webserver ===

Revision as of 16:09, 15 January 2017

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