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

Maturola

Explorer
Joined
Jun 26, 2014
Messages
85
others have reported a similar issue with OC8.2. I believe it's a bug with the database host parsing. try using "localhost"

Some type of access issue...

Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'ocuser'@'localhost' (using password: YES)
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Some type of access issue...

Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'ocuser'@'localhost' (using password: YES)
did you connect the the database in the earlier steps and create the database and the ocuser?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
yes sir,,,everything was created

I just clicked it again and it work this time.... not sure why
I would double check you can login to mysql with the ocuser and ocpass to verify you did it. others setup OC8.2 earlier this week so you probably aren't doing something perfectly
 

Joshua Parker Ruehlig

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

Joshua Parker Ruehlig

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

garyjg

Dabbler
Joined
Dec 31, 2014
Messages
24
Hi Joshua, thanks for the tutorial... I've tried installation three times and I can ever get our cloud to open (http://jailip/owncloud) if I just use my IP address I see that
nginx web server is successfully installed, once I add the owncloud I get a 404 not found.
please forgive me but I'm not a programmer but I followed your instruction.


thanks,
Gary
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi Joshua, thanks for the tutorial... I've tried installation three times and I can ever get our cloud to open (http://jailip/owncloud) if I just use my IP address I see that
nginx web server is successfully installed, once I add the owncloud I get a 404 not found.
please forgive me but I'm not a programmer but I followed your instruction.


thanks,
Gary
well I'm not much a programmer either, kinda irrelevant, this is more like system administration.

what comes up when you browse to /owncloud/robots.txt
also can you verify php is listening at the correct socket, show the output of 'sockstat'
 

garyjg

Dabbler
Joined
Dec 31, 2014
Messages
24
Hi,
I get the same thing, 404 not found. php should be listen on 80, correct?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi,
I get the same thing, 404 not found. php should be listen on 80, correct?
nope, should be listening at /var/run/php-fpm.sock
The /owncloud/robots.txt URL doesn't rely on PHP working. Since that didn't work, I assume your nginx config isn't setup correctly.
 

tamilmad

Dabbler
Joined
Oct 20, 2015
Messages
36
I followed your instructions exactly and was able to install the owncloud and access the same remotely also using the internet. Thanks.

But I did have 2 issues / queries.

1. I had one error while setting up document preview. The error is given below Please let me know what is to be done.
------------------------------------------------------------------
root@owncloud:/ # pkg install libreoffice pecl-imagick
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
pkg: No packages available to install matching 'libreoffice' have been found in
the repositories
------------------------------------------------------------------------

2. I did not quite understand this portion of your tutorial.

--------------------------------------------------------------------
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
----------------------------------------------------------------------

After logging in to owncloud using its WEBUI I could not locate the Advanced Setup.

Thanks once again
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I followed your instructions exactly and was able to install the owncloud and access the same remotely also using the internet. Thanks.

But I did have 2 issues / queries.

1. I had one error while setting up document preview. The error is given below Please let me know what is to be done.
------------------------------------------------------------------
root@owncloud:/ # pkg install libreoffice pecl-imagick
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
pkg: No packages available to install matching 'libreoffice' have been found in
the repositories
------------------------------------------------------------------------

2. I did not quite understand this portion of your tutorial.

--------------------------------------------------------------------
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
----------------------------------------------------------------------

After logging in to owncloud using its WEBUI I could not locate the Advanced Setup.

Thanks once again
1) I'm not sure why libreoffice isn't in the repo at the moment, I can confirm that it's not there for FreeBSD 9.3, but is there for my FreeBSD 10.1 server. You can always build it from ports if you like or find the package from another repo.

2) if you logged in, you missed the stop where you can put in the advanced settings.
Do this https://forums.freenas.org/index.ph...x-php-fpm-and-mysql.17786/page-35#post-237766
 

Handle

Dabbler
Joined
Oct 20, 2015
Messages
30
I followed your instructions exactly and was able to install the owncloud and access the same remotely also using the internet. Thanks.

But I did have 2 issues / queries.

1. I had one error while setting up document preview. The error is given below Please let me know what is to be done.
------------------------------------------------------------------
root@owncloud:/ # pkg install libreoffice pecl-imagick
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
pkg: No packages available to install matching 'libreoffice' have been found in
the repositories
------------------------------------------------------------------------
"pkg install libreoffice4-4.3.7" should work, at least it does for me.
 

garyjg

Dabbler
Joined
Dec 31, 2014
Messages
24
Error
Hi, finely got the problem that I had figured out, I did the same this as Handle did and missed the "Advanced" step, I followed the future instruction and was able to go to Advanced but now I'm facing another problem
I'm unable to access the database: see below

Error while trying to create admin user:
Failed to connect to the database: An
exception occured in driver:
SQLSTATE[HY000] [2002] Can't assign
requested address
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Error
Hi, finely got the problem that I had figured out, I did the same this as Handle did and missed the "Advanced" step, I followed the future instruction and was able to go to Advanced but now I'm facing another problem
I'm unable to access the database: see below

Error while trying to create admin user:
Failed to connect to the database: An
exception occured in driver:
SQLSTATE[HY000] [2002] Can't assign
requested address
can you try using "localhost" instead of "localhost:/tmp/mysql.sock"
 

garyjg

Dabbler
Joined
Dec 31, 2014
Messages
24
do you mean "localhost/tmp/mysql.sock"? I tried what's writen but still NG
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
do you mean "localhost/tmp/mysql.sock"? I tried what's writen but still NG
not sure what works as something in the parsing broke with OC8.2. I'll take a look tomorrow as this seems to not work anymore.
 
Top