CentOS – Install Unifi Controller

Unos apuntes sobre la instalación de Unifi Controller bajo CentOS 5/6

1. descargar unifi controller

2. instalar open java jkde 6
[cc] # yum install java-1.6.0-openjdk
[/cc]

3. instalar mongodb 1.6.5
Instalar Mongodb en CentOS/

4. Descomprimir Unifi
[cc] # cd /root/
# unzip UniFi.unix.zip
# mv /root/UniFi /usr/local/unifi
# cd /usr/local/unifi/
[/cc]

5. Asegurarnos de que bin/mongod apunta a “whereis mongod”

6. Ejecutar
[cc] # java -jar lib/ace.jar start
[/cc]

7. Creamos el script de arranque/stop
[cc] # vim /etc/init.d/unifid
[/cc] [cc] #!/bin/bash
# chkconfig: 2345 95 20
### BEGIN INIT INFO
# Provides: UniFi Control Software
# Description: Use Java to start /usr/lib/unifi/lib/ace.jar
# to allow the wireless access point controlling
# software and provide device management
# to UniFi wireless network.
### END INIT INFO

ctrl_start() {
java -jar /usr/local/unifi/lib/ace.jar start &
}

ctrl_stop() {
java -jar /usr/local/unifi/lib/ace.jar stop &
}

ctrl_restart() {
ctrl_stop
sleep 1
ctrl_start
}

case “$1” in
start)
echo -n “starting UniFi controller”
ctrl_start
echo “service started”
;;

stop)
echo -n “stopping UniFi controller”
ctrl_stop
echo “service stopped”
;;

restart)
echo -n “restarting UniFi controller”
ctrl_restart
echo “service restarted”
;;

*)
echo “usage: service unifi {start|stop|restart}”
;;
esac

exit 0
[/cc]

8. Programamos el arranque
[cc] cat “/etc/init.d/unifid start” >> /etc/rc.local
[/cc]

Links
http://forum.ubnt.com/showthread.php?t=26684
http://forum.ubnt.com/showthread.php?t=40895

2 thoughts on “CentOS – Install Unifi Controller

Leave a Reply

Your email address will not be published. Required fields are marked *