Thursday, May 8, 2008

Debian Linux for the Self Employed Java Developer

As a self employed Java developer, I have the pleasure and power of choosing my own tools. Of course, I also have to maintain them and become a part time system administrator. The maintenance of one's own machines and environment is at once the best and worst part of working for yourself. While I don't want to tell anyone what to do, I do feel compelled to share some of my hard earned lessons from time to time. Today, I want to share some information about why the Debian Linux distribution makes my life so good.

Debian Linux is widely known as one of the geeky, somewhat exclusive Linux communities. Many people are turned off by the snobby tenor of the Debian users. Ask a few dumb questions on the debian-users mailing list if you want to know what I mean. While this can be offputting, it should probably be taken as a sign of the intellectual talent of this community. These folks are mostly, at least it seems, system administrators who spend 24/7 thinking about what they want out of their operating system. Topping the list is stability and transparency, and Debian is cetainly both of these things. I NEVER have a machine crash and, once i have learned the Debian way, I am never surprised by what my system is doing. If you've ever considered Linux, or Debian, but haven't yet tried it out, here are some choice reasons to use Debian and tips for making it go smoothly.

Software Installation ( Reason #1 )

Debian comes with a "package manager" that handles installation of all software, as long as it is packaged in the .deb package. This "handling" includes full management of dependencies and deployment according to the Debian way. You can install ad hoc .deb packages, such as the Oracle XE .deb that you can download from Oracle ( it takes all of ten minutes to install Oracle on Debian, and . . . it just works; don't forget about Oracle password restrictions before you enter the admin password, it won't warn you! ). Or you can install packages contained in any number or repositories. Debian has it's own repositories of well tested versions of all kinds of software. You will find such things as Tomcat, Apache httpd, and Firefox in these, not to mention all of the system level software of a standard Linux distro. For developers, this means that when you find yourself needing xy or z, to get something running, you can just pull it down from repositories in the flash of an eye. Recently, I found that an ancient perl script that I was working with needed some perl module that I'd never heard of; I'm a Java developer after all. Sure, I can go do some research about perl, perl modules, and all of that jazz, and have the thing running by mid-afternoon, but with the Debian package management sytem and the Debian repos, I just search for the module and pull it down in like 10 seconds, then I'm back in busine$$. This happens something like once a day.

Reliability ( Reason #2 )

My machines never crash and never even really hang. I get twice the performance out of the same hardware that Windows was running on when I bought the machine.

Installation (Tip #1 ). It used to be that installing any Linux could be a bit trying. These days it's pretty much automatic. Here's some tips. Don't buy exotic and brand new graphics cards, ethernet or wireless cards. But I do mean exotic. Next, use Debian testing ( which is currently named "lenny", "etch" is the current stable ). Don't worry about the testing name, it's way stable, certainly for a development machine. The best way to do it is to use the net-installer that downloads the entire system off the internet. You can find all sorts of net-installer images, from CD to thumbdrive, on the Debian site.

If the installation has trouble detecting any of your hardware, try the weekly build of the installer, found on the same page.

The Debian Community ( Tip #2 ) There are kind of two communities these days. The more user friendly would have to be the Debian forums. As a developer, I go here. The other half of the community, though i suspect many people, myself included, migrate between the two, is the debian-users mailing list. If I know I'm in total n00b terrirtory with the topic, I hit the forums group. If I'm more knowledgeable and want more hardcore Debian-fu, I certainly hit the debian-users list first.

Java ( #3 ) Since Debian is committed to the real deal open source, they don't quite get along with Sun. As a by product of this, Sun's Java is not distributed with Debian. There is a Java implementation, but it's kind of funky. Eclipse won't run on it for some reason. I typically install Sun's Java as soon as I get my machine up and running. This requires only that you add a non-free repository to your list of repositories. Here's the line from my /etc/apt/sources.list file.

deb etch main contrib non-free

You can also work with the GUI based synaptic package management tool if you don't want to do the command line stuff here. With this repository in place, you can just pull down Sun's Java and there you have it.

1 comment:

Ben said...

Thanks for great information.
Web design