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

Vlad.r

Cadet
Joined
Mar 18, 2015
Messages
1
Hello .

Thank you for this very well written guide .
I have managed to install Owncloud 8.02 following your guide .

One think didn't work : to set upload size .
I have to modify ''user.ini'' from /usr/local/www/owncloud to set my desired upload size .

Thank you again for sharing .
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
How do I upgrade the running OC8 pbi to the new 8.02?
this thread is about installing owncloud from source not a PBI.

if you installed the plugin, use FreeNAS WebUI > Plugins > Installed tab to update to 8.0.2
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I longingly wish for the days of small, stable software packages.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I longingly wish for the days of small, stable software packages.
lol, those days are over. I manage my family members home networks and a owncloud instance and it's a part time job.
 

Krowvin

Explorer
Joined
Jul 24, 2014
Messages
60
Thanks for this guide Joshua. I learned a lot going through it.

So I upgraded to Owncloud 8. Works great,but I did have to comment this line out (previously mentioned)
Navigate to the nginx config
Code:
nano /usr/local/etc/nginx/nginx.conf


If you are doing this from scratch and you follow joshua's guide (coyping his nginx.conf) you probably wont have to worry about this, but in upgrading to the new version via the GUI it added this line- comment it out with a #

Code:
fastcgi_param MOD_X_ACCEL_REDIRECT_ENABLED on;



Also...
In case this happens to someone else, my cron jobs weren't running for some reason. Long before I upgraded to owncloud 8 they weren't running.

I did some research and found this.

It's my understanding that there was either a power outage, or some freak incident that caused my cron.lock file to not be deleted. I moved the file from /mnt/files (user file directory) to /mnt

I then manually ran this in the owncloud jail jls -> jexec # csh
Code:
php /usr/local/www/owncloud/cron.php


Refreshed the owncloud admin page and it showed as having just ran the cron.

I'm not sure if removing the cron.lock did anything as I didn't test to manually run that command before removing the file. So I'll wait and see if the cron runs itself.

Side note: I did add the cronjob per the guide. When I noticed the cronjobs weren't running I checked to make sure it was still there .

UPDATE 1: The cronjob is working now. I ran it manually at 7, at 7:15 it registered as having ran again.
 
Last edited:

kwessel

Dabbler
Joined
Mar 30, 2015
Messages
44
I used you tutorial and I am able to see the OwnCloud index page. I am not able to finish setup from that page, because, it appears that I need a user name for mysql. Is there a default I should use?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I used you tutorial and I am able to see the OwnCloud index page. I am not able to finish setup from that page, because, it appears that I need a user name for mysql. Is there a default I should use?
this is covered near the end of the guide.
 

kwessel

Dabbler
Joined
Mar 30, 2015
Messages
44
I may be missing it. I see this:

ownCloud WebUI (http://jailip/owncloud)
Advanced
  • Data folder = /mnt/files
  • Configure the database = MySQL/MariaDB
  • Database user = ocuser
  • Database password = ocpass
  • Database name = owncloud
  • Database host = localhost:/tmp/mysql.sock
I am able to enter the data folders etc., but don't know what to use for user name. I do know I entered a password when setting up mysql.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I may be missing it. I see this:

ownCloud WebUI (http://jailip/owncloud)
Advanced
  • Data folder = /mnt/files
  • Configure the database = MySQL/MariaDB
  • Database user = ocuser
  • Database password = ocpass
  • Database name = owncloud
  • Database host = localhost:/tmp/mysql.sock
I am able to enter the data folders etc., but don't know what to use for user name. I do know I entered a password when setting up mysql.
your mysql user/pass has to enter what you entered into mysql, probably what you just quoted.
your owncloud user and password can be anything you like
 

kwessel

Dabbler
Joined
Mar 30, 2015
Messages
44
I know what the password is, but I do not recall being asked to enter a user name. I went through the guide two times to keep an eye open for being so requested.

If I type

mysql -u root -p

I see

MariaDB [(none)]>

is there a way to go back in and create a user name. I'm new to this. Very experienced with WIN 2011 SBS, but just starting to learn about FreeNas, FreeBSD (remembering that I wrote DOS bat files back in the day)

Thanks for your help.
 

kwessel

Dabbler
Joined
Mar 30, 2015
Messages
44
PS here is the error message

MySQL/MariaDB username and/or password not valid You need to enter either an existing account or the administrator.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I know what the password is, but I do not recall being asked to enter a user name. I went through the guide two times to keep an eye open for being so requested.

If I type

mysql -u root -p

I see

MariaDB [(none)]>

is there a way to go back in and create a user name. I'm new to this. Very experienced with WIN 2011 SBS, but just starting to learn about FreeNas, FreeBSD (remembering that I wrote DOS bat files back in the day)

Thanks for your help.
You create the database user in this step...
Code:
GRANT ALL PRIVILEGES ON owncloud.* TO 'ocuser'@'localhost' IDENTIFIED BY 'ocpass';


Lol K, I don't much about Windows, I try to avoid anything but Linux/FreeBSD.
 

Chakalov

Explorer
Joined
Feb 9, 2015
Messages
53
I hope it's not too much off-topic:

My OC is located at http://mydomain.net:8099/owncloud/ and every time I log off it brings me to an incorrect address. Can you tell me what should I add in the nginx.conf to redirect me back to the right port?

Thank you in advance!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I hope it's not too much off-topic:

My OC is located at http://mydomain.net:8099/owncloud/ and every time I log off it brings me to an incorrect address. Can you tell me what should I add in the nginx.conf to redirect me back to the right port?

Thank you in advance!
what incorrect address does it bring you too? wrong port, URI, domain?
 
Top