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

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
I could not make this work either. Probably because I mostly use NGINX these days. However were you guys able to make the Redis part to work for you? Because for the life of me I can't.
Yes it works for me. I'm going to do a video tutorial. 1 with nginx, 1 without. Oh and to get the redis to install you must do the portsnap fetch extract.

Sent from my HUAWEI NXT-AL10 using Tapatalk
 

dureal99d

Contributor
Joined
Aug 3, 2017
Messages
156
Obviously I'm not going to be much help - but I just checked Muzzy's post and can second the fact that Nextcloud opens at http://myip/nextcloud and not http://myip. Though I'm not informed enough to know if that's not how its meant to be.

Spretke, copy/pasting the "redis" part has seemed to have gone all right for me. - Wish I could give back & help you out.

My question is about the section from "Add virtual host info :" - danb35 explained that it's about getting a trusted certificate. I'd like this as I was unable to work that out on my previous Nextcloud install and I would always have preferred to connect via https. Furthermore, I know its an aspect of Nextcloud a lot of other users - including some on these forums - have said they were stumped by. This would help them too.

So could anyone contextualize what this section is doing?

For example, what are the requirements of the public domain name? We're talking a "www.whatever.com" or ".com.xx", yeah? How is it used? Is it just a temporary tool? Or will it be linked with the Nextcloud install? - I have one, but it's not really related to my Nextcloud usage. Could this work?
Yes because it makes it easy to be used with nginx proxy.conf or with cloudfare and the like

Sent from my HUAWEI NXT-AL10 using Tapatalk
 

pakka

Dabbler
Joined
Jan 25, 2018
Messages
48
Hi,
i created the iocage, mounted the path for db and files, installed apache-server ("it works!") but failed on the mysql-secure-install with error 2002:
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mys
ql.sock' (2 "No such file or directory")		

Do I have to manually edit some config files?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
For some reason, the package installation of MariaDB for me didn't put its config file in place, so I needed to cp -f /usr/local/share/mysql/my-small.cnf /var/db/mysql/my.cnf. I also needed to uncomment the line in there that said skip-networking.
 

pakka

Dabbler
Joined
Jan 25, 2018
Messages
48
yes and no. I gave the start command, but status said "mysql is not running".
is there a log-file to figure out what´s wrong?
 

pakka

Dabbler
Joined
Jan 25, 2018
Messages
48
Code:
Warning: World-writable config file '/var/db/mysql/my.cnf' is ignored
Warning: World-writable config file '/var/db/mysql/my.cnf' is ignored
2018-03-25 13:51:51 34422743040 [Note] /usr/local/libexec/mysqld (mysqld 10.1.31-MariaDB) starting as process 15461 ...
2018-03-25 13:51:51 34422743040 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

2018-03-25 13:51:51 34422743040 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-03-25 13:51:51 34422743040 [Note] InnoDB: The InnoDB memory heap is disabled
2018-03-25 13:51:51 34422743040 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-03-25 13:51:51 34422743040 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-03-25 13:51:51 34422743040 [Note] InnoDB: Compressed tables use zlib 1.2.11
2018-03-25 13:51:51 34422743040 [Note] InnoDB: Using SSE crc32 instructions
2018-03-25 13:51:51 34422743040 [ERROR] mysqld: Can't create/write to file '/tmp/ibXZDbln' (Errcode: 13 "Permission denied")
2018-03-25 13:51:51 803c16000  InnoDB: Error: unable to create temporary file; errno: 13
2018-03-25 13:51:51 34422743040 [ERROR] Plugin 'InnoDB' init function returned error.
2018-03-25 13:51:51 34422743040 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-03-25 13:51:51 34422743040 [Note] Plugin 'FEEDBACK' is disabled.
2018-03-25 13:51:51 34422743040 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-03-25 13:51:51 34422743040 [ERROR] Aborting



Like in the tutorial on first page I changed the permissions of that db-volume I mounted at /var/db/mysql to owner mysql and group mysql with that new user mysql.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
This isn't dealing with permissions on /var/db/mysql; it's dealing with permissions on /tmp, which seems very odd. chmod 777 /tmp, from inside the jail, should do the job.
 

pakka

Dabbler
Joined
Jan 25, 2018
Messages
48
Yes! that was the problem for error 2002.
Now at the same point I got error 1045: Access denied for user 'root'@'localhost'
Is that now a problem with that new user? by the way: why is that user created? Only to give him permissions for that db-volume?
 

Dajinn

Cadet
Joined
Apr 2, 2018
Messages
2
Wanted to chime in on my experience with this so far, first wanted to say thanks for the guide, it's worked out mostly for me, aside from the part where I had to read through the replies to discover that using iocage was necessary, this wasn't a big deal as it doesn't matter to me if it's a FreeNAS Jail or iocage, but I would've liked to have seen that in the OP.

Again, so far everything's worked, but I haven't finished it yet. I just finished adding the domain conf file and wanted to share my experience with this.

So I used DuckDNS to get a sub domain that points to my public IP and used that as my domain for my install, however, like the previous poster I wasn't able to open NextCloud unless I typed in the relative /nextcloud path in the URL. One thing I noticed was that I forgot to put the ".conf" at the end of the conf file that has the name of my domain.

In my instance initially I had created the file as mysubdomain.duckdns.org, instead of, mysubdomain.duckdns.org.conf. After I did this, I was able to get to NextCloud via just the IP and not having to type the relative path to the root folder.

Hope this helps someone and again thanks for the guide and cooperation within this thread.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

jonidimo

Dabbler
Joined
Nov 4, 2017
Messages
13
If your Nextcloud 12 installation is working fine, you should be able to just use its built-in updater to update to Nextcloud 13.

http://doc.freenas.org/11/jails.html#using-iocage
https://github.com/iocage/iocage
Thanks by the answer! I follow all this guide and it works pretty well! Whe I want to use the built-in updater I have this issue:
upload_2018-4-10_23-28-13.png

I read a lot of post with the same problem but I couldn't resolve it yet.
upload_2018-4-10_23-40-10.png
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
.well-known isn't showing up in ls because it's a hidden file (the . at the beginning of the directory name makes it hidden). It should be in /usr/local/www/apache24/data/nextcloud.

Edit: But we should probably update the virtualhost configuration file to put .well-known outside the nextcloud base directory. I'll work on that in my scripted install.
 
Last edited:

pakka

Dabbler
Joined
Jan 25, 2018
Messages
48
I have still that issues setting up mysql..

Code:
ERROR 1805 (HY000) at line 1: Column count of mysql.user is wrong. Expected 43,
found 46. The table is probably corrupted									  
root password update failed!


Can I clean up the mysql-database or mysql-server to get a fresh start?

Maybe someone could help me via teamviewer?! Also asked in the nextcloud-with-script-thread... I would appreciate so much!
 
Last edited:

DiWa

Cadet
Joined
Oct 28, 2013
Messages
9
To fix this, I removed png-1.6.34 and php71-gd-7.1.13 by
Code:
pkg remove png
cd /usr/ports/graphics/png
make install clean ALLOW_UNSUPPORTED_SYSTEM=true
pkg install php71-gd

I was struggling to fix this issue, the only answers were about creating a new jail. Something I didn't to go into.
Thanks a million @AfroUSA, you made my day!
 

keboose

Explorer
Joined
Mar 5, 2016
Messages
92
Hey, I just wanted to say thank you for putting together the guide in your OP! I followed all the directions and installed Nextcloud 13.0.3 with PHP 7.1 in a FreeBSD 11.1 jail. I followed your instructions to the letter, with two exceptions:
  1. In this post by user trentk10, the last codeblock in their post is required in the apache config file, otherwise the server returns an internal error.
  2. I copied my own certificate (.crt) and private key (.key) files I made a while ago for my domain, to /usr/local/etc and used those for SSL instead of installing CertBot.
Thanks so much again for putting this guide together! I've been stuck on owncloud 9 for a while now because trying to get this kind of stuff working outside of a plugin is like a foreign language to me.
 

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
I would want to follow this guide instead of Nextcloud 13 due to using iocage, is it still possible to create a jail from GUI instead of iocage? I'm getting an error of
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")
when I do
Code:
mysql_secure_installation


Also, when I do service mysql-server start, I got the below output:
Code:
root@Nextcloud:/ # service mysql-server start

Installing MariaDB/MySQL system tables in '/var/db/mysql' ...

2018-08-04 11:24:58 34422743040 [Note] /usr/local/libexec/mysqld (mysqld 10.1.33-MariaDB) starting as process 95574 ...

/usr/local/libexec/mysqld: Undefined symbol "fdatasync"


Installation of system tables failed!  Examine the logs in

/var/db/mysql for more information.


The problem could be conflicting information in an external

my.cnf files. You can ignore these by doing:


	shell> /usr/local/bin/mysql_install_db --defaults-file=~/.my.cnf


You can also try to start the mysqld daemon with:


	shell> /usr/local/libexec/mysqld --skip-grant-tables --general-log &


and use the command line tool /usr/local/bin/mysql

to connect to the mysql database and look at the grant tables:


	shell> /usr/local/bin/mysql -u root mysql

	mysql> show tables;


Try 'mysqld --help' if you have problems with paths.  Using

--general-log gives you a log in /var/db/mysql that may be helpful.


The latest information about mysql_install_db is available at

https://mariadb.com/kb/en/installing-system-tables-mysql_install_db

You can find the latest source at https://downloads.mariadb.org and

the maria-discuss email list at https://launchpad.net/~maria-discuss


Please check all of the above before submitting a bug report

at http://mariadb.org/jira


/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql

It seems like somewhere the file is missing.
 
Top