I’m pretty sure this is useless on most versions of Linux because the default DHCP plugin that comes with the Nagios Plugins distribution has this functionality and seems to work just fine everywhere except on RedHat-based distros like RHEL, Centos and Fedora Core. On these systems the default plugin does not seem to work and fails to detect any DHCP servers. This plugin is different to the one I gave instructions for before which tests whether a particular DHCP server is answering requests, this plugin finds rogue servers, it will not alert you if any of your actual DHCP servers are down. Hence, you should probably install both. This plugin is not very polished, it is rough and ready but I know it works on RHEL4. If you’re running a different system you may have to do some minor tweaks but this should serve as an excellent starting point none-the-less.

[tags]Nagios, DHCP, RedHat, RHEL, CentOS, Fedora, Linux[/tags]

Read more

Tagged with:

One of my current projects in work is to set up a Nagios install to monitor our network. We have been monitoring with the free version of BigBrother for a while now but BB isn’t as good so we’re switching to Nagios. I had plenty of problems getting Nagios running on RHEL 4 because in work we try to do as much as possible using only RPMs. I’m working on simple how-to for setting up Nagios on RHEL4 which I’ll publish here soon but the base install does not give you DHCP monitoring. I tried to look for RHEL rpms that provide check_dhcp but I couldn’t find any. There were lots for Fedora but they don’t work on RHEL (I tried FC4 and 5 rpms). I tried to manually build the latest version of the Nagios plugins which do contain a check_dhcp binary but there is a problem with that binary that results in it always showing your DHCP server as down. I know the problem is with the binary because if I watch the logs on the DHCP server I see it issuing an offer and tcpdump on my Nagios server shows the offer arriving, yet the plugin still insists that the service is down. The solution is to use this Perl script. However, if you follow the instructions on that page it won’t work on RHEL. I spent an entire day beating this script into submission but in the end I got it working.

[tags]Nagios, RedHat Enterprise Linux, RHEL, RHEL4, DHCP[/tags]

Read more

Tagged with:

I’ll hold my hands up now and say this will be a rant post. I’m annoyed. I’ve just wasted and entire afternoon at work because of pure and utter idiocy by the RedHat people. I don’t suffer fools well so that also adds to my annoyance 🙂 Read more

Tagged with:

I’ve previously done a guide on the right way of installing Tomcat 5.0 on the Mac but things are a little different on Linux so I figured I’d do another guide. This one is a little less advanced because it only covers running Tomcat as root and not as a non-root user. Depending on how busy I am in the next while I may or may not do a follow-up article on the additional steps needed to run Tomcat as a non-root user. I have tested this procedure on RHEL ES 4 with Tomcat 5.5.17 and the Sun JDK version 1.5.0_6 but it should be the same on all Linux distros and for all 5.X Tomcat versions, the only thing that is likely to change is the location of $JAVA_HOME. Correction, the startup script included is for Redhat based distros only (RHEL, Fedora, CentOS etc).

Read more

Tagged with:

Thunderbird 1.5 Released

Filed Under Computers & Tech on April 1, 2006 | Leave a Comment

I’ve just switched to Thunderbird 1.5 and I’m impressed. There is no real noticeable difference in the overall look of the app but there are some changes that really make it worth upgrading from 1.0. The most noticeable difference is that it now checks your spelling as you type rather than only doing it when you click send. This will save a lot of time and effort and gives Thunderbird the only thing that apple’s mail client had over it IMO. The other thing they have finally addressed is the interface for setting up multiple SMTP servers. Each account now has a simple dropdown menu for specifying what server to use which is a big improvement to the hoops you used to have to jump through in version 1.0.

Basically, if you haven’t upgraded yet, get cracking and if you are still using something ghastly like Outlook Express or Eurdora get switching now, you won’t regret it!

Tagged with:

I’m sure you know the feeling, you’re on a server, some form of excrement has just hit some kind of spinning thing and know that netstat will do what you want if only you could remember the bloody set of options you needed. Well, from now on I’m adding all those commands to this Blog entry so next time that happens I’ll know here to look!

This page will be continually updated but I’m gonna start with a few of those commands I’ve needed in the last few days that are currently stuck to my display in little yellow PostIt Notes.

What Processes are Listening on What TCP Ports

When you need to easily see what a server is serving in a hurry use:

netstat -lntp

Creating and Extracting tar.gz Files Just Using tar

I used to always create and extract tar.gz files by using both tar and gzip and sticking them together with a pipe (I’m sure that nasty Sun E450 was in some way to blame for me getting into that habit). This command was always long and I never remembered the syntax. So here’s the easy way to create a tar.gz archive:

tar -pczf name_of_your_archive.tar.gz /path/to/directory

(You should leave out the p if you don’t want to preserve the file permissions). And here is how to extract one:

tar -xzf file.tar.gz

Tagged with:

Following on from my last article about Breezy I’m afraid things have not gotten any better. KUbuntu is just broke! At first I thought the mac style control panel was really cool until I discovered that I can’t get into administrator mode on any of the dialogs. I click the button, enter the password, the border goes red, the panel goes blank, stays blank for some timeout period and then brings me back to the non-admin display. I can click that button all I want but I can never edit any settings that you need to be root for. Yet again not acceptable from a Linux that is supposed to be for "human beings".

Tagged with:

I’d read some good things about the Breezy Badger release of Ubuntu on Planet MiNDS> so I figured I’d give it a go. Simply put, I’m not impressed. Things started off bad when the installer messed up because it made retarded assumptions and now that it’s up and running it is still causing me trouble.

Why the Breezy Badger Install sucks

Firstly, the installer made two assumptions that resulted in me having to intervene and switch to a terminal to sort it out. That’s all well and good for seasoned Linux Users but is totally un-acceptable for a distro that makes a big deal out of being "Linux for Human beings".

Firstly, I find it retarded that the installer even tries to go online, but it does. Fair enough. Where things get really retarded is when it tries to go online WITHOUT ASKING IF YOU NEED TO USE A PROXY! It just sat there. I figured it would time out ….. 5 minutes pass ….. another 5 minutes pass …. I give up and switch to a terminal and kill the process. The installer recovers but skips some setup steps. It was all recoverable later but only with some vi editing and farting round on the command line. Again, no problem at all for a seasoned Linux user but a really big deal for Human Being like my mother!

Secondly Breezy decided that after it had detected my graphics card it should set the resolution, not to a safe number like Windows or OS X would do nor did it ask me what I wanted like Fedora does, nope, it just decided to set the resolution as high as the graphics card can go. Thing is my monitor can’t go as high as my graphics card so as soon as my machine re-booted after the install I got a blank screen when X started and a message from my monitor telling me it couldn’t handle what it was being fed. I fixed it by firing up a terminal and editing /etc/X11/xorg.conf but again, no average user is going to be able, or willing, to do that!

In summation, the installer could have saved me a lot of bother and made the whole experience more pleasant by asking me two simple questions:

  • Do you use a proxy and if so where is it?
  • What resolution would you like from this list your graphics card can handle?

These are simple things that would have made a huge difference and that the Fedora installer lets you do in a nice GUI. When it comes to installers, KUbuntu is FAR behind Fedora as far as the average user is concerned.

After the Installation

There are also two things that are really annoying me now that the system is installed. Firstly, I installed both FireFox and Thunderbird with apt yet when I try to open a link from within Thunderbird NOTHING happens. It’s not that it uses the wrong browser, it just doesn’t use ANY browser! I’ve been copying and pasting links all day and quite frankly it’s a real PITA!

Secondly, I can’t get the MS fonts from apt like I could on the previous release of KUbuntu. I’ve enabled all the repositories and I’ve tried every apt-cache search permutation I can think of and still no joy. It says there is a package that other packages refer to that does what I need but it can’t find the blooming thing!

On a less important note, Niall gave me exceptionally high hopes on the shinneyness of the GUI describing it as "OSX shinny" in his recent post about Breezy, but I was disappointed. It’s nice, very nice even and certainly nicer than the previous KUbuntu or the latest Fedora but it’s still far from OS X shinny I’m afraid.

Conclusion

If you are a Human Being and you want to use Linux, use Fedora!

Links

Tagged with:

This little guide is just a greatly padded out version of instructions I got from Misha but since we have quite a few Ubuntu users and quite a few Java programmers in MiNDS> this should come in quite useful.

Basically this is the Debian way of installing the Sun JSDK so that it can be managed with dpkg and hence easily upgraded or removed at a later date.

Firstly, since Ubuntu IS a distribution of Debian really I will just refer to Debian in these instructions but the instructions also apply to Ubuntu and in fact it was on Ubuntu that I tested this. Also, these instructions assume that you are logged in as a user who has access to root via sudo.

The way this will work is that we will use a Debian package called java-package to turn the binary Linux installer we get from Sun (or IBM and others too) into a proper Debian package (.deb) and then we will use Debian’s package manager (dpkg) to install that Debian package.

The first step in the process is to install the java-package program that will allow us to create the .deb file. To do this simply type:

sudo apt-get install java-package

If you are asked for a password it is for sudo and you should enter your own login password.

The next step is to go to java.sun.com and download the Linux binary installer for the JSDK that you want to install. DO NOT DOWNLOAD THE LINUX RPM FILE!

The next step is to use java-package to turn this binary file into a Debian package, to do this move into the folder where you downloaded the binary file from java.sun.com.

NOTE, if you are doing this in the college on your machine for your 4th year project you will have to copy the binary file to /tmp and work from there because local root does not have access to your NFS mounted home directory.

For this step you will need fakeroot, if you don’t have it installed install it with apt-get like so:

sudo apt-get install fakeroot

Once you have fakeroot installed and you are in the right directory start the packaging with the command (replacing file_from_sun.bin with the actual name of the file you got from Sun):

fakeroot make-jpkg file_from_sun.bin

This will now appear to run the Sun installer but rather than installing it into your system it is extracting it to a temporary fake root file system and then creating the .deb file from the files in that fake file system. During this stage you will be asked to agree to the Java license agreement.

When the above command completes (will take a few minutes) a .deb file will have been created in your current folder. This is the file that we will now install with dpkg as follows (replacing name_of_deb_file.deb with the actual name of the .deb file created):

sudo dpkg -i name_of_deb_file.deb

And hey presto you are finished, when ever you want to get rid of that JDK all you have to do is (replacing name_of_deb_file_without_The_extension with the name of the generated .deb file but with the .deb extension left out, e.g. sun-j2sdk1.5):

dpkg --purge name_of_deb_file_without_The_extension

You can then install a new JSDK in the same was as described above or just leave your system Java free (heaven knows why you’d do something mad like that!)

Tagged with:

« go back