04-06-2016 03:44 PM - edited 07-02-2017 12:19 PM
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.
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.
04-15-2016 05:39 AM
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.
03-22-2017 10:39 AM
05-19-2017 03:02 PM
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)
unifi-video: at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
unifi-video: at com.google.inject.Scopes$1$1.get(Scopes.java:65)
unifi-video: at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
unifi-video: at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
unifi-video: at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
unifi-video: at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
unifi-video: ... 8 more
unifi-video: Cannot start daemon
unifi-video: Service exit with a return value of 5
06-07-2017 05:10 AM
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?
06-08-2017 07:27 AM
Did you follow the "Update" directions in the guide? I have upgraded several versions without having any issues.
06-08-2017 09:31 AM
My guess is that it has something to do with Open JDK vs Oracle JDK.
07-02-2017 11:55 AM - edited 07-02-2017 11:58 AM
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:
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.
10-16-2018 10:16 AM
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%