Wednesday, February 12, 2014

Installing Ubiquity's UniFi wifi controller server on gentoo

The process for installing the UniFi controller software on Gentoo is pretty simple, thanks to the work done by the github user travisghansen.

Add an xml file containing this:

<?xml version="1.0" ?>                                                                                                    
<repositories version="1.0">
        <repo priority="50" quality="experimental" status="unofficial">
                <name>chaos</name>
                <description>Chaos.</description>
                <homepage>https://github.com/travisghansen/chaos/</homepage>
                <owner>
                        <email>travisghansen@github.com</email>
                </owner>
                <source type="git">git://github.com/travisghansen/chaos.git</source>
        </repo>
</repositories>

to /etc/layman/overlays, say as "chaos.xml". The .xml is important by the way!


Then simply sync your layman overlay list, add the overlay and emerge the package.

layman -S ; layman -a chaos ; emerge unifi

Optionally, you can modify the port that the server listens on by editing  /var/lib/unifi/data/system.properties .

I set my ports as such:
unifi.http.port=80 
unifi.https.port=443


Update: script form

mkdir -p /etc/layman/overlays/
cat <<EOF >> /etc/layman/overlays/chaos.xml
<?xml version="1.0" ?>
<repositories version="1.0">
    <repo priority="50" quality="experimental" status="unofficial">
       <name>chaos</name>
       <description>Chaos.</description>
       <homepage>https://github.com/travisghansen/chaos/</homepage
       <owner><email>travisghansen@github.com</email></owner>
       <source type="git">git://github.com/travisghansen/chaos.git</source>
   </repo>
</repositories>
EOF
layman -S ; layman -a chaos ; emerge unifi
cat <<EOF >> /var/lib/unifi/data/system.properties
unifi.http.port=80
unifi.https.port=443
EOF