Created page with "== Installing OwnCloud v8.0.3 in GenSQ Container == * We start with an OpenVZ container built with the Template: Generic Squeeze LAMP Server v2.0-4 and execute the following c..."
New page
== Installing OwnCloud v8.0.3 in GenSQ Container ==
* We start with an OpenVZ container built with the Template: Generic Squeeze LAMP Server v2.0-4 and execute the following commands:
<source lang="bash">
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
</source>
=== 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''':
<pre>
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
</pre>
<source lang="bash">
apt-get install curl
curl http://www.dotdeb.org/dotdeb.gpg | apt-key add -
apt-get update
apt-get dist-upgrade
</source>
==== PHP 5.4 Quirks ====
* PHP Upgrade References - [https://davejamesmiller.com/blog/installing-php-5-4-on-debian-6-squeeze 1], [https://www.dotdeb.org/2014/06/30/php-5-4-30-for-wheezy-and-squeeze/ 2]
* During the PHP upgrade, some messages would appear regarding settings - we just choose the Maintainer's defaults as '''Y'''es.
* Retain Package maintainer's versions of:
/etc/cron.d/php5
/etc/mysql/my.cnf
* The following operational changes will then come into effect:
<pre>
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.
</pre>
==== Dependencies ====
The [https://doc.owncloud.org/server/8.0/admin_manual/installation/source_installation.html OwnCloud Admin manual] requires the following dependencies installed with:
<source lang="bash">
# 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
</source>
==== Locales ====
* Locales supported by OwnCloud 8 are:
<pre>
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
</pre>
* Some locales not in the above like '''ta_IN UTF-8''' (no period) are also supported partially.
* Install the locales with:
<source lang="bash">
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
</source>
==== PHP / MySQL Versions ====
* The new PHP version is verified with:
<pre>
# 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
</pre>
* The existing version of MySQL 5.1 in Debian Squeeze is good enough for OwnCloud:
<pre>
# 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
</pre>
* Optionally upgrade to MySQL 5.5 (in DotDeb Repo) with <tt>apt-get install mysql-server php5-mysqlnd</tt>
=== Create the Database ===
<source lang="sql">
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;
</source>
=== Enable the site ===
Upload the file '''/etc/apache2/sites-available/owncloud''' with the following contents:
<pre>
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>
</pre>
Activate the site:
<source lang="bash">
a2dissite webroot
a2ensite owncloud
/etc/init.d/apache2 reload
</source>
Complete the Install WIzard by browsing to the domain / IP.
=== Sample of Installed Files ===
An example of the config/config.php file generated is:
<source lang="php">
<?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',
);
</source>
=== Apps Available / Installed ===
==== Apps Enabled ====
<pre>
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
</pre>
==== Apps Not Enabled ====
<pre>
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
</pre>
==== Recommended ====
<pre>
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
</pre>
==== Productivity ====
<pre>
Mail 0.1.3
</pre>
==== Tool ====
<pre>
Imprint 0.2.5
</pre>
[[Category:HOWTO]]