OwnCloud v8.0

From Proxmox VE
Jump to: navigation, search

Installing OwnCloud v8.0.3 in GenSQ Container

apt-get update
apt-get dist-upgrade
cd /var/www
wget https://download.owncloud.org/community/owncloud-8.0.3.tar.bz2
tar -xjvf owncloud-8.0.3.tar.bz2
mkdir owncloud/data
chown -R www-data:www-data owncloud

Upgrading to PHP v5.4

OwnCloud v8 onwards require a minimum version of PHP 5.4 but the default in Debian Squeeze is PHP 5.3.3. We use the binaries in the DOTDEB repo to upgrade PHP.

Enable the DOTDEB Repo

Append following to /etc/apt/sources.list:

deb     http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all
deb     http://packages.dotdeb.org squeeze-php54 all
deb-src http://packages.dotdeb.org squeeze-php54 all
apt-get install curl
curl http://www.dotdeb.org/dotdeb.gpg | apt-key add -
apt-get update
apt-get dist-upgrade

PHP 5.4 Quirks

  • PHP Upgrade References - 1, 2
  • During the PHP upgrade, some messages would appear regarding settings - we just choose the Maintainer's defaults as Yes.
  • Retain Package maintainer's versions of:
/etc/cron.d/php5
/etc/mysql/my.cnf
  • The following operational changes will then come into effect:

    You can use the following command to find whether there are any files
    on your system which would be affected by the strict PHP change (change <base>
    to the directory name where you store PHP files on your system):

    # find <base> -name '*.ph[pt].*' -o -name '*.php[345s].*' -o \
                  -name '*.phtml.*' -o -name '.ph[pt]' -o \
                  -name '.php[345s]' -o -name '.phtml'

  php5-fpm default www spool now listens on unix socket located
  in /var/run/php5-fpm.sock instead of localhost:9000.  If you
  have configured your webserver to use localhost:9000, you will
  have to change your settings.

Dependencies

The OwnCloud Admin manual requires the following dependencies installed with:

# rm /etc/php5/conf.d/suhosin.ini
# rm /etc/php5/conf.d/apc.ini
# Alternative PHP Cache
apt-get install php5-apc php5-intl php5-mcrypt php5-gmp php5-imagick

Locales

  • Locales supported by OwnCloud 8 are:
en_US.UTF-8
fr_FR.UTF-8
es_ES.UTF-8
de_DE.UTF-8
ru_RU.UTF-8
pt_BR.UTF-8
it_IT.UTF-8
ja_JP.UTF-8
zh_CN.UTF-8
  • Some locales not in the above like ta_IN UTF-8 (no period) are also supported partially.
  • Install the locales with:
sed -i -e 's/# ta_IN UTF-8/ta_IN UTF-8/' /etc/locale.gen
sed -i -e 's/# en_US\.UTF-8/en_US.UTF-8/' /etc/locale.gen
sed -i -e 's/# fr_FR\.UTF-8/fr_FR.UTF-8/' /etc/locale.gen
sed -i -e 's/# es_ES\.UTF-8/es_ES.UTF-8/' /etc/locale.gen
sed -i -e 's/# de_DE\.UTF-8/de_DE.UTF-8/' /etc/locale.gen
dpkg-reconfigure --frontend=noninteractive locales

PHP / MySQL Versions

  • The new PHP version is verified with:
# php -v
PHP 5.4.40-1~dotdeb+squeeze.1 (cli) (built: Apr 22 2015 21:35:51)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
  • The existing version of MySQL 5.1 in Debian Squeeze is good enough for OwnCloud:
# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 5.1.73-1+deb6u1 (Debian)
mysql> quit
Bye
  • Optionally upgrade to MySQL 5.5 (in DotDeb Repo) with apt-get install mysql-server php5-mysqlnd

Create the Database

DROP USER 'appusr'@'%';
CREATE DATABASE `owncloud`CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, LOCK TABLES, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE ON `owncloud`.* TO 'appusr'@'localhost' ; 
FLUSH PRIVILEGES;

Enable the site

Upload the file /etc/apache2/sites-available/owncloud with the following contents:

ServerAdmin webmaster@localhost
ServerSignature Off
ServerTokens Prod

<IfModule mpm_prefork_module>
    StartServers 2
    MinSpareServers 1 
    MaxSpareServers 2
    MaxClients          50
    MaxRequestsPerChild 100
</IfModule>


<VirtualHost *:80>

DocumentRoot /var/www/owncloud

<Directory />
        Options FollowSymLinks
        AllowOverride None
</Directory>

<Directory /var/www/owncloud>
        Options FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
        Satisfy Any
		Require all granted
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

</VirtualHost>

Activate the site:

a2dissite webroot
a2ensite owncloud
/etc/init.d/apache2 reload

Complete the Install WIzard by browsing to the domain / IP.

Sample of Installed Files

An example of the config/config.php file generated is:

<?php
$CONFIG = array (
  'instanceid' => 'oc7kmhnzn6vr',
  'passwordsalt' => 'Aqfr9RGnT54o/ammcySh.2CAeDLwmM',
  'secret' => 's3aF8ij4YXyMrXvB5EYnd.8yahkw9Ro1BNLTdX7bj61nsk1Z',
  'trusted_domains' => 
  array (
    0 => 'owncloud.example.com',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwrite.cli.url' => 'http://owncloud.example.com',
  'dbtype' => 'mysql',
  'version' => '8.0.3.4',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'appusr',
  'dbpassword' => 'AG54WSATU9JP',
  'installed' => true,
  'mail_smtpmode' => 'php',
);

Apps Available / Installed

Apps Enabled

Activity 1.2.0
Deleted Files 0.6.2
File Locking
First Run Wizard
Mail Template Editor 0.1
PDF Viewer 0.7
Pictures 0.6.0
Provisioning API 0.2
Share Files 0.6.1
Text Editor 0.4
Updater 0.4
Versions 1.0.5
Video Viewer 0.1.3

Apps Not Enabled

External Sites 1.2
External Storage Support 0.2.3
External User Support 0.4
LDAP User and Group Backend 0.5.0
Server-side encryption 0.7.1
WebDAV User backend 1.1.0.1

Recommended

Calendar 8.0 v0.6.4
Contacts 8.0 v0.3.0.18
Search Lucene 8.0 v0.6.0
Documents 8.0 v0.9.0
Bookmarks 8.0 v0.4

Productivity

Mail 0.1.3

Tool

Imprint 0.2.5