Chris Tankersley

· PHP Jack of All Trades ·

One thing that stops many people from trying Linux is that either they don't want to go through the hassle of dual-booting their machine and possibly loosing everything in the process, or that the ease of use with virtualization technology such as VMware and VirtualBox make non-commitment to an OS trivial. If one is serious about using an alternative OS, I think it's better to use it on a machine all by itself.

What better way to do that than to get a cheap computer, in this case an old iMac, and load Linux on it. While the process isn't exactly the same as doing this on an x86 PC, once the OS is loaded one gets a feel for how everything works. You'll also get the advantage of a real, multitasking OS instead of MacOS 9 or earlier.

Tools that we'll need:

Find an iMac

The first step is to get your hands on an older iMac PC. Very few *nixes work on what are called 'Old World' Macs, or ones that do not have OpenFirmware installed. These Old World Macs are generally pre-PowerPC processors that require so many work arounds just to boot from a CD that it isn't worth the time to install Linux on. They are also so slow that a modern OS won't be very usable.

Granted, most PowerPC-based iMacs aren't considered speed demons by today's standards, but they are more than enough to play around with Linux. I picked up a grape iMac for $25 at a school surplus sale, but eBay has many G3 iMacs for sale as of the date of this article.

What should you look for? Well, the first thing is to set your budget. Try to get as good a balance between RAM and CPU speed as you can. My test machine is a 266mhz G3 with 96 megabytes of RAM and a 25 gigabyte hard drive. This is more than enough for a command line system, but XFCE and Gnome run slow enough that multitasking becomes dodgy. Most of the systems for sale on eBay have at least 256 megabytes of RAM with 300mhz G3.

Install Debian

Since these instructions are for doing a single boot of only Debian, there won't be any preparations on getting Debian to work nicely with MacOS at all.

Download and burn the PowerPC port of Debian to a CD. Older iMacs may have a problem reading burned CDs, so burning to a music CDR may improve things. My iMac has never had a problem with any of the burned CDs I've used, so your mileage may vary. Once that is done, pop the CD into the iMac.

There are two ways to start the installation. You can either boot to the CD by holding down the 'C' key on the keyboard while you power on the machine, or boot into the OpenFirmware prompt. I did the second option. To boot into the OpenFirmware prompt, hold down the

  ok




0>

Now we just have to point to the CD-Rom and boot using yaboot with:

0 > boot cd:, \\install\\yaboot

The standard Debian install will pick up from there. Debian's installer is one of the nicer installers available, so even a novice user will be able to follow through all the prompts with nary a problem.

After the installation is finished, the CD can be removed and the machine will reboot. Depending on the exact system type that was installed, it may boot straight into GDM, which is a graphical login prompt. Log in, and start having fun!

Only running at 640x480 Resolution!

For me, the installation dropped me down to 640x480 resolution as my video card doesn't support 24bit graphics very well. Because of this I had to set Xorg back up correctly. To fix this, hit +

To fix the resolution problem, run:

$ dpkg-reconfigure xserver-xorg

to begin the Xorg setup. I took all the default values up unti it asked to set up the monitor. I selected the 'Advanced' option, took the default values from there, and selected 1024x768 and the two options below it. I also made sure to select the 15bit color option to make sure that the PC ran decently while in a graphical interface.

Once that is all finished, restart GDM with

$ /etc/init.d/gdm restart

and you should be at a higher resolution.

Posted on 2008-02-11

Comments


Coming off a series of articles on installing and configuring IPCop (Part 1, Part 2, Part 3), my attention now turns to actually monitoring and managing the network. One of the issues that will come up is 'Where did all my bandwidth go?' IPCop, as well as other *nix distros, include a program called iftop, which displays the bandwidth being used on an interface. While on individual machines this can be useful, it really shines on a router or gateway machine.

To install iftop, look no further than your distro's Package Management system. If you cannot find it there, you can download it from iftop's homepage at http://ex-parrot.com/~pdw/iftop/. You will need libpcap and ncurses installed if you download it straight from the website.

For basic usage, you can fire up iftop by simpling running the command 'iftop'. A screen will appear that displays the DNS-resolved addresses that are pushing traffic, the direction that the traffic is flowing, and the rates at which they are going. Most of the time this should suffice, but iftop takes a few command line switches as well:

-n

Don't do DNS lookups

-N

Don't resolve port numbers to names

-p

Run in promiscuous mode to see all traffic, not just what is directed at the interface

-p

Display ports

-b

Don't display bargraphs on the screen

-B

Display in bytes, not bits

-i interface

Watch the specified interface

-n

Don't do DNS lookups

While iftop is running, the following commands are available:

s, d

Aggregate all the source or destination traffic together

S, D

Toggle port display for source or destinations

t

Cycle through different display modes

P

Pause the display

o

Freeze the current display order (note, new flows will not be displayed)

j, k

Page through the hosts (useful when the order is frozen)

Hopefully this will give you a small insight into what traffic is actually moving in and out of your network and at what rate. Some of the previous tools that we've shown for IPCop are helpful to see where traffic is going, but now how fast on a connection-by-connection basis. iftop can easily fill in that information for you.

Posted on 2008-02-06

Comments


While splitting apart a website into discreet applications, I moved all the shared code to its own folder. While that isn't a hard thing to do, what does one do in a development environment where the shared files might be undergoing changes that you don't want other environments to see?

Set a custom include path!

In each of my Virtual Host sections, I added the following line:


<strong>php_value include_path '/path/to/my/include'</strong>

With a restart of Apache, each environment now looks to its own custom include folder.

Posted on 2007-12-28

Comments