How to install NextCloud 12.3 on FreeNAS 11 with all checks passed

lobo feroz

Cadet
Joined
Nov 6, 2017
Messages
9
the following removes the binaries
Code:
 pkg remove mariadb101-server mariadb101-client

then
Code:
cd /usr/ports/databases/mariadb101-server
make install
cd ../mariadb101-client
make install

if the system complains about the system being unsupported, then you may also need to edit /etc/make.conf and add the following line
Code:
 ALLOW_UNSUPPORTED_SYSTEM=yes 

You will have to confirm many config options when doing the first 'make install' command, but it will finish eventually. The following link has usefull information on using ports. https://www.freebsd.org/doc/handbook/ports-using.html
Thanks a lot for the help Jeremy.
 

JeremyBaker

Cadet
Joined
Dec 6, 2017
Messages
8
do you have a file in /var/db/mysql with a .err extension? If so, what what are the most recent errors?
 

escapen

Cadet
Joined
Apr 16, 2016
Messages
6
Running into the same issues as the others and mine says:

Code:
2017-12-11 16:25:37 34422743040 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
 

JeremyBaker

Cadet
Joined
Dec 6, 2017
Messages
8
delete all files in /var/db/mysql, then try starting the mysql service. If it doesn't work, post the entire .err file
 

pintu1228

Explorer
Joined
Mar 16, 2015
Messages
61
I am still having issues with the following error:

Code:
171208 15:51:38 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql												
2017-12-08 15:51:38 34422743040 [Note] /usr/local/libexec/mysqld (mysqld 10.1.29-MariaDB) starting as process 9825 ...			
/usr/local/libexec/mysqld: Undefined symbol "fdatasync"																			
171208 15:51:38 mysqld_safe mysqld from pid file /var/db/mysql/NEXTCLOUD.pid ended


Also when I run mysql_secure_installation, I get the following error:

Code:
 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")


I had the same issue on FreeNAS 11.0 and now I have updated to 11.1-RELEASE, I tried to uninstall the mariadb101-server pkg and install from ports but it gives me errors saying:

Code:
Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.

No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.



Any help with solving this issue will be great.
 
Last edited by a moderator:

Maxobus

Dabbler
Joined
Dec 9, 2017
Messages
15
Have the same error Undefined symbol "fdatasync" after service mysql-server start
Tried to uninstall MariaDB server and client and install with ports (with enabled unsupported system) — ended with errors.
Tried to install MySQL server, also ended with Undefined symbol "fdatasync", while making /usr/local/libexec/mysqld --initialize --user=mysql
Cleared /var/db/mysql folder before every installation.

Build is: FreeNAS-11.1-RELEASE

What else should I try?
 

Maxobus

Dabbler
Joined
Dec 9, 2017
Messages
15
I've noticed that FreeBSD jail version is 11.0, but FreeBSD host system is 11.1.

Could it be the problem?
 

escapen

Cadet
Joined
Apr 16, 2016
Messages
6
Just want to report, once I got networking squared away with vnet and the dataset mount working, this guide worked perfectly with FN11.1 and iocage.

I've noticed that FreeBSD jail version is 11.0, but FreeBSD host system is 11.1.

Could it be the problem?

That is the issue, but if you follow the instructions earlier in the thread, should be working.
 

escapen

Cadet
Joined
Apr 16, 2016
Messages
6
I am still having issues with the following error:

Code:
171208 15:51:38 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql												
2017-12-08 15:51:38 34422743040 [Note] /usr/local/libexec/mysqld (mysqld 10.1.29-MariaDB) starting as process 9825 ...			
/usr/local/libexec/mysqld: Undefined symbol "fdatasync"																			
171208 15:51:38 mysqld_safe mysqld from pid file /var/db/mysql/NEXTCLOUD.pid ended


Also when I run mysql_secure_installation, I get the following error:

Code:
 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")


I had the same issue on Freenas 11.0 and now I have updated to 11.1-RELEASE, I tried to uninstall the mariadb101-server pkg and install from ports but it gives me errors saying:

Code:
Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.

No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.



Any help with solving this issue will be great.

Jeremy mentions the fix on the previous page.
 

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
Same here...ended with several errors (at least 10). Still on FreeNAS 11.0 U4 with FreeBSD version 11.0-Release-p1 in the jail.
Did you get this sorted?
 
Last edited by a moderator:

guermantes

Patron
Joined
Sep 27, 2017
Messages
213

papalangi

Dabbler
Joined
Dec 26, 2017
Messages
15
Hallo,
I have the first problem in running apache24. When I start the service I receive this error message:

root@Nextcloud:/etc # service apache24 start
Performing sanity check on apache24 configuration:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
Starting apache24.
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message


And on the web page of my jail (192.168.178.7) I receive:
Not Found
The requested URL /index.php was not found on this server.

this is the content of the file /etc/hosts:
Code:
# : src/etc/hosts,v 1.16 2003/01/28 21:29:23 dbaker Exp $
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1					 localhost localhost.localdomain
127.0.0.1			   localhost localhost.localdomain Nextcloud
192.168.178.7			Nextcloud

Any Idea? Thank in advance
 
Last edited by a moderator:

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
You will have to edit your httpd.conf and update the ServerName. If I remember correctly it is located here (in the jail): /usr/local/etc/apache24/httpd.conf (if not: https://wiki.apache.org/httpd/DistrosDefaultLayout) and you have to find the line beginning with #ServerName.... and uncomment that line (remove the #) and also put in your IP-address in said line. More instructions in the file itself.
 
Last edited by a moderator:

papalangi

Dabbler
Joined
Dec 26, 2017
Messages
15
Thanks,
it worked. This problem is solved.
in /usr/local/etc/apache24/httpd.conf this line should appear:
Code:
ServerName 192.168.178.7:80
 

papalangi

Dabbler
Joined
Dec 26, 2017
Messages
15
same problem with mysql_secure_installation
I receive the answer:
Code:
Enter current password for root (enter for none):																			  
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


Does someone knows a working "how to install nextcloud on FreeNAS jail?

One more hint, jexec works only with a defined shell:
jexec 1 /bin/tcshc
why aren't you using the jails shell directly?
 
Last edited by a moderator:

dalygrey

Cadet
Joined
Dec 27, 2017
Messages
1
first post, apologies, but I'll try to keep this short....ish

Was using FreeNAS 9.1 and just decided to rebuild my server and start over on 11.1-release because of VM support and the new gui. I was also itching to redo my Owncloud manually so it could support TLS 1.2 (instead of installing as a plugin).
Install went great, love my new physical setup. Created my SMB share and my time-machine space and then dug in to plugins.
Decided that Nextcloud is the way I would go after some light reading. I see the version installable from plugins is already unsupported by Nextcloud so I started trying to follow various walkthroughs on setup. Kept running in to the same problem. MySQL would not start after install in a jail.
Many many many iterations later I manually created a jail using iocage and just using the default storage space was able to download and install mariadb102-server and run it successfully. But while continuing to follow this walkthrough:
https://ramsdenj.com/2017/06/05/nextcloud-in-a-jail-on-freebsd.html#database
I fell apart at the php section. Between the 3 or 4 hours last night and the 6 hours today I think I'm taking a break. I consider myself to be pretty savvy, but obviously a lot of the innerworkings of FreeNAS are new to me.
 
Last edited by a moderator:

LotLits

Dabbler
Joined
Apr 10, 2015
Messages
30
@dalygrey I actually just went through rebuilding Nextcloud through a few hours of trial and error last night using iocage jail and that page.

For the database, you can just create a dataset in the FreeNAS GUI. I have a /nextcloud, /nextcloud/db, and /nextcloud/data for mounting into the jail without setting up anything particularly special.

You should then be able to do something like the following to mount it in the jail:

Code:
iocage fstab -a nextcloud /mnt/tank/nextcloud/data /mnt/data nullfs rw 0 0
iocage fstab -a nextcloud /mnt/tank/nextcloud/db /var/db/mysql nullfs rw 0 0


That's assuming you're not going to go the NFS route like in the guide (both are on the same server in my case). I'm not sure if there is an advantage to how it's being done in that guide.

After doing the above, you should be able to start at the Nextcloud section or the OP's post from a similar point. They're both pretty close to each other.

I also didn't use/setup letsencrypt yet, just a self signed cert. I'm planning on changing that at some point but I don't have 80/443 allowed to my server making it tougher to authenticate the certificate for my subdomain. I haven't gotten around to working it out yet.

Everything else up to the post setup seemed to work for me. I haven't gone through setting up smtp or anything yet either. Just glad to get things back up and running so far.
 
Last edited by a moderator:
Top