Archive for the ‘Computing’ Category

Hackintosh

There’s a sizeable gap between Apple’s low end stand-alone desktop (the mac mini) and the next tier (the $2500 mac pro). I found that my current mini wasn’t keeping up with what I wanted to do. Textmate, passenger, a couple virtual machines and Photoshop were enough to send the machine, and it’s 3G of ram to it’s knees.

Therefore, I did what any person that can handle a philip’s screwdriver would do, I built a “Hackintosh.” A good set of parts, including a Core 2 Quad and 16GB of ram will cost about $900 if you shop the combo deals on Newegg. Also, while of dubious legality, it’s really easy to do.

This guide has all the information.

The only additional advice I have to add is to be patient while installing Snow Leopard. On my machine, it took an hour for the install to boot. Or four hours clock time as I continued to fiddle with the hardware and settings. So do yourself a favor and when you start the install grab a beer, relax for a bit, then come back and check on the progress.

  • Share/Bookmark

Ruby-Enterprise Edition, Fusion Passenger, and Nginx on Ubuntu Jaunty

I’ve got a 512MB Slicehost instance that I needed to launch a new Rails app (details coming soon). Since 512MB isn’t a whole lot of memory anymore, I wanted to optimize the services on this machine as much as possible.

The most efficient setup appeared to be running nginx, Passenger-Nginx, and Ruby Enterprise Edition. It was actually pretty easy to get all this running and would have been even easier had I followed the correct order of operations.

Nginx doesn’t support dynamically compiled runtime modules. Everything has to be built-in at compile time. Because of this, running:

$ sudo aptitude install nginx

will get you nothing useable besides the init script.

Instead, the best approach is:

  1. Install Ruby Enterprise Edition
  2. Install nginx-passenger
  3. Adjust paths
  4. Modify the /etc/init.d/nginx script
  5. Reinstall all gems for REE
  6. Tweak the nginx config
  7. Add nginxensite and nginxdissite scripts to make it more ubuntu-y

The first two steps are pretty self-explanatory and start with the directions found here. Of course, if you are installing nginx, you want to the following instead of the command for apache:

$ /opt/ruby-enterprise/bin/passenger-install-nginx-module

Next you want to tweak the ubuntu /etc/init.d/nginx script to reflect the new paths.

You need to change the two lines that read:

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/nginx

to

PATH=/opt/nginx/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/nginx/sbin/nginx

Next, you need to add the Ruby Enterprise Edition interpreter to your path. Open /etc/login.defs and update the paths settings with the location of Ruby Enterprise.

Installing gems is pretty straight forward. There are a few small tweaks to make to the nginx config file so that it works more like the ubuntu package.

At the top of nginx.conf add/change these settings:

user www-data;
worker_processes  4;
 
error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

In the http section, add:

    include /etc/nginx/sites-enabled/*;

Finally, it’s time to create the nginxensite and nginxdissite scripts:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
 
# nginxensite
 
if [ -z $1 ]; then
        echo 
        echo "You must specify a site name"
        exit 0
fi
 
NGINX_CONF=/etc/nginx
CONF_FILE="$1"
AVAILABLE_PATH="$NGINX_CONF/sites-available/$CONF_FILE"
ENABLED_PATH="$NGINX_CONF/sites-enabled/$CONF_FILE"
 
echo 
if [ -e $AVAILABLE_PATH ]; then
        ln -s $AVAILABLE_PATH $ENABLED_PATH
 
        echo "$1 has been enabled"
        echo "run /etc/init.d/nginx reload to apply the changes"        
else
        echo "$AVAILABLE_PATH does not exist"
        exit 1
fi

and

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
 
# nginxdissite
 
if [ -z $1 ]; then
        echo 
        echo "You must specify a site name"
        exit 0
fi
 
NGINX_CONF=/etc/nginx
CONF_FILE="$1"
AVAILABLE_PATH="$NGINX_CONF/sites-available/$CONF_FILE"
ENABLED_PATH="$NGINX_CONF/sites-enabled/$CONF_FILE"
 
echo 
if [ -e $ENABLED_PATH ]; then
        rm $ENABLED_PATH
 
        echo "$1 has been disabled"
        echo "run /etc/init.d/nginx reload to apply the changes"        
else
        echo "$ENABLED_PATH does not exist, ignoring"
fi

There you go, a working nginx install for your rails apps in less than an hour.

  • Share/Bookmark

VMWare reminds us of just what Beta is

Companies have been attaching the word “beta” without regard for the meaning of the word. Google is quite possibly the largest offender, affixing the “Beta” tag on software that works, is feature-full, and more production ready than many of their competitors final release offerings.

The VMWare Server team wants to fix the injustice to the word “beta” and bring it back to it’s roots. Therefore, the VMWare Server 2.0 is not very good. They’ve replaced the quite usable and responsive thick client that only works on Windows and Linux, with a buggy, unresponsive, slow-to update, web-client that only works in Windows. Huh? I thought the point of using the web is platform-independence. Apparently, VMWare wants to buck that trend as well.

Then you’ve got the hosting component. One of our VM’s kept crashing. The guest was Centos5. Thinking that it was just the guest os, we downgraded to Centos4, since the VM that is basically used for running queries was pretty stable. Nope, same problem. Apparently, it just has issues with a VM that needs to both read and write from a disk.

In an effort to be a good beta-testing citizen, I filled out a bug report, included some log files and sent it on it’s way. I got an email a few weeks later asking for more information. I dutifully ran the scripts they asked me to run. One of the commands told me to contact VMware support for an FTP account, since the generated information was too large for their webform. I emailed back, and I’m still waiting.

We’ve since downgraded to Server 1.04, in what might be a vain hope that since VMWare knows the traditional definition of “Beta,” they may know the traditional definition of “Production Ready.”

  • Share/Bookmark

Thoughts on MacWorld

Since my computer is hosed because I’m stuck installing Visual Studio (don’t ask), I figured I might as well add to the noise about Steve Jobs Keynote.

Yesterday at 12, we all packed into the conference room, hoping for a live video feed. Instead we watched the live blogging on macrumorslive.com. Overall, it was a total snooze. Little apps that should have been on the device anyway, for $20. A hard drive on a wireless router. A software update and price drop on what has been a sub-optimal device. No wonder the stock price started tanking. Hey Steve, if I want boring, I’ll get a PC.

The highlight of the announcement was the AIR. Besides having a really dumb name, it somewhat compelling. Not to long ago, I got it in my head that I wanted another sub-notebook to replace my nearly 4 year old Fujitsu-P2120. Unfortunately, the only devices available had crippled chips and cost over $2100. I can manage carrying around an extra pound to save a grand, and get more power and a larger hard drive as well. I could never figure out why a smaller machine cost so much more. The $1800 AIR brings this market segment to a more sensible range.

However, as far as light, somewhat durable machines with good battery life go, the bottom of the food chain is far more interesting. This year, we’ve seen 3 offerings of well functioning internet devices for $400 or less, the EEEPC, Ipod Touch. For “coffee-house computing,” which is all most sub-notebooks are really capable of, these make a lot more sense. Drop it. Spill coffee on it. That would really suck, but at least you have some money left in the wallet.

  • Share/Bookmark

Xine screw-up

For some bizarre and unknown reason, my Xine config on the multimedia pc just completely vanished. I blame the crappier power-grid in the city. It’s nowhere near as reliable as Alpharetta.

Anyway, this event resulted in a multi-night quest to get audio working again with digital out Like most things of this nature, it wasn’t a lot of configuration, but tons of googling to find the magic settings. The first bit wasn’t too hard. Modifying the Xine config file in /home/user/.xine/config to add:

audio.output.speaker_arrangement:Pass Through
audio.device.alsa_default_device:plug:spdif:0

restored audio output for both music files (mp3,acc,etc) and movies with an AC-3 audio track. The remaining bummer was audio files stuttered like crazy. Launching xine from the command line with xine --verbose=1 audio-file.mp3 displayed a lot of this on the console:

fixing sound card drift by -1998 pts
fixing sound card drift by -2545 pts
fixing sound card drift by -2999 pts
fixing sound card drift by -3306 pts
fixing sound card drift by -3538 pts
fixing sound card drift by -3709 pts

According to the official Xine FAQ, my soundcard (an on-board VIA 8237 mustn’t be very good and is not keeping track of sampling frequencies very well. While I don’t recall ever having this problem at my previous house, I did always think that audio was playing back faster than it should be. Either way, adding

audio.synchronization.force_rate:48000

resulted in a clean audio stream that’s at the same speed as my IPod.

  • Share/Bookmark

Vijedi is a disaster

It might not look it on the surface, but vijedi.net is a disaster. It’s come a long way from the days it was hosted on a abandoned Dell with 48 MB of RAM and a PII-233 processor. I’ve got a blog, a photo gallery, virtual hosts, source repositories, and until 2 days ago, email services all running on this box. Which is fine. Unless you have 18GB of storage. Right no, Vijedi.net needs 70GB, most of this resides on an external USB drive sitting on top of the server box. Adding to the infrastructure WTF, is that I wanted to do more with the box, and Patrick Vokerding, doesn’t publish Slackware releases often enough. Therefore, I have a bunch of core web-libraries compiled from source. Which makes them very hard to upgrade. Also, since I ran out of disk space, there all in very strange locations, which makes it hard, well to do anything at all really.

Most of the reason I haven’t fixed any of this in the last year is that vijedi.net is our primary mail box. However, since we’ve migrated all of that off onto a Zimbra install, I’ve finally got the time to take the whole thing down for a while and get it sorted out. Which is what I’m going to do. This is the last vijedi.net blog post for a while (not that I post that often anyway). I’m not sure how long it will take, there’s a ton of stuff to backup, restore and reconfigured. But itll be sane this time. Which of course, will make me very happy.

Later all, and see you in a few weeks!

  • Share/Bookmark

Zimbra Collaboration Suite

I finally bit the bullet, bought another box and started running mail functions for vijedi.net through Zimbra. Our reasons for this were pretty standard. Nobody wanted to use the webclient because it wasn’t responsive and felt very clunky. It was a webmail client that felt like a webmail client. Which made the client and it’s shared functions almost useless, since nobody used it, except in case of emergency.

Zimbra, on the other hand, fucking rocks (to borrow a phrase from a former colleague). The interface is Snazzy (capital S intended). It feels like a high quality desktop client. It’s responsive on an adequately powered machine, it’s clean looking, has really nifty threading support, and is easy to administer for basic tasks. It even has a lite client for access from slower machines. The lite client has all the same functionality, but without the Web 2.0 goodness like drag and drop adn no page refresh. You can’t ask for much more from a web mail client.

Zimbra, on the other hand, is built from the ground up to be Web 2.0. Using the web client feels a lot like using Mail.app and iCal.app on the Mac. It’s that simple.

The Zimbra install was surprisingly easy, as long as you pay attention to the directions and don’t try to install on OpenSUSE. All it takes is an clean install RHEL 4 or a clone. Vijedi.net uses Centos 4 instead of RedHat. Follow this with a download of Zimbra, un-pack, run the install script, and you’re good to go. The instructions are that solid and easy to follow.

Getting it running in production for me was a simple matter of updating my MX records. From start to finish, it was about 4 hours, including transforming the parts from Newegg into a computer.

We were able to migrate our old mailboxes with the imapsync utility. This was the second most difficult part of the process, since finding the right parameters took a bit of futzing. The most annoying part has been calendar migration. The wiki page for importing through the REST api is clear enough, but there’s no guidance on what to do if something goes wrong. Apparently, our old collaboration suite (Horde) exporting an iCal entry that Zimbra did not like. Now, according to my wife’s calendar, it’s her cousin’s anniversary every day of the year. And not only that, he got married in 0 AD! I couldn’t find a way to delete either the entry (that threw an error) or the default calendar. I posted to the Zimbra forums, so we’ll see how good the community support is. Otherwise, I might just have to grab the source and figure it out myself. Thankfully, java stack traces are pretty clear things.

Overall, I’ve been extremely pleased. It’s rare to have an install go as smoothly as this one and it’s a definite upgrade. I installed the open-source version of Zimbra. They have different versions with differing levels of pricing and features. You can’t really complain about the business model. The technology components that are based on open source or open standards are free. Things like Outlook integration and Blackberry integration are not. If you’re looking for an Exchange like solution, Zimbra is a far superior alternative.

  • Share/Bookmark

Installing Freevo on OpenSUSE

In my last post, I detailed the process of getting Freevo installed on Ubuntu. It actually wasn’t too bad, unless you wanted your Multi-Media PC to respond to an IR remote. This post is a quick overview on how to install Freevo on an OpenSUSE box. The details are once again left out, since each step is much better explained from the pages found in a google search.

  1. Install openSUSE
  2. Add the OSS and NON-OSS repositories to the software sources
  3. Add the Packman, Guru, and NVIDIA (optional) repositories
  4. Open the Yast software install tool. Install Freevo, Lirc, Xine, Mplayer, and DVD packages
  5. Search the web on how to install libdvdcss on OpenSUSE and follow those directions
  6. Configure Freevo
  7. Configure NVIDIA card for TV-OUT
  8. Configure Xine to play to the correct audio source
  9. Set $LIRC_MODULE correctly in /etc/sysconfig/lirc
  10. Configure lirc for freevo
  11. Configure LIRC and Freevo to start on boot
  12. Reboot
  13. Done.
  • Share/Bookmark
Return top

About

This is my blog about programming. For random stuff, checkout my Twitter or Tumblr