Author: Robbie D <firstname.lastname@example.org>
Date: Mon, 3 Jun 2019 22:26:04 -0500
Merge branch 'master' of ssh://lilly/home/git/notes
2 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/plan9.md b/plan9.md
@@ -0,0 +1,17 @@
+# Installing Plan 9 from Bell Labs
+## 1: About
+[Plan 9 from Bell Labs](https://9p.io/plan9/) is a strange sort of research operating system that I have been curious about for a long time. I don't know how I originally came across it, but it's the sort of thing that once you start seeing it, you start seeing it everywhere. Since it first came to my attention, it's been the sort of thing I think about every once in a while as something I'd like to install some day, just to play with.
+But like many weekend projects, the idea is there, but it gets pushed back by more important things, like home repairs, and spending time with other human beings. Other human beings... Hmm... If only there were some way to combine my desire to play with Plan 9, with my desire to play with other humans.
+Of course! The [Tildeverse](https://tildeverse.org/)! One of the best things about the tildeverse is people willing to try strange, new things. Maybe esoteric research operating systems? So I thought, wouldn't it be funny if there were a tilde server based on Plan 9? What would that be like? If nothing else, it would give me a chance to figure out how to use Plan 9, and would be more like the original intent of the OS, with multiple users connecting to shared services, rather than one user mucking about on a PC.
+So, since I already own the domain space-j.am (Yes, I'm one of *those* people), I thought it only made sense to make Plan 9 from Space-J.am! I also need to keep notes because I'm also *that* type of person. Hopefully, these notes will be useful to you!
+## 2: Installation
+Since I'm not particularly interested in hosting this thing in my house, I'll be using [Vultr](https://www.vultr.com/?ref=6986379) (Affiliate link), and my instructions will be specifically catered toward that platform. But they'll probably be similar enough to DigitalOcean or any other VPS provider you might be using.
+Since Vultr doesn't allow uploading through a web browser, and the official page distributes the ISO in a bzip, you will need to download it, unzip it, and host it somewhere.
diff --git a/ubiquiti-unifi.md b/ubiquiti-unifi.md
@@ -5,23 +5,42 @@ Created 2019-03-28
This may sound crazy, but believe it or not, I am an IT professional. But my home network doesn't really show that. I have a Dlink can router/ap running dd-wrt. DNS is managed by a pi-hole (That is also my dhcp server) but otherwise, I have crappy wifi, and a router that overheats and bogs down my connection.
-Well not anymore. I purchased a Ubiquiti EdgeRouter-X and Unifi acces point. Finally, I'll have some semi-professional gear. I've used Ubiquiti in the past and I must say it's very nice, and fairly easy to set up, espeically if you spring for the Cloud Key. In my home use case, I didn't really want to, so I wanted tory running it on my pi-hole, which just sits around doing nothing most of the day (and will still do nothing MOST of the day).
+Well not anymore. I purchased a Ubiquiti EdgeRouter-X and Unifi acces point. Finally, I'll have some semi-professional gear. I've used Ubiquiti in the past and I must say it's very nice, and fairly easy to set up, espeically if you spring for the Cloud Key. In my home use case, I didn't really want to, so I wanted to try running it on my pi-hole, which just sits around doing nothing most of the day (and will still do nothing MOST of the day).
+# The EdgeRouter
+This is probably easiest part of the whole thing. For such a simple deployment as my home, there's not much configuration to do. Drop all packets coming in, allow all going out. Use the pihole as a DNS and DHCP server. Not much to it. If you were looking for a more in-depth walkthrough of how to do this, I'm sorry but it probably wouldn't be as useful as [Ubiquiti's Beginners Guide](https://help.ubnt.com/hc/en-us/articles/115002531728-EdgeRouter-Beginners-Guide-to-EdgeRouter).
+# Installing Unifi on a Raspberry Pi 3
+## Setting it up
+Should be easy, right? Just follow the instructions for Debian, right? Well... Yeah, the first thing you need to do is install UniFi. I just grabbed the deb from Ubiquiti, because I don't much care for adding PPAs, &c. The install was fairly easy, `dpkg -i unifi.deb`, but that's where the trouble began.
+The service just would not start. And there were no error messages printed to the console. What to do?
-TODO: Setting up the ER-X
-Installing Unifi on pihole
-Setting it up
From [this post](https://loganmarchione.com/2016/11/ubiquiti-unifi-controller-setup-raspberry-pi-3/) I got the following:
# apt install oracle-java8-jdk -y
# update-alternatives --config java
-As of right now, I absolutely cannot get the service to work properly. I have tried editing /usr/lib/unifi/bin/unifi.init and setting the JVM_MAX_HEAP_SIZE and JVM_INIT_HEAP_SIZE variables, I have tried setting unifi.xms in system.properties (By the way, I don't know if I believe that doing anything in that file has any effect if it doesn't already exist), and nothing.
+Whether this helped or not in the end, I can't say. I continued using Oracle's Java instead of OpenJava, but I don't think it would matter.
+As of right now, I absolutely cannot get the service to work properly. I have tried editing `/usr/lib/unifi/bin/unifi.init` and setting the `JVM_MAX_HEAP_SIZE` and `JVM_INIT_HEAP_SIZE` variables, I have tried setting `unifi.xms` in system.properties (By the way, I don't know if I believe that doing anything in that file has any effect if it doesn't already exist), and nothing.
BUT there is a light at the end of the tunnel. If I create the jvm myself, Iit will run. I can do the following:
java -Xmx512M -jar /usr/lib/unifi/lib/ace.jar start
-The controller starts, and all is well! Not sure why I can't just make the unifi service create a usable jvm, but I'll try opening a ticket with ubnt tomorrow.
+The controller starts, and all is well! Not sure why I can't just make the unifi service create a usable jvm~~, but I'll try opening a ticket with ubnt tomorrow~~.
Extra thanks to osunifi at the community.ubnt.com forums. It was their comment about Java using too much memory that lead me to that command to start the JVM manually.
+# Final Thoughts
+I'd say don't do this... Even with my workaround above, the JVM crashes after a few hours (Maybe less? I actually don't check it frequently) so I'm currently living without a cloudkey. That's fine, since nothing changes in my environment, but I have no monitoring or insight into my WiFi.
+If you want a UniFi setup in your home, I'd say just buy the damn cloudkey or put it on a server with a minimum of 2GB of RAM.
+ubiquiti-unifi.md | Last Edited 2019-04-25 | Cleaned up some of the sections and added final thoughts.