Manually upgrade owncloud from 9.1.4 to 9.1.6

จาก Wiki Opensource

ปรับปรุงครั้งล่าสุดวันที่ 5-09-2560
เขียนโดย วิบูลย์

Note on Manually upgrade owncloud from 9.1.4 to 9.1.6

sudo su

/////If use cron.php, then stop cron.
vi /etc/cron.d/owncloud-cron-dot-php
#*/15  *  *  *  * www-data php -f /var/www/html/owncloud/cron.php

#Working directory
cd /var/www/html

/////Start upgrade
sudo -u www-data php owncloud/occ maintenance:mode --on

mkdir tmp
cd tmp
wget https://download.owncloud.org/community/owncloud-9.1.6.tar.bz2
tar xjf owncloud-9.1.6.tar.bz2 
service apache2 stop
cd ..
mv owncloud owncloud914
mv tmp/owncloud .
cp owncloud914/config/config.php owncloud/config/
cd owncloud
REM Because our owncloud data is soft link to /srv/data so I need to make a soft link
ln -s /srv/data/ data
REM
service apache2 start
cd ..
chown -R www-data:www-data owncloud
sudo -u www-data php owncloud/occ upgrade

/////Finish upgrade
sudo -u www-data php owncloud/occ maintenance:mode --off

/////Clean unwanted directories and files
rm -rf owncloud914
rm -rf tmp

/////If use cron.php, then start cron.
vi /etc/cron.d/owncloud-cron-dot-php
*/15  *  *  *  * www-data php -f /var/www/html/owncloud/cron.php