Linux

Installing Apache Tomcat 6 and Solr nightly on Ubuntu 8.04

Getting Solr to play nice with Tomcat on Ubuntu was an interesting journey, I almost gave up entirely at one point. I'm compiling this how-to from tips I got from multiple websites. I'll try to make as complete a list as I can remember at the end of this post.

Screenshot upload script

I wrote up this script to take a screenshot and upload it to my webserver a while ago and I want to share it, so without further adieu, I give you ShotUp:

#!/bin/bash
## Screenshot Upload script
## by Justin Hayes

## variables
# screen capture delay
DELAY='2'
# screen capture quality
QUALITY='100'
# screen capture output format
OUTPUT='jpg'
# directory
DIR='/tmp'
# timestamp
TIMESTAMP=`date +%Y-%m-%d_%H-%M`
# hostname
HOST=`uname -n`
# remote user
RUSER='justin'
# remote host
RHOST='192.168.1.101'
# remote directory
RDIR='/var/www/justin-hayes.com/web/www/files/screenshots'
# web directory
WEBDIR='http://www.justin-hayes.com/files/screenshots'

## let's get down to business...
scrot -q $QUALITY -d $DELAY $DIR/screenshot_$HOST\_$TIMESTAMP.$OUTPUT

scp $DIR/screenshot_$HOST\_$TIMESTAMP.$OUTPUT $RUSER@$RHOST:$RDIR

firefox $WEBDIR/screenshot_$HOST\_$TIMESTAMP.$OUTPUT

Use the script by placing it in /usr/bin and calling the command shotup in the Gnome run dialog box or equivalent for other display environments. Please note that the upload will only work if you've setup SSH public key authentication.

Tags:

Followup on my web server

Just a followup on this post I made a little while back about my plans for replacing my web server. I replaced it about 2 weeks ago now and I am only now getting around to writing about it. What can I say? I've been busy.

I used old parts I had laying around because I really couldn't justify spending money on a new server at this point in time but still felt I needed it. This was a compromise. I ended up with this:

  • P4 2.6ghz with hyper-threading
  • 1gb (2gb soon) DDR-400
  • 40gb system drive
  • 160gb data drive

It seems like only a modest improvement over what I had before, but it is definitely noticeable. The improvement is most apparent with VMware Server, which I am using to host 4 virtual servers concurrently to handle other websites I host. I am still running my own sites on the hyper-visor.

The coolest thing about getting the new server though is that I now have a fully redundant backup in the old server. I use shell scripts and cron to keep the web root, Apache configuration, and databases synchronized.

Windows is not ready for the desktop

I don't know how many times I've seen people writing articles about Linux not being "ready for the desktop" and just wanted to bury my face in the palm of my hand. It's certainly ready for my desktop, it's ready for my father's desktop, my grandmother's desktop, your desktop too.

So when I read this "review" of Windows by an old associate from my Automatix days, I had a bit of a laugh, because this one is actually quite true. Go read it and get an idea what you'd have to go through if your laptop/desktop didn't come with any OS pre-installed and you had to install Windows yourself. And while you're at it, Digg it.

Tags:

The Hardy Heron has landed... on my server :)

Today I found out that you could directly upgrade from Ubuntu 6.06 Dapper Drake to 8.04. I know, I know... that should have been obvious given that they're both Long-Term Support releases. Anyway, moving right along... the instructions were found here and overall the whole process was very simple besides being constantly asked if I wanted to replace old config files with the newer versions. Looks like my concerns in this post were mostly moot, so far, no problems! *knock on wood*

Automatix is dead

Disclosure: I am a former member of the Automatix development team and primary web designer responsible for their web presence. Well, that was then, anyway.

While reading an old acquaintance's blog, I discovered what I feel should have happened a long time ago. The Automatix project is finally over, at least in it's current form. The official announcement says the remaining developers no longer have time to remain committed to the project, but I can't help but feel that they finally realized that their work is irrelevant, for all the reasons Iandefor listed. I certainly realized it, and so did most of the rest of the dev team, who left the project not long after I did. I won't get into all the politics that have gone on both behind the scenes and publicly in regards to Automatix. Most of it was petty anyway. I'm glad that they finally saw reason and decided to focus their resources on bigger and better things.

Some experiments with Lighttpd/FastCGI

I setup Lighttpd 1.4.18 with FastCGI support for PHP on my development server last night just to see if it's gotten any better since I last tried it. So far so good, at least setup and install went much better this time. Ubuntu has had Lighttpd in the repos since Dapper (although only Gutsy and Hardy are up to date.) Setting up FastCGI was easy this time around, I didn't get any server errors at all, although it's possible I only owe this to better understanding of the documentation. Just for kicks, I also installed eAccelerator, which is a PHP op-code cache that I've been using on my primary server for a few months along with some other performance tweaks (mostly various types of caching.)

To upgrade, or not to upgrade...

Those that follow Linux news will certainly know that Ubuntu 8.04 "Hardy Heron" is coming at the end of April. This release is a major milestone for Ubuntu, because it's the second Long Term Support (LTS) release, after 6.06 "Dapper Drake". That means they'll be keeping it up to date for 18 months as normal, but will provide security updates for 3 years on desktop installations and 5 years for servers.

For those wondering, yes, I do host my website on my own server and it is running Dapper. Previously I had made up my mind that I was going to continue using Dapper for the duration of it's support cycle mostly because it is proven and stable but also because it's a major hassle to upgrade. I'm reconsidering this for a number of reasons, but the main one is simply because I enjoy being on the bleeding edge, and a lot of things on my Dapper server are very out of date and won't ever be updated unless I can find backports, or compile programs myself, neither of which I want to do.