Friday, August 20, 2010

Bind for Logging

Talked to Rob and Nate, and both agree that to log internal web requests, setting up my own bind is the easy way to go, then set the router to set all internal machines to it via static dns on dhcp.

Installing was a snap (straight out of Synaptic), and it just worked, right out of the box. Logging wasn't turned on, but that took 5 mins. Don't need logrotate, as bind9 logging has that built in. Manually, I wrote a cut/sort/uniq/grep script, but I didn't have mail installed, (or the brainpower left at end of day), so the script will have to wait briefly.

I set the router's static DNS to this box, and by this morning, was getting requests from the XBox and Wii, as well as Wife's Macbook.

I added an entry to my crontab to generate the filtered list, putting it into ~/bin (for no real good reason). Given the size of it, I'll probably generate it nightly, but only mail it out weekly, and just poke around with adding things to the grep filter.

Installed first mailutils, then exim4, then mutt, then finally sendemail until the latter let me send email from the command line simply, without configuring an MTA. Configuring an MTA just isn't something I have the brainpower for tonight. Anyway, my ISP doesn't require authentication from within their network, so sendemail worked like a charm, after bzipping the file down, (apparently they have a size limit, or something?)

So crontab is setup to mail the log out weekly, and we'll see how it goes.

Thursday, August 19, 2010

Kicking Ivy out of Eclipse

To make Ivy-less operation easier, I:
  • Removed all of the jars from my development project in Eclipse
  • Created a directory (outside of the project)
  • Made symbolic links from that directory to my common jar path (i.e. "ln -s /usr/share/java/spring.jar ~/dist/project", etc.)
  • Added all of the jars to my Eclipse project in one operation (by clicking Add External JARs and highlighting all of the jars in that dir)
  • Scripted the creation of the symlinks, and added the script to SVN.
It might also be worth looking into how SVN handles symbolic links, which could make it feasible to add the symlinks into the projects as well.


Wednesday, August 18, 2010

Fixing a hosed GRUB

Full details (and years of old fixes) at:

Ubuntu Karmic:

make changes to partitions locations below
boot from cd/usb/network/yomomma
open terminal


sudo mkdir /mnt/fixboot
sudo mount -t ext4 /dev/sda5 /mnt/fixboot
sudo mount -t proc non /mnt/fixboot/proc
sudo mount -o bind /dev /mnt/fixboot/dev
sudo chroot /mnt/fixboot /bin/bash
sudo grub-install /dev/sda
sudo update-grub
sudo umount /mnt/fixboot/dev
sudo umount /mnt/fixboot/proc
sudo umount /mnt/fixboot

The first time around, it didn't find Windows, but after booting Ubuntu, ran update-grub, and it picked it up fine.

Tuesday, August 17, 2010

Rsync Notes

Couldn't get rsync to work. Message was "connection refused", among other things. Realized that rsyncd wasn't running on other box. Realized that RSYNC_ENABLE in /etc/default/rsync wasn't set. Set that.

It then complained about a missing /etc/rsyncd.conf file. Did a locate for it, and found a sample one in /usr/share/doc/rsync/examples. Copied that into place, and tried again. rsyncd would start, and rsync on the other box then connected to it, but complained about a missing module (I think). So I copied lines that looked interesting out of the sample ("ftp") module, and created "home", which is what my old original command was looking for.

That got me to a point where it would connect to the module, but was unable to read any of the files. Seems I added uid/gid lines, but left them set to nobody/nogroup, which didn't work so well. Changed them to my user/group, and things worked fine.

Update: Nate suggests using ssh public keys and rsync -auv, instead of the rsync daemon.

Monday, August 16, 2010

Dia Hassles

Upgraded Ubuntu to 9.10, and Dia got upgraded to 0.97. This update included a change to the file format for associations elements, (which breaks, which is fully unsupported/orphaned at this point), and apparently changed the default font, which skewed all of our diagrams.

So I removed 0.97, and pulled down the 0.96 .debs from, and installed them, but then Ubuntu kept asking to upgrade them, since it saw 0.97 out there in Karmic. So, taking a page from my angel upgrade, I edited /var/lib/dpkg/status, and removed the three 0.96 dia entries from that, and now I have 0.96 installed, but Synaptic doesn't know about it, and doesn't ask to upgrade it. Hackish, but it appears to work.