Sunday, June 23, 2013

get that google monkey off my back

It seems that email is too much of a pain in the ass to host yourself, but we can at least host our own contacts and calendar with CardDAV and CalDAV servers  These are two of the most important cloud-based phone features, if not some of the most sensitive.

OwnCloud is the option I went with.  I've been itching to do something with lil turbo ever since I got her put back together, and this is the perfect thing for it.

This is the sort of service I would contend ought to be isolated in a VM, so I installed virtualbox.  To this point, I had been keeping the Debian install on lil turbo headless, but creating a VM with vboxmanage is a pain, and I couldn't even think of a way to install the OS in the guest without a GUI, so I installed openbox - which was completely painless - and immediately fell in love with it.  I created the VM, installed a minimal Debian, and set it up:
  1. aptitude install vim htop nmap
  2. Edit /etc/vim/vimrc, uncommenting most lines
  3. Edit /etc/bash.bashrc and add the aliases I rely on
The folks at OpenSuse package ownCloud in a .deb repo, which is incredibly convenient - all you have to do is edit sources.list and add a key.

Aptitude found two conflicts, with libgd2-noxpm and apache-mpm-worker.  The first resolution that aptitude gave me was the one I went with, which involved uninstalling the noxpm package and not installing the apache one.  It seems to have worked ok.

After the install completes, open a browser and go to http://[serveraddress]/owncloud to begin configuration.  This is how everybody should do it - it's extremely convenient.

I had a warning about the .htaccess file being inaccessible, which I was able to resolve by editing /etc/apache2/sites-enabled/000-default - change the AllowOverride option inside the <Directory /var/www> block to be All instead of None.

Create an admin account and a database account.  You get a few options if you click "Advanced".  I left the DB option on SQLite, figuring for a small, single-user webapp, it shouldn't matter much.  SQLite is awesome for many use cases, but it doesn't have the performance of an in-memory database, which you would need if you were going to do much more with your ownCloud installation.

And that's about it!  Now ownCloud is installed and ready for you to set up!

Tuesday, May 7, 2013

upgrade debian squeeze to wheezy, cowboy style

DISCLAIMER: If your system is important, i.e. if destroying it would cause you to lose money or sleep, stop reading this and go follow the complete instructions.

Recently, the folks over at the Debian Project decided it was time to move the testing channel, Wheezy, up to become the new stable release.  Making the move requires making a bunch of changes to the OS, so I figured it would be a good time to make a bunch more.  (Full instructions from the Debian Project, which I used as a starting place for this guide.  Also, this guy's blog post helped me wade through the extraneous instruction a bit.)

Initial steps were simple.  Open sources.list and replace occurrences of squeeze with wheezy:

vi /etc/apt/sources.list

If, like me, you had backports added to squeeze, you'll need to take note of the new URL format for wheezy backports.  A simple S&R won't cut it here.  The new format looks like this:

deb wheezy-backports main contrib non-free

Of course, remove contrib and non-free if you don't want to use any packages that aren't free software (or require non-free software to function).

I didn't back up anything, because the system I'm upgrading isn't important, but if your system is important, back some stuff up.  This is a pretty big update, and all sorts of things could go wrong, so, once again, if you care about the contents of your hard disks, go do it right.

Typically I would mentally :%s/apt-[a-zA-Z]/aptitude/g, but the big guide seemed a bit preferential toward apt-get, so I went with that for the instructions here.

apt-get update
apt-get upgrade

Not too bad.

apt-get dist-upgrade

Oh god, this thing wants to install so many packages.  At this point I considered backing out and just running off the wheezy repos, leaving the system as is.  But this system was newly installed in February, so I decided to take the plunge.  I'll just uninstall all that junk later, assuming I don't trash the install completely.

This took a long time, probably because the Debian servers are getting slammed.

After an age, I got a fullscreen prompt relating to a change in mdadm.  It wants to know if you need a filesystem on the RAID to boot, which seems like it would usually be a bad idea, but I don't know what kind of constraints people work under.  My box does have a RAID array, but it boots from a filesystem on a different disk, so I changed the value in the text field here from "all" to "none".  I selected "yes" to the next question, on whether to start all arrays after boot.

Towards the end of installation, I was seeing output for initramfs, and my desktop background turned this scary error-shade of green.  May have had to do with using the background slideshow, I'm not sure.

My bash.rc had been edited, and the maintained version had changed, so I was asked to do something about it.  I took the "open a shell" option and copied out my modified version so I could merge it back with the new version later.

After the dist-upgrade completed, as you might expect, Gnome went nuts.  The shut down prompt that opened had Unicode Squares of Confusion instead of text; I gambled on the farthest left button and was greeted with a black screen telling me I had won - the system was rebooting.

It came back with a new and exciting Grub background.  I chose the older 2.6 kernel and booted.  A couple of warnings, nothing that looked too serious, and then an empty black screen.  Waited here for 10 minutes, and then rebooted into recovery mode.

Looking around a bit, I found about what I had expected - X didn't boot properly.  /var/log/Xorg.0.log told me what I needed to know - the kernel I was using was too old.  Time to uninstall that old kernel anyway.  Farewell, Linux 2.6.32, you've treated me well.

aptitude remove linux-image-2.6-686 linux-image-2.6.32-5-686

Next installment: I think I accidentally ran an aptitude install ubuntu.