Install/Upgrade owncloud on CentOS

Installation

yum install -y php5 php5-common php-xml php-mbstring php-gd
yum install -y curl php-pdo
#not sure if already in common: yum install -y libcurl3 libcurl3-dev
  • Now download and install owncloud
VER=5.0.12
ROOT=/var/www/owncloud #change to match your own setup

wget http://download.owncloud.org/community/owncloud-$VER.tar.bz2
tar -xjf owncloud-$VER.tar.bz2
mv owncloud $ROOT
rm -Rf owncloud-*
chown -R apache:apache $ROOT
  • Set up a virtual host in apache to point to $ROOT
  • visit the site and follow the upgrade instructions

Upgrade

VER=5.0.12
ROOT=/var/www/owncloud #change to match your own setup

wget http://download.owncloud.org/community/owncloud-$VER.tar.bz2
tar -xjf owncloud-$VER.tar.bz2
rm -Rf owncloud/config #when upgrading, don't override config

mv $ROOT $ROOT.old  #for upgrade
mv owncloud $ROOT
mv $ROOT.old/data $ROOT
cp -a $ROOT.old/config $ROOT
  • Now visit site and make sure it’s working before deleting the old config
rm -Rf owncloud-*
rm -Rf $ROOT.old

Garbled menus

  • can often be fixed by adding line to $ROOT/config/config.php
<?php
DEFINE("DEBUG", true);