I figured it out, how to install Unifi Controller on Rocky 9.
Going to post something better on my tech site but here is a summary
First install the legacy version of mongodb
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.24.tgz cd /usr/local tar zxvf ~/mongodb-linux-x86_64-3.4.24.tgz mv mongodb-linux-x86_64-3.4.24 mongodb
Then install some needed extras (not sure if needed but I installed them)
dnf -y install httpd mod_ssl java-1.8.0-openjdk
Next download and install unifi
cd wget https://www.ubnt.com/downloads/unifi/7.2.92/UniFi.unix.zip cd /opt unzip ~/UniFi.unix.zip useradd -r ubnt chown -R ubnt:ubnt UniFi cd /opt/UniFi/bin rm -f mongod ln -s /usr/local/mongodb/bin/mongod
Create a systemd startup file
sudo tee /etc/systemd/system/unifi.service<<EOF [Unit] Description=UniFi AP Web Controller After=syslog.target network.target [Service] Type=simple User=ubnt WorkingDirectory=/opt/UniFi 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 EOF
Finally start it and open up a firewall port
systemctl daemon-reload systemctl start unifi firewall-cmd --permanent --zone=trusted --add-port=8443/tcp firewall-cmd --reload
Works for me.
Weight: 344.8