WiFi: HotSpot - UBNT Unifi Alternatif Instalasi

From OnnoWiki
Jump to navigation Jump to search

Sumber: http://community.ubnt.com/t5/UniFi-Updates-Blog/UniFi-2-4-6-is-released/ba-p/592033

How to perform the upgrade

For Debian-based system, simply do

sudo apt-get update
sudo apt-get install unifi
   

How to downgrade?

Make sure you have a backup of prior version. After downgrading the controller, you can downgrade the AP firmware.

Download

   UniFi Controller for Mac
   UniFi Controller for Windows
   UniFi.unix.zip (UniFi Zipped Package is provide for DIYers. See readme.txt for details.)

UniFi Controller APT howto

   edit /etc/apt/sources.list
   ## Ubuntu 
   deb http://www.ubnt.com/downloads/unifi/distros/deb/ubuntu ubuntu ubiquiti
   # if you're using quantal (12.04) or after, you don't need this line
   deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
   ## Debian Squeeze (6.0)
   deb http://www.ubnt.com/downloads/unifi/distros/deb/squeeze squeeze ubiquiti
   deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen
   ## Debian Lenny (5.0):
   deb http://www.ubnt.com/downloads/unifi/distros/deb/lenny lenny ubiquiti
   deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen
           
   add GPG Key
   # for Ubiquiti
   sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
   # or over HTTP. E.g. 'sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv C0A52C50'
   # for mongo-10gen
   sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
           
   update, install, and upgrade
   # retrieve the latest package information
   apt-get update
   # you can install / switch between them
   apt-get install unifi
           

UniFi API

A shell library, unifi_sh_api is provided with the release. here's a sample script to authorize a guest for 30 minutes

#!/bin/sh
## define required variables
username=admin
password=admin
baseurl=https://localhost:8443
site=default

## include the API library
. unifi_sh_api

unifi_login

# authorize a client for 30 minutes, limit down/up speed to 2048/1024kbps, quota is 500MB
unifi_authorize_guest "e8:17:22:10:5d:4d" 30 down=2048 up=1024 bytes=500 

# generate 10 voucher(s) valid for 60 minutes, limit down/up speed to 2048/1024kbps, quota is 500MB
unifi_create_voucher 60 10 down=2048 up=1024 bytes=500
# this returns you a token that you can call by using unifi_get_vouchers()

unifi_logout


Betulkan /etc/init.d/unifi

Open the init script - sudo vi /etc/init.d/unifi
Look for a variable called JAVA_HOME - :/JAVA_
Add -amd64 - A -amd64
Save and quit - Esc :wq
Restart unifi - sudo service unifi restart


Referensi