Little over my head. Hoping to get Unifi Controller installed in FreeNAS.

Status
Not open for further replies.

Huib

Explorer
Joined
Oct 11, 2016
Messages
96
You probably are root.
If you are don't use sudo. It will not be found.
I've made a fresh jail for testing and then I did this:

Code:
pkg update
pkg upgrade
portsnap fetch update #this gives an error. Extract portsnap first
portsnap extract
portsnap fetch update #portsnap is up to date.
cd /usr/ports
make search name=unifi5 #it is found
cd /usr/ports/net-mgmt/unifi5

#this is where I stopped. I might try to "make" it when I get home.
#The rest would be

make config-recursive
make install
sysrc unifi_enable=YES
service unifi start
 
Last edited:

-RYknow

Explorer
Joined
Sep 9, 2014
Messages
60
You probably are root.
If you are don't use sudo. It will not be found.
I've made a fresh jail for testing and then I did this:

Code:
pkg update
pkg upgrade
portsnap fetch update #this gives an error. Extract portsnap first
portsnap extract
portsnap fetch update #portsnap is up to date.
cd /usr/ports
make search unifi5 #it is found
cd /usr/ports/net-mgmt/unifi5

#this is where I stopped. I might try to "make" it when I get home.
#The rest would be

make config-recursive
make install
sysrc unifi_enable=YES
service unifi start

So at this point, and I better to just nuke the jail I created and start from scratch? I might just wait till you proceed all the way through, just want to make sure it's going to work.

-RYknow
 

Huib

Explorer
Joined
Oct 11, 2016
Messages
96
so wait a few hours.
I'll see if it installes correctly after this procedure (finishes without errors)
but as you know that takes a while.
 

-RYknow

Explorer
Joined
Sep 9, 2014
Messages
60
so wait a few hours.
I'll see if it installes correctly after this procedure (finishes without errors)
but as you know that takes a while.

Ohh yeah. I'm going to sit tight. I'm at work and can't touch it till I get home later tonight anyway. =]

I appreciate the time your putting into though! Thank you sir! :)
 

Huib

Explorer
Joined
Oct 11, 2016
Messages
96
Unfortunately it didn't work.

Code:
gmake[11]: *** No rule to make target '/usr/ports/java/openjdk8/work/openjdk/hotspot/src/cpu/amd64/vm/x86_64.ad', needed by '../generated/adfiles/bsd_x86_64.ad'.  Stop.
gmake[11]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/build/bsd-x86_64-normal-server-release/hotspot/bsd_amd64_compiler2/product'
gmake[11]: *** Waiting for unfinished jobs....
gmake[10]: *** [/usr/ports/java/openjdk8/work/openjdk/hotspot/make/bsd/makefiles/top.make:91: ad_stuff] Error 2
gmake[10]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/build/bsd-x86_64-normal-server-release/hotspot/bsd_amd64_compiler2/product'
gmake[9]: *** [/usr/ports/java/openjdk8/work/openjdk/hotspot/make/bsd/Makefile:294: product] Error 2
gmake[9]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/build/bsd-x86_64-normal-server-release/hotspot'
gmake[8]: *** [Makefile:231: generic_build2] Error 2
gmake[8]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/hotspot/make'
gmake[7]: *** [Makefile:177: product] Error 2
gmake[7]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/hotspot/make'
gmake[6]: *** [HotspotWrapper.gmk:45: /usr/ports/java/openjdk8/work/openjdk/build/bsd-x86_64-normal-server-release/hotspot/_hotspot.timestamp] Error 2
gmake[6]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/make'
gmake[5]: *** [/usr/ports/java/openjdk8/work/openjdk//make/Main.gmk:113: hotspot-only] Error 2
gmake[5]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/java/openjdk8
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/java/openjdk8
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/maven3
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/archivers/snappy-java
*** Error code 1

Stop.
make: stopped in /usr/ports/net-mgmt/unifi5


at least I saved you some time testing this idea....
 

-RYknow

Explorer
Joined
Sep 9, 2014
Messages
60
Unfortunately it didn't work.

Code:
gmake[11]: *** No rule to make target '/usr/ports/java/openjdk8/work/openjdk/hotspot/src/cpu/amd64/vm/x86_64.ad', needed by '../generated/adfiles/bsd_x86_64.ad'.  Stop.
gmake[11]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/build/bsd-x86_64-normal-server-release/hotspot/bsd_amd64_compiler2/product'
gmake[11]: *** Waiting for unfinished jobs....
gmake[10]: *** [/usr/ports/java/openjdk8/work/openjdk/hotspot/make/bsd/makefiles/top.make:91: ad_stuff] Error 2
gmake[10]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/build/bsd-x86_64-normal-server-release/hotspot/bsd_amd64_compiler2/product'
gmake[9]: *** [/usr/ports/java/openjdk8/work/openjdk/hotspot/make/bsd/Makefile:294: product] Error 2
gmake[9]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/build/bsd-x86_64-normal-server-release/hotspot'
gmake[8]: *** [Makefile:231: generic_build2] Error 2
gmake[8]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/hotspot/make'
gmake[7]: *** [Makefile:177: product] Error 2
gmake[7]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/hotspot/make'
gmake[6]: *** [HotspotWrapper.gmk:45: /usr/ports/java/openjdk8/work/openjdk/build/bsd-x86_64-normal-server-release/hotspot/_hotspot.timestamp] Error 2
gmake[6]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk/make'
gmake[5]: *** [/usr/ports/java/openjdk8/work/openjdk//make/Main.gmk:113: hotspot-only] Error 2
gmake[5]: Leaving directory '/usr/ports/java/openjdk8/work/openjdk'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/java/openjdk8
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/java/openjdk8
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/maven3
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/archivers/snappy-java
*** Error code 1

Stop.
make: stopped in /usr/ports/net-mgmt/unifi5


at least I saved you some time testing this idea....

Bummer! Sucks it didn't work out. Thanks again for your time though man. I do appreciate it!

-RYknow
 

maxbet

Dabbler
Joined
Oct 4, 2014
Messages
12
I have installed UniFi controller in two FreeNAS machines (latests FreeNAS 9.10.2-U1 + latest uniFi controller) following this guide ; in both cases installation went without a glitch.
Let me know if you can access the link; if not I will send you a PDF printout.

Massimo
 

-RYknow

Explorer
Joined
Sep 9, 2014
Messages
60
Let me know if you can access the link; if not I will send you a PDF printout.

Massimo

I'm not able to access the link, just loads a blank page. I'll PM you my email address.

-RYknow
 

Battlebot32

Cadet
Joined
Oct 19, 2016
Messages
5
I was able to get Unifi working by starting with a fresh jail and following part of Huib's instructions:

Code:
pkg update
pkg upgrade
portsnap fetch update #this gives an error. Extract portsnap first
portsnap extract
portsnap fetch update #portsnap is up to date.


Then finishing with instructions posted by Matt on his website https://wiki.mattrude.com/FreeNAS/Unifi_Controller_Install
With the following code:


Code:
pkg install -y openjdk8

echo "fdesc   /dev/fd		 fdescfs		 rw	  0	   0" > /etc/fstab
echo "proc	/proc		   procfs		  rw	  0	   0" >> /etc/fstab

pkg install -y mongodb

echo 'mongod_enable="YES"' >> /etc/rc.conf

cd /usr/ports/net-mgmt/unifi5/
make install clean

echo 'unifi_enable="YES"' >> /etc/rc.conf
service unifi start



I waited a few minutes before logging into the GUI and was able to do the typical setup successfully.

When I followed just Matt's instructions or Huib's instructions separately I was not able to get Unifi working. The above combined method was the only way I was able to get it to work.

Sorry the post isn't cleaner. First time posting..
 
Last edited:

-RYknow

Explorer
Joined
Sep 9, 2014
Messages
60
No worries! Thanks for the response! Another user had shot me an email with some instructions in a PDF. I've put off working too hard to get this running cause I bought a new switch and plan to change my IP scheme and everything once installed. Sadly I didn't measure my current wall mounted rack, and my new ubiquiti switch doesn't fit... :mad:

Anyway, a new rack is on the way and once it's here and my switch is installed, I'll be changing my IP scheme and be back to getting unifi running on freenas.

Thanks again everyone for your help! This is a great community and really appreciate everyones support!
-RYknow
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
These lines if you put them in the /etc/fstab of a jail are not going to work:

fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0

These lines need to be mounted from the host FreeNAS installation. There was a post lurking about how to do this somewhere in the forums, but I can't find it. If I recall, it was dealing with installing bash inside a jail, since bash has a similar requirement.
 

-RYknow

Explorer
Joined
Sep 9, 2014
Messages
60
These lines if you put them in the /etc/fstab of a jail are not going to work:

fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0

These lines need to be mounted from the host FreeNAS installation. There was a post lurking about how to do this somewhere in the forums, but I can't find it. If I recall, it was dealing with installing bash inside a jail, since bash has a similar requirement.

Good to know. I imagine I could just ssh into my freenas box and edit the fstab file?

-RYknow
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
No -- the file system for all the jails need to be mounted when the main system boots. I'll look around and see if I can find the post that describes how to do this -- its a setting you add to the main GUI freenas. I believe you add a line to the Tasks->Init/Shutdown scripts section. --- Let me look things up before I start spouting false information!!!
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
Ok for followup --- The reference I was using to answer the question regarding fdesc was https://www.reddit.com/r/freenas/comments/2s0zgu/installing_bash_in_a_jail/

Within this thread the last comment stated
"in FreeNAS 9.3 you can specify a startup command. you can just run just the mount command then"

The statement is in general to running the mount command similar to the following -- this is being run within the base FreeNAS setup -- not the jail:
Code:
mount -t fdescfs null /mnt/tank/jails/bash_jail/dev/fd


I've also however found reference to a number of patches for the fdesc. I've looked in all my freebsd jails -- all of mine are under /mnt/tank/jails -- (your location might be different) -- and with the /dev directory there is always a fd mountpoint even when I didn't add it. I wondering if others could confirm this in there install. Some thread mentioned running the program screenfetch as a check since this utility calls the fd mountpoint. I installed screenfetch within one of my jails without using the mount command and it seemed to run OK.

So this entire requirement needed by bash for process substitution might be a non-point within by FreeBSD 9.10 installation It seems I already have a /dev/fd within all of my jails. Can others confirm this finding as well?
:(:confused::rolleyes:o_O
 
Status
Not open for further replies.
Top