Ubiquiti only officially supports installing the UniFi SDN controller on Debian and Ubuntu. If you prefer CentOS, the process to install the UniFi SDN controller is below.
Most of these commands must be run as root, so either log in as root or use sudo. |
Any commands starting with nano can be substituted with vi if nano is not installed. |
Install the EPEL repo
yum install epel-release |
Add a user account to run the controller
useradd -r ubnt |
Create the repo file
nano /etc/yum.repos.d/mongodb-org-3.4.repo |
Paste the contents into the file
[mongodb-org-3.4] name=MongoDB Repository #baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/ #hard-coded release number since there is not one for CentOS 8 baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.4/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc |
yum repolist |
yum install mongodb-org |
cd /tmp |
Go to the Java Manual Downloads page and get the URL for Linux x64 RPM. |
wget https://the-url-from-java-download-page |
yum localinstall jre-8u161-linux-x64.rpm |
Download the ZIP file
wget https://www.ubnt.com/downloads/unifi/[version]/UniFi.unix.zip |
Fill in [version] with the correct version number. ex. /unifi/5.11.50/UniFi.unix.zip |
Unzip the contents
unzip -q UniFi.unix.zip -d /opt |
Set the correct owner for the new files
chown -R ubnt:ubnt /opt/UniFi |
Create the startup script
nano /etc/systemd/system/unifi.service |
Paste the contents into the new startup script
# Systemd unit file for UniFi Controller # [Unit] Description=UniFi Controller After=syslog.target network.target [Service] Type=simple User=ubnt ExecStart=/usr/bin/java -Xmx1024M -jar /opt/UniFi/lib/ace.jar start ExecStop=/usr/bin/java -jar /opt/UniFi/lib/ace.jar stop SuccessExitStatus=143 [Install] WantedBy=multi-user.target |
Set the service to start on system boot
systemctl enable unifi |
Start the service
systemctl start unifi |
Open the web admin interface port
If your server is connected directly to the Internet, you should not open web admin ports for security reasons. Admin ports should be accessed through a secure channel, like a VPN. |
firewall-cmd --permanent --add-port=8443/tcp |
firewall-cmd --permanent --add-port=8080/tcp |
firewall-cmd --permanent --add-port=3478/udp |
Reload the firewall for settings to take effect
firewall-cmd --reload |
The address will be the FQDN or IP followed by the admin port, 8443.
https://192.168.1.100:8443 |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|