Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Project record-actual ubnt Enterprise Wireless unifi Controller

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Preface

When the author worked in a supermarket two years ago, the enterprise hoped to introduce a distributed wireless system, so the author found that ubnt products can not only meet the demand, but also the price is very low, the bottom of the product is based on a simplified linux system, the product provides bash shell interface, can do secondary development.

This article refers to an article abroad, which will complete the installation and configuration of the controller of unifi products, and the product controller is the running environment of linux+java+MongoDB, so if you see this article, please collect it quickly, because this article will be a new source of wireless coverage for your enterprise, and you will save a lot of wireless coverage costs for your enterprise.

Product address: http://www.ubnt.com.cn/enterprise/

2. Practice part

2.1. Host information

Ipaddress=10.168.0.178

Hostname=unifi.cmdschool.org

2.2, YumSource and × ×

2.2.1. Add yum setup management tools and decompression software

Yum- y install yum-utils.noarch unzip

2.2.2. Install MongoDb

1) yum source address of MongoDB:

X86roomx64: http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/

I686: http://downloads-distro.mongodb.org/repo/redhat/os/i686/

2) install according to system type

Yum-config-manager-- add-repo= http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/

3) check the generated yum source

Vim Editor / etc/yum.repos.d/downloads-distro.mongodb.org_repo_redhat_os_x86_64_.repo

You can see the following:

[downloads-distro.mongodb.org_repo_redhat_os_x86_64_] name=added from: http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/enabled=1

Add the gpgcheck parameter (or it cannot be installed):

[downloads-distro.mongodb.org_repo_redhat_os_x86_64_] name=added from: http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/enabled=1gpgcheck=0

4) install MongoDB

Yum install-y mongo-10gen mongo-10gen-server

2.2.3. Install openjdk

Yum-y install java-1.7.0-openjdk

2.2.4. Download the source unifi controller source code

Download the installation package at http://www.ubnt.com.cn/download/

Select the zip version, and after obtaining the download path, directly command to download to the system:

Cd ~ wget http://7xj2zs.com2.z0.glb.qiniucdn.com/firmwares/UniFi_4.7.6_unix.zip

2.3, configuration part

2.3.1 、 step1

Configure MongoDB

/ etc/init.d/mongod startchkconfig mongod on

2.3.2 、 step2

Configure the source package

Unzip-Q UniFi_4.7.6_unix.zipmv UniFi / opt/

2.3.3 、 step3

Create a service script

Vim Editor / etc/init.d/unifid

#! / bin/bash# chkconfig: 2345 952 percent description: UniFi system# processname: UniFi ctrl_start () {# nohup java-jar JarFile.jar > myLogFile 2 > > myErrorFile&java-jar / opt/UniFi/lib/ace.jar start &} ctrl_stop () {java-jar / opt/UniFi/lib/ace.jar stop &} ctrl_restart () {ctrl_stopsleep 1ctrl_start} case "$1" in start) echo-n "starting UniFi system" ctrl_startecho "service started"; stop) echo-n "stopping UniFi system" ctrl_stopecho "service stopped" Restart) echo-n "restarting UniFi system" ctrl_restartecho "service restarted"; *) echo "usage: service UniFi {start | stop | restart}";; esacexit 0

Configure startup script permissions

Chmod 755 / etc/init.d/unifid

2.3.4 、 step4

Start the service and set up self-startup

/ etc/init.d/unifid startchkconfig unifid on

2.3.5 、 step5

Set up a firewall

1) query the open service port

Netstat-anp | grep java

2) Open the corresponding port

Vim Editor / etc/sysconfig/iptables

Add the following statement:

-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 8080-j ACCEPT-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 8443-j ACCEPT-An INPUT-m state-- state NEW-m tcp-p tcp-dport 8843-j ACCEPT-An INPUT-m state-- state NEW-m tcp-p tcp-dport 8880-j ACCEPT-An INPUT-m state-state NEW-m udp-p udp-dport 1900-j ACCEPT-An INPUT-m state State-- state NEW-m udp-p udp-- dport 3478-j ACCEPT-An INPUT-m state-- state NEW-m udp-p udp-- dport 5353-j ACCEPT-An INPUT-m state-- state NEW-m udp-p udp-- dport 10001-j ACCEPT

Temporarily understand the role of the following ports:

Tcp8080 / / java non-encrypted external web service port

Tcp8443 / / java encrypted external web service port

Udp10001 / / AP Discovery Port

3) restart the firewall

/ etc/init.d/iptables restart

2.3.6 、 step6

Browser testing

Http://10.168.0.178:8080

The operation of the above web page will not be described in detail, please refer to the official documentation or forum.

-

See the original text:

Http://www.charleslabri.com/installing-ubiquiti-unifi-controller-on-centos-6-x/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report