[How-To] ownCloud using NGINX, PHP-FPM, and MySQL

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Hi,

i tried to update my Owncloud to the newest version 8.2.2.2 I got the follow error:

Unable to move /usr/local/www/owncloud/_oc-upgrade/8.2.2.2/core/resources to /usr/local/www/owncloud/resources

Please help to solve the problem.

Many Thanks
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
8.2.2 is actually the latest version number. The extra ".2" is notaing something else.

You updated through the webinterface or using occ? In my experience occ is the most reliable at installing updates.
Code:
chsh -s /bin/sh www
su www
cd /usr/local/www/owncloud
php ./occ upgrde
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Hi Joshua,

i try the upgrade using the web Interface. When i try our method i get the message "OwnCloud is already latest version"

Acutally i am on Version 8.1.2

Thanks for your help :)
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Well, that has to be the least painful ownCloud upgrade ever!

I've just updated from 8.1.4 to 8.2.2 in 2 simple steps:

1. From the ownCloud WUI Admin page, click the Update button
2. Once the files have been updated and replaced, enter the jail CLI and run 'sudo -u www php occ upgrade' from the /usr/local/www/owncloud folder

I've learnt that taking a snapshot of the jail dataset before any upgrade is always sensible, and more often than not have needed to roll back, but on this occasion wasn't needed :D
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Hi,
My Problem is that the File replacement dont work. Yes, making snapshots before update is realy clever. I do this every time.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi Joshua,

i try the upgrade using the web Interface. When i try our method i get the message "OwnCloud is already latest version"

Acutally i am on Version 8.1.2

Thanks for your help :)
you need to first overwrite your owncloud directory with the latest owncloud source files while keeping certain ones. your config/config.php and possibly your apps directory. I think the web method, if it works for you does this for you.

there's an owncloud doc page on it, but it might be good if we write up the specific commands that are run on freenas.
 

Michael Sparks

Explorer
Joined
Apr 23, 2014
Messages
56
you need to first overwrite your owncloud directory with the latest owncloud source files while keeping certain ones. your config/config.php and possibly your apps directory. I think the web method, if it works for you does this for you.

there's an owncloud doc page on it, but it might be good if we write up the specific commands that are run on freenas.

<<this would be great for us not so savvy
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Here's the official docs. https://doc.owncloud.org/server/8.2/admin_manual/maintenance/manual_upgrade.html
Looks like we need to..
  • backup /usr/local/www/owncloud/config/config.php
  • Replace the old /usr/local/www/owncloud directory with the latest one.
  • move any apps that wer uninstalled from /usr/local/www/owncloud/apps
  • run 'occ upgrade'
Someone can give this a try if they like.
Code:
mv /usr/local/www/owncloud /usr/local/www/owncloud-bak
fetch "http://download.owncloud.org/community/owncloud-8.2.2.tar.bz2" #update version accordingly
tar jxf owncloud-*.tar.bz2 -C /usr/local/www
cp /usr/local/www/owncloud-bak/config/config.php /usr/local/www/owncloud/config
chown -R www:www /usr/local/www/owncloud
su -m www -c 'php /usr/local/www/owncloud/occ upgrade'
rm -r owncloud-*.tar.bz2 /usr/local/www/owncloud-bak


You'll then need to enable/install any missing apps. And reset your maxmium upload size in the "Admin" settings page.
 
Last edited:

Michael Sparks

Explorer
Joined
Apr 23, 2014
Messages
56
Here's the official docs. https://doc.owncloud.org/server/8.2/admin_manual/maintenance/manual_upgrade.html
Looks like we need to..
  • backup /usr/local/www/owncloud/config/config.php
  • Replace the old /usr/local/www/owncloud directory with the latest one.
  • move any apps that wer uninstalled from /usr/local/www/owncloud/apps
  • run 'occ upgrade'
Someone can give this a try if they like.
Code:
mv /usr/local/www/owncloud /usr/local/www/owncloud-bak
fetch "http://download.owncloud.org/community/owncloud-8.2.2.tar.bz2" #update version accordingly
tar jxf owncloud-*.tar.bz2 -C /usr/local/www
cp /usr/local/www/owncloud-bak/config/config.php /usr/local/www/owncloud/config
# copy any missing apps from /usr/local/www/owncloud-bak/apps to /usr/local/www/owncloud/apps
chown -R www:www /usr/local/www/owncloud
chsh -s /bin/sh www
cd /usr/local/www/owncloud
php ./occ upgrade
exit
rm -r owncloud-*.tar.bz2 /usr/local/www/owncloud-bak


Worked! Just missing
Code:
su www
as mentioned previously. Thank you!
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Hi,

i tried to update my Owncloud to the newest version 8.2.2.2 I got the follow error:

Unable to move /usr/local/www/owncloud/_oc-upgrade/8.2.2.2/core/resources to /usr/local/www/owncloud/resources

Please help to solve the problem.

Many Thanks

I have posted this issue in the ownlcoud forum and i got this workaround. It works for me

MadriSX hat geschrieben:It´s something pity that the updater itself has a bug, the other wrong thing is occ upgrade says you are with the last version
icon_e_confused.gif


Let´s do it manually! (done!)

By the way, sometimes we should be more specific when helping
icon_e_wink.gif


For people having the same problem just edit the file apps/updater/lib/location/core.php :
Change "8.1" in line 26 to "8.2" and proceed as usual.
 

jcbergqu

Dabbler
Joined
Dec 15, 2015
Messages
14
Looking for a little assistance...

I've been following the directions for installation and run across the following unexpected snag when I attempt to execute the "mysql_secure_installation" command in the jail's userland:

upload_2016-1-21_19-12-58.png


When I hit enter for none it gives me the repeated error. I've searched through the thread several times and have not seen this error mentioned. I've looked through all of the modified files and can't find a line to use the socket '/tmp/MySQL.sock'... Anyone know where I've gone wrong? I'm running 9.3.1 stable.

Thanks in advance!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Looking for a little assistance...

I've been following the directions for installation and run across the following unexpected snag when I attempt to execute the "mysql_secure_installation" command in the jail's userland:

View attachment 10170

When I hit enter for none it gives me the repeated error. I've searched through the thread several times and have not seen this error mentioned. I've looked through all of the modified files and can't find a line to use the socket '/tmp/MySQL.sock'... Anyone know where I've gone wrong? I'm running 9.3.1 stable.

Thanks in advance!
is mysql started? 'service mysql start'
 

jcbergqu

Dabbler
Joined
Dec 15, 2015
Messages
14
that would probably be the problem... When I attempt to start it I get the dreaded "mysql does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d)".

Did I miss the steps to install that somewhere in the tutorial? I've done this twice now. I deleted the first jail and started over in frustration...
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
that would probably be the problem... When I attempt to start it I get the dreaded "mysql does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d)".

Did I miss the steps to install that somewhere in the tutorial? I've done this twice now. I deleted the first jail and started over in frustration...
I can't tell you if you missed it. it's the 'pkg install' command
 

jcbergqu

Dabbler
Joined
Dec 15, 2015
Messages
14
Sorry for being such a noob! I don't see it in the pkg install lines back at the beginning... can I just run the command now, let it install, and then proceed on?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Sorry for being such a noob! I don't see it in the pkg install lines back at the beginning... can I just run the command now, let it install, and then proceed on?
I have an alternative mysql server (mariadb) in there. you can install any mysql compatible server though. and yes running the command again should work.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

jcbergqu

Dabbler
Joined
Dec 15, 2015
Messages
14
That package is installed and up to date. I really appreciate your guides! I've used a few of them with great success. This one is kicking my you know what... Since I have that package and it's up to date, what is my next move?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
the service is actually called as mysql-server not mysql
 
Top