0
ark74

Ubiquiti Unifi Controller on XU4

Recommended Posts

(edited)

Hi Armbian Users :)

I'm french, so excuse my poor english :(

 

I'm having hard times installing Ubiquiti Unifi Controller on Armbian (running on a XU4)

Armbian version :  Armbian_5.59_Odroidxu4_Debian_stretch_next_4.14.66

 

I followed different tutorial, but no luck with those no brain tutorial. I must be retarded :D

MongoDB is giving me a hard time, broken dependencies and so on.

 

I understood that some managed to do it with Armbian based on Ubuntu. No luck eitheir for me.

I did add the mongodb repository for 3.6 version, which support arm64 architecture.

Apt never gave me the ability to install the mongodb-org package and dependencies for this package.

 

A few links : 

https://github.com/aryonp/unifi/blob/master/install_unifi_odroid_xu4.sh

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ (followed the ubuntu 16.04 tutorial)

https://forum.odroid.com/viewtopic.php?t=22850

https://help.ubnt.com/hc/en-us/articles/220066768-UniFi-How-to-Install-Update-via-APT-on-Debian-or-Ubuntu

 

I could have left that here, but no..

 

My armbian.list :

deb http://apt.armbian.com stretch main stretch-utils stretch-desktop
# deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main
deb [arch=amd64,arm64] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse
# deb [arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse
deb http://mirrordirector.raspbian.org/raspbian stretch main contrib non-free rpi

The few commands that goes with it :

 

apt-add-repository  ppa:webupd8team/java
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886

wget http://mirrordirector.raspbian.org/raspbian.public.key
apt-key add raspbian.public.key

sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ubnt.com/unifi/unifi-repo.gpg

apt update
apt install unifi
apt install oracle-java8-installer oracle-java8-set-default oracle-java8-unlimited-jce-policy
systemctl enable unifi
systemctl disable mongodb
systemctl stop mongodb
/etc/init.d/unifi start

I end up with a Unifi Controller 5.8.30 working on Armbian (Debian), but...

MongoDB is in version 2.4 and comes from raspbian repository ?

 

Any thought on this ?

Should I go an other way ?

 

Thank you :)

Edited by ark74
missing info

Share this post


Link to post
Share on other sites

Hi,

 

I see your point, rookie mistake :)

Thanks.

As far as I know, there is no official package or ripository on MongoDB side for armhf.

 

Sooo, if I want mongoDB up to date, I have to either :

- Compile MongoDB myself on the XU4. Will Unifi be able to find it during installation with Apt (I see broken dependencies from a mile away) ?

- Switch to Arch Linux, to which I understand nothing for now...

 

Or, I'm just going to production with this old thingy..

I'm right ?

Share this post


Link to post
Share on other sites
(edited)

I have unifi running on an hc1 and I dont recall any issues. When I get home I'll see if I have time to post how I did it.

 

This is the apt source I used

# cat 100-ubnt-unifi.list
deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti

 The only other sources I have is armbian 

 

Edit: my mongodb-server package is from debian

# apt-cache showpkg mongodb-server
Package: mongodb-server
Versions:
1:2.4.10-5+deb8u1 (/var/lib/apt/lists/httpredir.debian.org_debian_dists_jessie_main_binary-armhf_Packages)

 

Edited by chrisf

Share this post


Link to post
Share on other sites

Hi Chris,

 

Thanks for your time and research.

 

I've checked the packages list for armhf on jessie and stretch repository (debian repos, not armbian).

The mongodb-server package is only listed on the jessie repository.

It should explain why with a brand new install of armbian stretch, I have missing dependencies.

 

Your HC1 is running armbian stretch or jessie ?

Would you go into production with this old package ?

 

Thanks

 

Share this post


Link to post
Share on other sites

Compiling Debian packages is a breeze, and since it only takes a couple minutes to create a fresh Armbian installation, you can just create one for compiling purposes. And, since Ubuntu Bionic already has an up-to-date package for mongo DB, I think the best option is to compile it for Stretch from the Bionic source package. Here is what I would do:

  1. Flash an Armbian Stretch image on a spare SD card, and boot my XU4 from it.
  2. Add the following line to /etc/apt/sources.list
    deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe

     

  3. Then, enter the following commands
    sudo apt-get update
    sudo apt install fakeroot
    sudo apt-get build-dep mongodb
    apt-get source mongodb
    cd mongodb*
    dpkg-buildpackage -us -uc -rfakeroot -j8

     

  4. If I didn't make any typo, and Stretch has the right dependencies in its repos, the commands above should compile for you a set of Stretch-armhf mongodb packages. Just copy them to an USB drive, and then install them in your production Armbian Stretch system.

Share this post


Link to post
Share on other sites
On 10/5/2018 at 12:57 AM, ark74 said:

Your HC1 is running armbian stretch or jessie ?

Would you go into production with this old package ?

It's still on jessie. I've had no reason to change anything. Jessie is still a supported version.

 

In terms of "go into production", it's an SBC in my garage...

Share this post


Link to post
Share on other sites

https://launchpad.net/~webupd8team/+archive/ubuntu/java

 

Now what? I crumped my odroid xu4 server, and went to reinstall my unifi controller software and this was what I was hit with. Somehow it installed openjava, but it isn't working the same.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0