Skip navigation

Tag Archives: Dreamhost

I recently purchased a UniFi UAP-PRO for my home wireless. I choose it because it is commercial grade hardware with good management software for a low price (comparatively). It then occurred to me that I could take advantage of my DreamHost VPS that I barely use to host the controller software so I don’t need to bother having it on any of my local computers. The EdgeRouter Lite makes it trivial to automatically point your access points to a place in the cloud with a given IP address, so the hardest part was going to be getting the software running on my VPS.

Once I got on a newer version of DreamHost’s VPS offering (I was on something running Debian 5 before I switched to one running Ubuntu 12.04), I had a bit of a rocky start. Some instructions I found online were outdated and had me install a very old version of the controller software. I was trying to import the settings I had done on my local controller so I didn’t have to set everything up again, and that import process wasn’t going to work out with that old controller software. I’ve got it working now, so I wanted to share the steps that worked for me so hopefully nobody else has to go through the pains I did.

Step One: Get a newer version of MongoDB

We’ll want to get a newer version than what is installed by default, so simply follow the instructions from MongoDB (version 2.4).

Step Two: Follow the release instructions to install the controller

As of this writing, 4.6.6 is the latest version. In the announcement thread for that version, search for “UniFi Controller APT howto”, and follow those instructions (skipping step two since we did that in step one from this blog post).

Step Three: Load our controller and import our config

I exported my local controller’s config (Settings -> Maintenance -> Download Backup Settings) before doing this next step. When we navigate to our server’s address (over https on port 8443), we’re given the option to import a config. Once we’ve imported it, the service will restart, and then we’ll be able to point our access points to our controller. Note: we can also create a completely new config.

Step Four: Set the Controller Hostname/IP

The last step is to open the Settings pane, clicking the Controller tab and entering the hostname or IP address of our controller.

It turns out that installing Raindrop is really hard. Here’s what I didtried to get it running on Dreamhost. Hope it helps anyone else who wants to play around with it, and I hope they can get further than I did.

Directory structure

In my home directory, I created a new folder called opt.
mkdir opt
You’ll also want to add the following lines to your .bashrc file:
export CFLAGS="-I$HOME/opt/include -L$HOME/opt/lib $CFLAGS"
export CXXFLAGS="-I$HOME/opt/include -L$HOME/opt/lib $CXXFLAGS"

I also created a sources directory, where I’ll be putting all of my source files in.
mkdir sources
We’ll want to be in the sources directory as we install everything.
cd sources

Installation Fun

Install python

wget http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tgz
tar xvfz Python-2.6.4.tgz
cd Python-2.6.4
./configure --prefix=/home/sdwilsh/opt/
make
make install

Install OpenSSL

After you get the source from a mirror and untar it, enter that directory, and run these commands:
./config --prefix=/home/sdwilsh/opt --openssldir=/home/sdwilsh/opt/openssl shared
make
make install

Install Erlang

Note: I had to bump my memory on my PS up to 304 MB (from 150 MB) in order for this to compile. I just doubled it, so you may be able to get by with less. This also takes a while to install.
wget http://erlang.org/download/otp_src_R13B02-1.tar.gz
tar xvfz otp_src_R13B02-1.tar.gz
cd otp_src_R13B02-1
./configure --prefix=/home/sdwilsh/opt/ --with-ssl=/home/sdwilsh/opt/
make
make install

Install ICU

wget http://download.icu-project.org/files/icu4c/4.2.1/icu4c-4_2_1-src.tgz
tar xvfz icu4c-4_2_1-src.tgz
cd icu/
chmod +x runConfigureICU configure install-sh
./runConfigureICU Linux --prefix=/home/sdwilsh/opt
make
make check
make install

Install autoconf-2.13

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz
tar xvfz autoconf-2.13.tar.gz
./configure --prefix=/home/sdwilsh/opt/
make
make install

Install Spidermonkey

Note: You many need to install Mercurial. I used easy_install to do.
hg clone http://hg.mozilla.org/releases/mozilla-1.9.2/
cd mozilla-1.9.2/
hg update -r FIREFOX_3_6b3_RELEASE
cd js/src/
autoconf
mkdir build-release
cd build-release
../configure --prefix=/home/sdwilsh/opt/
make
make install

Install libssh2

wget http://www.libssh2.org/download/libssh2-1.2.2.tar.gz
tar xvfz libssh2-1.2.2.tar.gz
cd libssh2-1.2.2
./configure --prefix=/home/sdwilsh/opt/ --with-openssl
make
make install

Install curl

After you get the source from a mirror and untar it, enter that directory, and run these commands:
cd curl-7.19.7
./configure --prefix=/home/sdwilsh/opt/ --with-libssh2=/home/sdwilsh/opt --with-ssl=/home/sdwilsh/opt
make
make install

Install couchdb

After you get the source from a mirror and untar it, enter that directory, and run these commands:
./configure --prefix=/home/sdwilsh/opt/ --with-erlang=/home/sdwilsh/sources/otp_src_R13B02-1/include --with-js-include=/home/sdwilsh/opt/include --with-js-lib=/home/sdwilsh/opt/lib --with-erlang=/home/sdwilsh/opt/lib/erlang/usr/include
make
make install

Note: I feel like I may have messed up how I installed erlang given the strange place it put its header files, but I wasn’t about to recompile it.

Change Permissions & Run

CouchDB suggests you create a new user for to run it is, but this is hard to do it seems, so I skipped it. I did change the permissions, however.
chmod -R 0770 /home/sdwilsh/opt/etc/couchdb
chmod -R 0770 /home/sdwilsh/opt/var/lib/couchdb
chmod -R 0770 /home/sdwilsh/opt/var/log/couchdb
chmod -R 0770 /home/sdwilsh/opt/var/run/couchdb

And now to run CouchDB:
couchdb -b
Sadly, this was taking something close to 500MB of memory. This is far to high for my server to sustain, so I haven’t gotten any further. If anyone has any ideas, I’d be glad to hear them.