Reply
Emerging Member
Posts: 126
Registered: ‎02-03-2016
Kudos: 546

Installing UniFi Video on CentOS7 as a service

[ Edited ]

Unfortunatly there are no packages/repo availiable for CentOS or other RPM based distributions so for UniFi I was able to use the DIY/Unix files to install UniFi on a CentOS system.

http://community.ubnt.com/t5/UniFi-Wireless/Installing-UniFi-on-CentOS7-as-a-service/td-p/1524666

 

I wanted to do the same/similar setup for UniFi Video.  So far I have everything running but I dont actually have cameras yet to test the thing with.  Im making some assumptions about where it actually stores the recordings.  I was not able to find that info anywhere.

 

A few notes about how this is setup:

Data is actually stored in /var/opt/UniFi-Video/data/ and linked to /opt/UniFi-Video/data/

Im using a dedicated 1TB drive for /var/opt/UniFi-Video/data/video

The service file is also located in /var/opt/UniFi-Video and linked in /usr/lib/systemd/system/

The service file just calls to a slightly modified unifi-video init.d script pulled from the Debian package.

 

Installing UniFi Video on CentOS7

 

UniFi-Video.png

 

Emerging Member
Posts: 126
Registered: ‎02-03-2016
Kudos: 546

Re: Installing UniFi Video on CentOS7 as a service

I just got a UVC-Micro delivered and was able to get any remaining bugs sorted out and everything is working great.  Motion capture, live feeds, camera placement/map layout.

 

I know its not "supported" to run UniFi Video on CentOS but it was not terribly difficult to get running because of the Java based achitecture UBNT is using for the UniFi controllers.

New Member
Posts: 1
Registered: ‎03-08-2017

Re: Installing UniFi Video on CentOS7 as a service

Please, can you tell me the donwload url for unifi-video?

Emerging Member
Posts: 126
Registered: ‎02-03-2016
Kudos: 546
New Member
Posts: 1
Registered: ‎05-19-2017

Re: Installing UniFi Video on CentOS7 as a service

Thanks for this!

 

Unifi was easier to work with, but I think I'm pretty close think to getting Unifi-Video working also.  The service won't start for me, status shows:

 

● unifi-video.service - UniFi Video
Loaded: loaded (/var/opt/UniFi-Video/unifi-video.service; enabled; vendor preset: disabled)
Active: active (exited) since Thu 2017-05-18 16:41:06 EDT; 1 day 1h ago
Process: 4240 ExecStop=/var/opt/UniFi-Video/unifi-video stop (code=exited, status=0/SUCCESS)
Process: 4300 ExecStart=/var/opt/UniFi-Video/unifi-video start --debug (code=exited, status=0/SUCCESS)
Main PID: 4300 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/unifi-video.service

unifi-video[4300]: at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
unifi-video[4300]: at com.google.inject.Scopes$1$1.get(Scopes.java:65)
unifi-video[4300]: at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
unifi-video[4300]: at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
unifi-video[4300]: at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
unifi-video[4300]: at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
unifi-video[4300]: ... 8 more
unifi-video[4300]: Cannot start daemon
unifi-video[4300]: Service exit with a return value of 5

New Member
Posts: 2
Registered: ‎06-07-2017

Re: Installing UniFi Video on CentOS7 as a service

Using the instructions at the start of this thread, I've been running 3.6.3 for a while on CentOS7, works well, thanks for the pointers.

 

Yesterday, I tried upgrading to 3.7.1 and that didn't work as expected.  When attempting to start the software, the log shows:

 

1) Error injecting constructor, java.lang.IllegalStateException: keystore intialization failure

 

Full log attached.

 

Has anyone else had success running 3.7+ on CentOS7?  Should I switch to using a docker container?  Which one?

 

Emerging Member
Posts: 126
Registered: ‎02-03-2016
Kudos: 546

Re: Installing UniFi Video on CentOS7 as a service

Emerging Member
Posts: 126
Registered: ‎02-03-2016
Kudos: 546

Re: Installing UniFi Video on CentOS7 as a service

I tried to upgrade to 3.7.1 and had the same problem.

My guess is that it has something to do with Open JDK vs Oracle JDK.
https://www.digitalocean.com/community/tutorials/how-to-install-java-on-centos-and-fedora
New Member
Posts: 2
Registered: ‎06-07-2017

Re: Installing UniFi Video on CentOS7 as a service

When installing the .deb on Ubuntu, does it work with OpenJDK?
Emerging Member
Posts: 126
Registered: ‎02-03-2016
Kudos: 546

Re: Installing UniFi Video on CentOS7 as a service

[ Edited ]

Hello,

I finally got some time and was able to get my install of Unifi-Video working again on CentOS.

 

There is an issue with the newest kernel that prevents UniFi-Video from running.  You must install an extra Java argument in the initilization script.  I already added it to my guide but here is the article:

https://issues.apache.org/jira/browse/DAEMON-363

 

To get the update to work correctly all the original files had to be extracted so its almost like a fresh instal.  Then you have to re-modify the initilization script but that also needed done because of the new kernel bug.

 

New Member
Posts: 17
Registered: ‎02-09-2017
Solutions: 2

Re: Installing UniFi Video on CentOS7 as a service

Do you have the latest url available for the unifi voip package?

Emerging Member
Posts: 44
Registered: ‎11-06-2017
Kudos: 2

Re: Installing UniFi Video on CentOS7 as a service

is there an up to date set of instructions for this thread?  I would love to get UniFi Video running on CentOs7! 

New Member
Posts: 3
Registered: ‎10-24-2017
Kudos: 1
Solutions: 1

Re: Installing UniFi Video on CentOS7 as a service

Hello,

 

I'm new to linux. Do i need the code below? I'm getting an error message on the second line. I only have one drive that is 4tb in size. 

 

dd if=/dev/zero of=/dev/sdb  bs=512 count=4
parted -a optimal /dev/sdb mklabel msdos mkpart primary 1 100%
Reply