Linux/Unix/BSD
Information and reviews on Linux, UNIX and BSD operating systems
Unix is a multi-user, multi-tasking operating system that was initially developed by Bell Labs in the 1970s. Various similar operating systems that are POSIX compliant (ie compatible with Unix) have since been developed (POSIX is an abbreviation for Portable Operating System Interface for UNIX). These include the following: the BSD family (OpenBSD, FreeBSD, NetBSD, Mac OS/X), Solaris, IRIX, AIX, SunOS, UnixWare, OpenServer and Linux.
Software written for POSIX compliant operating systems is generally able to be compiled for all POSIX platforms with little or no platform-specific changes. This makes the commands and utilities available for this extended family of operating systems very similar, and there are few differences between administering them.
The articles in this section are about useful command line utilities and commonly used application software on POSIX compliant operating systems. For Mac OSX specific articles see my OSX section.
Post sort order: Post Date (Newest First) | Post Date (Oldest First) | Alphabetical | Date Updated
How to configure the "limit results" with Nagios
Posted November 14th, 2012 in Linux/Unix/BSD
The list of services being monitored in Nagios is limited by default to 100 and there's a drop down box to change it to 50, 100, 250, 1000 or All. I personally perfer to just show all instead of having to page through the data, and this post shows how to configure the limit results drop down in Nagios.
Failed to add the host to the list of known hosts
Posted November 13th, 2012 in Linux/Unix/BSD and OSX
I recently reinstalled the operating system on my MacBookPro and discovered when trying to SSH into a new server for the first time I was getting the error "Failed to add the host to the list of known hosts (/Users/chris/.ssh/known_hosts)." This post shows what I needed to do to fix them problem.
Ignore existing files or update only newer files with rsync
Posted November 12th, 2012 in Linux/Unix/BSD
Rsync is a useful command line utility for synchronising files and directories across two different file systems. I recently needed to use rsync to only copy over files that did not already exist at the other end, so this post documents how to do this.
Enable and disable init scripts on Debian
Posted October 24th, 2012 in Linux/Unix/BSD
I can never remember how to enable init scripts on boot on Debian so this is a quick self-reference post for enabling and disabling them using the defaults.
Recursively download files using FTP with ncftpget
Posted October 15th, 2012 in Linux/Unix/BSD
I very occasionally need to support people with websites on servers other than those I manage. If the server is only accessible using FTP and I need to get a copy of the entire website, then I use the ncftpget command line tool to recursively download all the files and directories in one go.
Fix Argument cannot be null, Parameter name: path on Nginx/Mono
Posted September 3rd, 2012 in Linux/Unix/BSD
When migrating a mono application / web service running on one server to a new server I got an error telling me that the "Argument cannot be null" and "Parameter name: path". This post shows the full error message and the additional configuration options that needed to be set to fix it.
configure: error: You need to install g++
Posted September 1st, 2012 in Linux/Unix/BSD
While setting up mono/fastcgi for a customer on their RHEL 6 server at AWS, I got the error "configure: error: You need to install g++" when trying to configure mono. I'd already installed gcc and there didn't appear to be a g++ to install. This post shows the error and the simple solution.
No package 'mono' found when configuring xsp
Posted August 31st, 2012 in Linux/Unix/BSD
While setting up mono/fastcgi for a customer on their RHEL 6 server at AWS, I got the error "No package 'mono' found" when trying to configure xsp. This post shows the error and the simple solution.
Setting the user agent in Lynx
Posted August 16th, 2012 in Linux/Unix/BSD
Lynx is a command line web browser which I often use for checking the behaviour of redirection headers and content types in a web page's http headers. The previous post showed how to get the headers with Lynx and this post how to set the user agent.
Getting HTTP headers with Lynx
Posted August 16th, 2012 in Linux/Unix/BSD
Lynx is a command line web browser which I often use for checking the behaviour of redirection headers and content types in a web page's http headers. This first post shows how to get the headers and the second post how to set the user agent.
How to tunnel port 25 with SSH
Posted August 7th, 2012 in Linux/Unix/BSD
If you're a web developer like me who needs to test sending emails from a development version of a website, but your ISP blocks port 25 outbound, then it's possible to set up a "tunnel" via SSH. You then send mail to port 25 on localhost and it actually sends the mail from the server at the other end.
Fix the timezone data on CentOS
Posted May 17th, 2012 in Linux/Unix/BSD
I've had an annoying issue on some CentOS 5 virtual machines where I set the timezone to Pacific/Auckland and it doesn't work. This post shows the error and then how to rebuild/reinstall the timezone data.
Which version of CentOS or RHEL is running?
Posted May 1st, 2012 in Linux/Unix/BSD and Quick Tips
The uname -a command will tell you which kernel version of Linux is running but doesn't give you any information about the distribution or distro version number. This quick tip shows how to do this for CentOS / Red Hat Enterprise Linux.
Recursively upload files via FTP using NCFTPPUT
Posted April 3rd, 2012 in Linux/Unix/BSD
If you have a lot of files to upload to a website and the only access is via FTP then you can use a nice GUI tool to just drag and drop the directory, or you can use the command line ncftpput tool.
"Error opening terminal xterm-color" on Mac OSX Terminal
Posted January 27th, 2012 in Linux/Unix/BSD and OSX
If you are connecting to a remote server from the Mac OS X terminal and get the message "Error opening terminal: xterm-color" when doing certain operations on the remote server, then you either change your terminal's declaration setting or add a TERM declaration to the bash profile on the server at the other end to prevent the error message from happening. There may be other ways to solve it at the server end but this post shows a quick and easy fix.
Moving application data on *nix with minimal downtime
Posted October 6th, 2011 in Linux/Unix/BSD
There may be times on a *nix box when you start to run out of space on a particular partition for a particular app. This post shows a fix that can be applied by moving some of the data to another partition with a minimum of downtime. The next post shows a real world example I experienced recently with Postgres.
Literal tab character on the command line on Linux BASH
Posted September 23rd, 2011 in Linux/Unix/BSD and Quick Tips
So you need to put a tab on the command line when using BASH on Linux, Mac, BSD? How to do it? The tab character is usually used for command completion etc so typing in a tab won't render one on the command line.
Change the timezone on CentOS
Posted September 14th, 2011 in Linux/Unix/BSD and Quick Tips (Updated May 17th, 2012)
I recently needed to set up a CentOS 5 box and completely forgot how to set the timezone. There's apparantly a nice easy text GUI for doing it in RHEL but I couldn't find the same thing on the CentOS box so here's how to do it. It should also work for most Linux systems.
Using find to locate all zero length files
Posted August 4th, 2011 in Linux/Unix/BSD and Quick Tips
A little while ago I posted how to use the Linux/Unix/OSX find command to locate files bigger or smaller than a particular size but didn't cover how to find zero length files. This is shown here.
Test validity of email address from the command line with exim
Posted June 17th, 2011 in Email Servers and Linux/Unix/BSD
While trying to troubleshoot why email wasn't being delivered to one of my mail aliases on a new server this morning, I discovered a nifty little trick for testing the deliverability of an email address using exim from the command line.
Clear the bash history
Posted May 17th, 2011 in Linux/Unix/BSD
When entering commands in a bash shell each command is stored in the history which is written to the .bash_history file when logging out. This post shows how to clear the history for the current session, and how to clear all commands completely from the history.
Using find to locate files bigger or smaller than a size
Posted April 14th, 2011 in Linux/Unix/BSD (Updated April 15th, 2011)
The find command is really useful for locating files and directories etc on *nix and Mac. I recently needed to find all files greater than 1MB but it wasn't all that clear how to do this from the find man page so I've written this post to show how to do it.
Download a sequence of files with curl
Posted April 4th, 2011 in Linux/Unix/BSD
In the past to download a sequence of files (e.g named blue00.png to blue09.png) I've used a for loop for wget but there's a simpler and more powerful way to do the same thing with curl.
Remove all .svn directories
Posted March 11th, 2011 in Linux/Unix/BSD
If you've been using Subversion for revision control and no longer want to use it (for example if you've moved to another revision system like git) there are a whole bunch of .svn directories you'll need to get rid of. This post shows how to remove them from the command line on Unix based systems like Linux and Mac OSX.
Set the timezone on Debian 5 Lenny
Posted December 30th, 2010 in Linux/Unix/BSD
I'm always forgetting how to set the timezone on a Debian 5 Lenny server when I set up a new one so this quick post is for future reference...
Subversion Command Line Script to export changed files V2
Posted July 9th, 2010 in Linux/Unix/BSD
I recently posted a Subversion Command Line Script to export changed files and in response to a comment on that page have posted a new version here, which writes out the current revision number to a file and only exports from that revision when the script is run again.
Check if user is root/sudo before running a script
Posted July 5th, 2010 in Linux/Unix/BSD
Sometimes a script may need to only be run as root or using sudo, or run ensuring that it is not being run by root or using sudo. This quick post shows how to check if it's the root user and exit the script.
Find all symbolic links with the find command
Posted June 25th, 2010 in Linux/Unix/BSD and Quick Tips
This quick tip shows how to find all the symbolic links under a particular directory using the "find" command from the command line on UNIX based systems such as Linux, OSX and BSD.
Subversion Command Line Script to export changed files
Posted June 17th, 2010 in Linux/Unix/BSD (Updated July 9th, 2010)
A couple of days ago I posted how to export just the added/modified files from a subversion repository between two revisions using TortoiseSVN, the Windows Explorer SVN plugin. This post has a command line script which is used to achieve the same thing and means it can be run from UNIX based systems from the CLI.
Install dos2unix/fromdos on Debian 5
Posted May 31st, 2010 in Linux/Unix/BSD
dos2unix/fromdos is a Linux/Unix command line tool to convert line endings in a text file to Unix line endings. This post is here to help remind me in the future when I need to install this tool which package it is in. It also includes the unix2dos/todos utility which converts the other way.
Prevent /etc/resolv.conf being overwritten on CentOS
Posted March 22nd, 2010 in Linux/Unix/BSD
This post is more of a reference for myself rather than anything else to solve an issue I was having with DNS lookups on a CentOS machine. It's how to prevent the /etc/resolv.conf file being overwritten when the system restarts if you have a custom configuration you don't want changed.
Which directory is that bash script in?
Posted February 21st, 2010 in Linux/Unix/BSD
There may be times when you need to know the actual location a BASH script is located within the script. This can be done with a combination of the $0 value and the dirname command.
How to update the GeoIP.dat file on Debian 5
Posted August 16th, 2009 in Linux/Unix/BSD
As part of looking at geotargeting with PHP and GeoIP the other day I posted how to enable the PHP GeoIP functions on Debian 5. Unfortunately there doesn't seem to be any way to update the GeoIP.dat file automatically with more up to date IP address mapping so this post shows how it can be done manually, and provides a BASH script for automation.
How to enable the PHP GeoIP functions on Debian 5
Posted August 13th, 2009 in Linux/Unix/BSD and PHP
The geoip_* PHP functions utilise the GeoIP library from Maxmind to geolocate IP addresses to country names. These functions are not enabled by default and this post shows how to enable them for PHP 5 on Debian 5.
Fix the "call to undefined function curl_init" error in PHP on Debian
Posted April 17th, 2009 in Linux/Unix/BSD and PHP
If you call the curl_init function in PHP and do not have the curl module installed you will get the error message "Fatal error: Call to undefined function curl_init() in /path/to/script.php on line XY". This post shows how to install the PHP curl module on Debian Linux and the instructions should also work on all Debian derived distros such as the Ubuntu family.
Fix the "call to undefined function ImageCreateFromPNG" error in PHP on Debian
Posted April 10th, 2009 in Linux/Unix/BSD and PHP
If you call the ImageCreateFromPNG function (and similar image processing functions) in PHP and do not have the GD module installed you will get the error message "Fatal error: Call to undefined function ImageCreateFromPNG()" error message. This post shows how to install the PHP GD module on Debian Linux and the instructions should also work on all Debian derived distros such as the Ubuntu family.
Debian FTP server hangs on list
Posted March 30th, 2009 in Linux/Unix/BSD
I've recently moved from a CentOS web server to Debian and was able to succesfully use an iptables firewall script that I'd used on CentOS previously, but as with an earlier experience with CentOS my firewall settings were preventing directory listings etc when connecting to an FTP server (VSFTPD in my case). This post looks at the change that is needed to get FTP access working correctly through the firewall on Debian to prevent the FTP connection from hanging.
Install APC for PHP on Debian 5 Lenny
Posted March 26th, 2009 in Linux/Unix/BSD and PHP
I have recently moved from hosting on a CentOS box to Debian and needed to install PHP's APC opcode cache on it. I've posted about how to do this before on a CentOS box which is a very manual process and now add this post to install APC on Debian which is much easier.
Changing exim4 settings with Debian 5 Lenny
Posted March 23rd, 2009 in Linux/Unix/BSD
Exim4 is a mail transfer agent for sending and receiving emails on a server. This post looks at how to change the major configuration options on Debian 5 Lenny, which incudes how to allow remote delivery of emails to avoid the "Mailing to remote domains not supported" error.
Changing the default message of the day with Debian 5 Lenny
Posted March 19th, 2009 in Linux/Unix/BSD
When you first log in to a default install of a Debian 5 Lenny machine from the command line you'll be greeted with a message like "The programs included with the Debian GNU/Linux system are free software...". This is controlled by the "message of the day" file. This post looks at how easy it is to change this so you can get rid of the default text.
Install PHP IMAP on Debian
Posted March 16th, 2009 in Linux/Unix/BSD and PHP
If you are getting the "Fatal error: Call to undefined function imap_open()" error in PHP when using the IMAP functions then they are not installed with your installation of PHP. This post looks at how to install the PHP IMAP functions on Debian and should also work for Ubuntu/Kubuntu/etc and other Debian derived Linux distros.
Decompress a bzip file to a different location
Posted February 20th, 2009 in Linux/Unix/BSD
The bzip2 command line tool decompresses .bz compressed files. By default it will delete the original file, naming it the same as the original filebut without the extension and keep it in the same directory as the original file. This post looks at how to write it out to a different directory and/or with a different filename.
Error processing command with SVN on a Samba server from Windows
Posted February 15th, 2009 in Linux/Unix/BSD
SVN is a revision control system. If you are running SVN on a Linux/Unix machine, sharing it via Samba, and accessing it from a Windows machine with TortoiseSVN you may get the error message "error processing command 'committed' in ... can't move" when trying to commit files to SVN. This post looks at how to solve the issue.
How to tell the version of Samba running
Posted February 11th, 2009 in Linux/Unix/BSD
Samba is a free re-implementation of the SMB/CIFS networking protocol which creates a compatible way of sharing files with Windows computers on Linux and BSD computers. This post looks at how to tell which version of samba is running on the server from the command line.
Install PHP IMAP on CentOS
Posted February 5th, 2009 in Linux/Unix/BSD and PHP
If you are getting the "Fatal error: Call to undefined function imap_open()" error in PHP when using the IMAP functions then they are not installed with your installation of PHP. This post looks at how to install the PHP IMAP functions on CentOS and should also work for Red Hat Enterprise Linux (RHEL), Fedora and other derived Linux distros.
Run scripts at system startup on Linux
Posted January 26th, 2009 in Linux/Unix/BSD (Updated March 20th, 2009)
This post looks at how to run additional scripts or applications at system startup / system boot up on Linux.
SUSE 11.1 Released
Posted December 19th, 2008 in Linux/Unix/BSD
SUSE 11.1 has been released and includes more than 230 new features, improvements to YaST, major updates to GNOME, KDE, OpenOffice.org, and more freedom with a brand new license, Liberation fonts, and openJDK. This is also the first release built entirely in the openSUSE Build Service.
Nagios trends.cgi not found error
Posted December 5th, 2008 in Linux/Unix/BSD
When trying out the Nagios server monitoring software on a CentOS machine using the Fedora Quickstart documentation to install it, I was getting "The requested URL /nagios/cgi-bin/trends.cgi was not found on this server" errors when accessing the Reporting -> Trends function. This post looks at the solution.
List installed packages with YUM
Posted December 2nd, 2008 in Linux/Unix/BSD (Updated June 26th, 2009)
This post looks at how to list the installed packages with YUM from the command line for YUM based Linux distributions, such as CentOS and Fedora.
Installing subversion on CentOS
Posted November 30th, 2008 in Applications and Linux/Unix/BSD
Subversion (SVN) is a version control system. This post looks at how to install subversion on CentOS (the process is similar for other Linux distros) and the setting up a repository.
Add the RPMForge custom repository to CentOS
Posted November 27th, 2008 in Linux/Unix/BSD
The RPMForge custom repository has a lot of useful software applications for CentOS and Red Hat Enterprise Linux which aren't included in the default repositories. This post looks at how to enable it.
Fedora 10 released
Posted November 26th, 2008 in Linux/Unix/BSD
Fedora 10 was released today and is available for immediate download. The post summarizes the release notes, hardware requirements etc.
Ubuntu 8.10 (Intrepid Ibex) Released
Posted October 31st, 2008 in Linux/Unix/BSD
Ubuntu 8.10 codenamed Intrepid Ibex was released today along with the other official Ubuntu derivitives including Kubuntu and Xubuntu.
Run a cron command every 15 minutes
Posted October 30th, 2008 in Linux/Unix/BSD
Cron is a time based scheduling service on Linux and Unix computers which allows you to run process at specific times for example once a day, once every hour and so on. This brief post looks at how to run a cron command every 15 minutes.
Download Crossover Office today for free
Posted October 29th, 2008 in Applications and Linux/Unix/BSD
For today only you can download Cross Over Office for free. Head over to codeweavers.com right now to get your free serial number for either CrossOver Mac Pro, CrossOver Games Mac, CrossOver Linux Pro OR CrossOver Games Linux.
Change the window title in Putty
Posted October 16th, 2008 in Applications and Linux/Unix/BSD
Putty is an SSH/telnet/etc client which allows you to connect to remote servers such as a Linux or BSD webserver. When you change directories etc in a terminal shell the window title in Putty is likely to change, depending on the shell's settings. This post looks at how to change the Putty window title to be what you want and how to prevent it changing as you change directories.
Fix UTF8 characters displaying in Linux man pages
Posted October 14th, 2008 in Linux/Unix/BSD
Man pages on Linux and other *NIX operating systems document how commands work. I've often noticed in a default install on Red Hat based distros that odd UTF characters display such as  and â and these can obscure the meaning of the information in the manpage. This post looks at how to make these weird UTF8 characters display normally in Linux manpages.
Bash shell becomes inactive on Ctrl+S
Posted October 9th, 2008 in Linux/Unix/BSD
If you've ever accidentally hit Ctrl+S in the Bash shell it appears to come inactive and no matter what you do no output is echoed and nothing appears to be happening. This post looks at how to make the shell active again.
Sysmon init script
Posted October 5th, 2008 in Linux/Unix/BSD
Last week I added monitoring to a customer's SMTP mail server using sysmon and posted about a couple of errors I had when installing sysmon (undefined reference to yywrap error and Errors compiling sysmon 0.92.2 on CentOS 64 bit). This post contains my init script for automatically starting sysmon at system startup. I'm posting it here for future reference in case I need to install sysmon on another machine in the future.
Errors compiling sysmon 0.92.2 on CentOS 64 bit
Posted September 28th, 2008 in Linux/Unix/BSD
Yesterday I looked at the undefined reference to yywrap error when compiling sysmon. That particular error occured when I was compiling sysmon 0.92.2 on a 32 bit CentOS machine. When I went to compile it on the production server - a 64 bit CentOS machine -I got a different error. This post looks at the other error and how I fixed it.
undefined reference to yywrap error when compiling sysmon
Posted September 27th, 2008 in Linux/Unix/BSD
I needed to add some monitoring of one of my customer's mail servers and compiled sysmon on a CentOS Linux machine to do the monitoring. When compiling sysmon I got the error message "undefined reference to `yywrap'". This post looks at the full error message and the solution.
New Zealand daylight savings starts on Sunday
Posted September 26th, 2008 in Linux/Unix/BSD and PHP
The dates that New Zealand daylight savings starts and ends changed in New Zealand last year and it caused a lot of issues with many servers and desktop computers which hadn't had updates made available in time for the change. Daylight savings starts this Sunday in New Zealand on Sunday September 28th and I thought it a good idea to check the servers I manage are all correct and ready to handle the changeover.
Argument list too long when copying/deleting/moving files on Linux
Posted September 13th, 2008 in Linux/Unix/BSD
If you do a lot of command line stuff in Linux, sooner or later you'll come across the "argument list too long" error when copying, moving, deleting, listing etc files in a directory that contains a lot of files. This post looks at a couple of ways of solving this problem.
Using nohup to prevent processes stopping on disconnect
Posted September 2nd, 2008 in Linux/Unix/BSD
A long running process running on a Unix/Linux command line may stop running if you lose your SSH session. Using the "nohup" command will allow the command to keep running if you lose your connection or need to logout. This post looks at how to do this.
Test if a file exists with the BASH shell
Posted August 27th, 2008 in Linux/Unix/BSD
Often when shell scripting with BASH you need to test if a file exists (or doesn't exist) and take appropriate action. This post looks at how to check if a file exists with the BASH shell.
10 essential tricks for Linux admins
Posted July 24th, 2008 in Linux/Unix/BSD
Vallard Benincosa posted 10 essential tricks for Linux admins over at IBM's developer works a couple of days ago. This is normally the sort of post I'd just link to in my weekly roundups but there are so many useful things in there I need to be able to locate the post easily so I've created this post for that purpose.
Can't mount NFS share on Ubuntu/Kubuntu
Posted July 20th, 2008 in Linux/Unix/BSD
I set up a new Kubuntu 8.04 machine the other day and needed to mount an NFS share from another machine. I was surprised to get the "wrong fs type, bad option, bad superblock..." error when I tried to mount the share because it was working fine when I connected from another machine. This post looks at the reason for the error and the very simple solution.
How to enable mouse wheel scrolling in Kubuntu under VMWare
Posted July 18th, 2008 in Linux/Unix/BSD and VMWare
I've just set up a new VMWare virtual machine with Kubuntu 8.04 and the scroll wheel on my mouse didn't work. The steps to correct this are pretty simple and are covered in this post. This should work for any Ubuntu/Kubuntu variant when running in VMWare.
Switch off sound notifications in Fedora 9 KDE
Posted July 15th, 2008 in Linux/Unix/BSD
After installing the KDE 4 edition of Fedora 9 into a VMWare Server virtual machine, I kept getting "audio playback device PulseAudio does not work". There was no sound device installed into this virtual machine so I would have expected Fedora to be clever enough to not bother with sound notifications but no, it persisted and I would sometimes see two to three of these messages stacked up as phonon falls back from one to the other. This post looks at how to switch off sound notifications on KDE 4 on Fedora 9.
Delete a file starting with a dash/hypen on Linux on the command line
Posted July 6th, 2008 in Linux/Unix/BSD
So you have a file that starts with a dash/hyphen/- and need to delete it. But when you try to do so, the "rm" command complains that you have passed an "invalid option --". This post looks at the simple solution to deleting a file that starts with a dash/hyphen.
File failed to download with Fedora jigdo - completed with rsync
Posted May 15th, 2008 in Linux/Unix/BSD
Fedora 9 was released this week and I created my CD and DVD ISO images using jigdo. When creating the x86_64 DVD image jigdo failed to download one file named "Fedora-9-comps.xml" and couldn't complete the creation og the DVD ISO file so I resorted to using rsync to finish the job off. This post looks at the error message and the solution I used.
Fedora 9 Released
Posted May 14th, 2008 in Linux/Unix/BSD
Fedora 9 was released on May 13th 2008. You can buy Fedora 9 from the Linux CD Mall and this post highlights some of the changes and features of Fedora 9.
Change download mirror for Fedora when using jigdo
Posted May 13th, 2008 in Linux/Unix/BSD
With the release of Fedora 9 I have discovered that Fedora CD and DVD ISO images can be updated using jigdo like Debian and Ubuntu can. (I have posted about jigdo in the past, including how to use jigdo-lite, create CDs from a DVD with jigdo, and create multiple ISO images with jigo-lite). When creating the new images, the Fedora jigdo settings use download.fedoraproject.org to get the files; this server automatically redirects you to a geo-targeted local mirror. If for some reason you need to specify a particular server, or a local repository instead, it is possible by editing the .jigdo file. This post looks at how to do this.
logwatch "postdrop Illegal seek" and "sendmail queue file write error"
Posted May 4th, 2008 in Email Servers and Linux/Unix/BSD
logwatch is a daily process for reporting and analyzing log files and I recently started getting errors on one of the CentOS Linux machines I manage and no daily report. The particular machine gets thousands of bounced emails per day and the mail log files get very large. logwatch had been reporting to me every single bounced email message so the report emails had got very large before stopping altogether. This post looks at the error messages I got and what I did to fix the problem.
Stop logwatch reporting on a particular service on CentOS
Posted May 3rd, 2008 in Linux/Unix/BSD
logwatch is a system log analyzer and reporter which emails daily reports about information in the system log files in /log. On CentOS and Red Hat Enterprise Linux this is usually configured by default to email the root user on a daily basis with the results from the log analysis. This post looks at how to stop logwatch from reporting on a particular service, for example sendmail and postfix.
Reverse Mapping Checking - Possible Break-in Attempt Error with SSH
Posted May 2nd, 2008 in Linux/Unix/BSD (Updated August 23rd, 2010)
When you connect to a host using SSH or SFTP it does a series of checks to ensure you are connecting to the host you are expecting to connect to. One of these is a reverse lookup on the IP address to check the hostname is the same as the hostname you are connecting to. If it's not, you'll get an error message like "reverse mapping checking getaddrinfo for ... POSSIBLE BREAK-IN ATTEMPT!". The post looks at a solution to this message.
Ubuntu 8.04 Released
Posted April 25th, 2008 in Linux/Unix/BSD
Ubuntu 8.04 was released on Thursday 24th of April 2008, which is today (Friday) New Zealand time, along with the related projects: Kubuntu, Xubuntu, Edubuntu and Ubuntu Studio. Ubuntu is probably the world's most popular Linux distribution and each six monthly release is eagerly anticipated. You can buy Ubuntu and the others from my Linux CD Mall website. Thanks to offering it up for pre-order earlier in the week, it has skyrocketed up my "Most Popular" list for April, in 2nd place after Knoppix.
Directory listings slow with ftp server and CentOS
Posted April 23rd, 2008 in Linux/Unix/BSD (Updated October 10th, 2009)
I recently installed the VSFtpd FTP Server onto a CentOS box and have a fairly tight firewall setup script using iptables. When I logged in to test it and issued an "ls -l" command it took a really long time for the driectory listing to come back. At first I thought it wasn't going to show the directory listing at all but it finally did. This post looks at the solution to the problem.
Zenwalk Linux Live 5.0 Screenshots
Posted April 9th, 2008 in Linux/Unix/BSD
Zenwalk Live 5.0 was released on March 25th 2008, following the Zenwalk 5.0 release of January 8th 2008. Zenwalk's default desktop environment is based on Xfce, which is now at version 4.4.2 and can be seen in the Zenwalk Live screenshot thumbnails shown below. I have posted Zenwalk Live screenshots on the Linux CD Mall today and you can view the full sized screenshots there.
Modifying the Linux Grub boot loader's options
Posted April 5th, 2008 in Linux/Unix/BSD
One of my Linux CD Mall customers emailed me the other day with a Linux annoyance: "The computer always booted into Linux by default if I wasn't quick enough to stop it. Most annoying. I would have preferred the computer to wait until I told it where to boot but could not find a way of doing that. All of the Linux distros that I tried just take over without being asked." This post looks at how you can change the grub boot loader's settings to solve this issue using a text editor. And I agree with him, it is annoying how the boot loader is often set up by default to boot into Linux too quickly.
genisoimage/mkisofs "Incorrectly encoded string" error
Posted April 4th, 2008 in Linux/Unix/BSD
While creating some ISO images for backup purposes earlier this week, I got the error message "Incorrectly encoded string" and "Possibly creating an invalid Joliet extension" when using genisoimage/mkisofs to create the image.
Knoppix 5.3.1 Screenshots
Posted April 2nd, 2008 in Linux/Unix/BSD
Knoppix 5.3.1 was released on March 28th 2008, and is the first Knoppix release since January 2007. You can buy Knoppix 5.3.1 from the Linux CD Mall and I have also posted screenshots of Knoppix 5.3.1 at the Linux CD Mall today.
Create multiple ISO images with jigo-lite
Posted March 18th, 2008 in Linux/Unix/BSD
Jigdo is a tool for creating ISO images from a jigdo and template file, and files from multiple sources including previous release CDs or DVDs and FTP. I've written a few posts about jigdo now and this one looks at how to create multiple ISO images in one hit using the jigdo-lite command line tool. The example uses the recent Debian 4.0r3 i386 release.
Checking daylight savings settings on Linux
Posted March 13th, 2008 in Linux/Unix/BSD
The date daylight savings starts and ends changed in New Zealand last year, but unfortunately there was only a few months between when the decision was made and when it happened and the updates to the timezone databases on various Linux distributions wasn't done in time in many cases. This affected many servers and services which displayed the wrong time for the couple of weeks between when daylight savings actually started and when it would have in previous years.
Create CDs from a DVD with jigdo
Posted March 11th, 2008 in Linux/Unix/BSD
jigdo allows you to create new ISO images from a jigdo file and template file, and files from your local filesystem, a CD/DVD and/or from remote sources. If you have a DVD image for the current release of Debian, for example, you can then create CD images from this using jigdo without having to download anything other than the jigdo and template files. This can be useful if you already have a DVD or DVD ISO image and need to install Debian onto a machine that only has a CD-ROM.
Unknown partition table error
Posted March 7th, 2008 in Linux/Unix/BSD
After re-partitioning a hard drive by removing all existing partitions and creating a single primary parition which takes up the entire disk, I formatted it as ext3, mounted it at /mnt/hdh and copied all the ISO images across from the exsting ISO drive. I rebooted, pausing to swap the disk over to a different cable, and got the error message "hdb: unknown partition table".
Checksums do not match, image might be corrupted error with jigdo
Posted March 6th, 2008 in Linux/Unix/BSD
After creating the 2nd DVD ISO image for Debian 4.0r3 amd64, I got the error message "ERROR: Checksums do not match, image might be corrupted!" I didn't see the point in running jigdo-lite again as it would presumably cause the same issue, so instead used rsync to synchronise the full ISO file against one on an rsync mirror. This post looks at the error messages and the rsync command and output used.
SUSE Linux 10.2 DVD Differing MD5SUMS
Posted March 5th, 2008 in Linux/Unix/BSD
A couple of days ago I needed to download the SUSE Linux 10.2 i386 DVD. This is an older release now but one of my customers needed it. I had the md5sum on file and was surprised after downloading it that it didn't checksum. I then used rsync to check the file against what was on two different mirrors and it still didn't checksum correctly. I then download the MD5SUMS file from one of the mirrors and discovered the md5 checksums in the file on the mirror were different from what I had on file.
Slax 6.0.2 Released
Posted March 4th, 2008 in Linux/Unix/BSD
Slax 6.0.2 was released on March 3rd 2008 as a bugfix update to the Slax 6.0 branch; the original Slax 6.0 release was on February 11th 2008. You can buy Slax from the Linux CD Mall and I have also posted screenshots of Slax 6.0.2 at the Linux CD Mall today.
How to use jigdo-lite
Posted February 29th, 2008 in Linux/Unix/BSD
jigdo is a method of downloading CD and DVD images over the Internet (and other large files) and is used by Debian and Ubuntu when new releases are created. jigdo files contain a list of the files that need to be included in the new CD or DVD ISO image and you can get the files from local sources and over the Internet. This means when you want to create ISO images for updated versions of Debian, you only need to download the changed files. This saves both bandwidth and and time. This post looks at how to use the jigdo-lite command line tool to create a new DVD ISO image for the most recent Debian 4.0r3 release.
How to install jigdo on CentOS and RHEL
Posted February 27th, 2008 in Linux/Unix/BSD
I create CDs and DVDs for my Linux CD Mall website on a CentOS 4 machine, and create the new ISO images for Debian using jigdo. This is the first of several posts which will look at jigdo, and looks at how to install jigdo on CentOS and Red Hat Enterprise Linux, because the necessary package is not included in the default software repositories.
Public key not installed error when installing from Dag RPM Repository
Posted February 26th, 2008 in Linux/Unix/BSD (Updated June 29th, 2009)
The Dag RPM Repository contains a collection of RPM packages for Red Hat Enterprise Linux, CentOS, Fedora and others which are not included in the base installation/libraries for those Linux distributions. If you get an error message similar to the one shown below when attempting to install an RPM package from the Dag RPM Repository, then you need to install the Dag GPG keys:
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 6b8d79e6 Public key for jigdo-0.7.3-1.el4.rf.i386.rpm is not installed
Saving time and bandwidth by creating a DVD image from CD ISO files
Posted February 21st, 2008 in Linux/Unix/BSD (Updated October 11th, 2010)
A little while back I did something stupid and deleted a lot of files from a hard drive array, including a few hundred Linux and BSD CD and DVD ISO images. I had a large number of these archived to disc and have been able to re-download most of the other stuff I need easily enough, but there's always the challenge to download the replacements as quickly as possible and using as little bandwidth as possible (bandwidth is still pretty expensive here in New Zealand).
In the case of a distribution like CentOS, each release comes on a number of CDs or alternatively a single DVD. The contents of each are fairly similar, and there are a number of mirrors around the world which support downloading using rsync, as well as the more standard ftp and http methods.
It suddenly struck me one day that I should be able to simply concatenate the contents of the CDs into one great big file, and then rsync it against an rsync server. It will contain a fair amount of start and end stuff not on the DVD, but assuming the contents are in a relatively similar order on the discs then the amount needed to download to make the DVD image correct should be less than having to download the whole thing.
md5sum: only one argument may be specified when using --check
Posted February 20th, 2008 in Linux/Unix/BSD
I burn CDs and DVDs for my Linux CD Mall website on a CentOS 4 machine and use md5sum checksums to ensure that the ISO images have downloaded correctly from the http or ftp server or via bittorrent. I store each ISO files's md5sum in a separate .md5 file and use the md5sum command's -c flag to check the contents are valid.
Changing the default text editor on Linux
Posted February 16th, 2008 in Linux/Unix/BSD
The default command line text editor on Linux (and BSD varaiants) determines what is used when you run commands such as "crontab -e" and is often not what you want to use yourself. Typcially vi/vim is the default text editor; many people prefer emacs or other editors, and I prefer to use nano myself.
SSH server security through obscurity
Posted February 15th, 2008 in Linux/Unix/BSD
The openSSH server allows you to connect to a remote server (eg a Linux or BSD machine) in a terminal session and run command line applications etc. By default SSH servers listen on port 22 and this is the source for a number of brute force attacks as people try to log into remote servers to do nasty stuff. There are a number of methods for securing SSH better (eg firewalling out access to only a limited set of hosts, using RSA/DSA keys and so on) but we'll look at those another time. This post is about "security through obscurity" where we configure the SSH server to listen on a different port than port 22.
Saving a file downloaded with wget with a different name
Posted February 14th, 2008 in Linux/Unix/BSD
wget is a command line utility for downloading files from FTP and HTTP web servers. By default when you download a file with wget, the file will be written to the current directory, with the same name as the filename in the URL. However, it is possible to save the downloaded file with a different filename using wget.
Format a partition with the ext3 filesystem
Posted February 12th, 2008 in Linux/Unix/BSD
The ext3 filesystem is a Linux filesystem with journalling capabilities. I'm always forgetting the command I need to run to format a partitition with the ext3 file system so have posted this article so I always have a easy to find reference for it... The example used here is done on the command line, and not using a GUI tool.
openSUSE Complains it "Cannot Find Repository" when installing
Posted February 8th, 2008 in Linux/Unix/BSD
A customer of mine from the Linux CD Mall emailed with a problem trying to install openSUSE 10.3. The DVD booted up OK but then came up with the error message "Cannot Find Repository" and refused to be able to install. Basically it couldn't see the DVD even though it had booted from it in the first place.
Getting Transaction Check Error with Yum
Posted February 7th, 2008 in Linux/Unix/BSD
I needed to install the MSSQL libraries for PHP on a CentOS 5 server and ran into a few issues when installing some of the required dependencies, getting "Transaction Check Error" error messages which indicated conflicts between files in packages.
Dynamic MMap ran out of room error on Debian
Posted February 5th, 2008 in Linux/Unix/BSD
A few days ago I was wanting to install some new software onto a Debian 3 box that I have inherited the support for. After running "apt-get install dhcp-client" I got the error message "Reading Package Lists... Error! E: Dynamic MMap ran out of room".
redhat-lsb-3.0-8.EL conflicts with file from package...
Posted February 2nd, 2008 in Linux/Unix/BSD
While setting up a test virtual machine using CentOS 4 to do development for a Red Hat Enterprise Linux 4 production server, I ran 'yum update' and then 'yum groupinstall "Development Tools"' and got the following error message:
Transaction Check Error: file /usr/share/man/man1/lsb_release.1.gz from install of redhat-lsb-3.0-8.EL conflicts with file from package redhat-lsb-3.0-8.EL
How to mount an ISO image on FreeBSD
Posted January 15th, 2008 in Linux/Unix/BSD
A few years ago I posted about howto mount an ISO image with FreeBSD when I was hosting my websites on a FreeBSD 4.11 box. However the method for mounting an ISO image changed in later releases, as advised to me in an email by Leif Neland. Today I was emailed by Rollin Kibbe with instructions about how to mount ISO images with FreeBSD 6.2 so have decided to post them here (and I also recently posted about how to mount ISO images with Linux).
SUSE Error libpopt.so.0()(64bit) is needed by rpm-4.4.2-140.x86_64
Posted January 13th, 2008 in Linux/Unix/BSD
I received the following email from Soren Banke the other day regarding my blog post SUSE Yast No such client module sw_single, which had instructions about how to fix that error:
"I followed your very nice instruction how to get the RPM back in action, mine also died (under suse 10.3).
I found the rpm-4.4.2-140.x86_64, and wanted to install, but suse then tells it needs the libpopt.so.0
error: Failed dependencies:
libpopt.so.0()(64bit) is needed by rpm-4.4.2-140.x86_64
I checked if it was there, and it tells that package popt-1.7-368 is already installed, so I guess it is okay?
Now I am a bit out of ideas?"
Mount reiserfs partitions on CentOS 4
Posted January 11th, 2008 in Linux/Unix/BSD
I needed to copy some files from an old hard drive to a machine I have running CentOS 4, but the partition on the hard drive I needed to access was formatted with the reiserfs file system. The Linux kernel in CentOS 4 does not include support for reiserfs so you need to install a new kernel from the CentOS Plus repository. By doing this, the kernel is no longer the same as that provided by Red Hat's Enterprise Linux, but you will be able to mount ReiserFS volumes.
How to mount an ISO image on Linux
Posted January 10th, 2008 in Linux/Unix/BSD (Updated February 19th, 2008)
An ISO image or .iso file contains the disk image of an ISO 9660 file system, which is used for storing data on CD-ROMs and DVD-ROMs. It is possible to take an ISO image and record it onto a CD or DVD using various applications for doing so, and it is also possible to mount the ISO image using Linux, so that you can access the files without having to actually burn it to disk first.
Host operating system reinstall
Posted January 3rd, 2008 in Linux/Unix/BSD and VMWare
I currently run VMWare Workstation on my desktop computer, using the Linux host operating system to mainly just run the VMWare sessions; I run two main desktop environments (Linux and Windows XP) and one development webserver (CentOS) in Virtual Machines. Just over a month ago I was using SUSE Linux as my main desktop computer, and just using a Windows XP virtual machine, but after upgrading from 10.2 to 10.3 things started to go wrong so I changed to running my desktops on VMWare instead, with a fresh install of Kubuntu 7.10 as my primary Linux desktop / virtual machine.
Using find to locate files modified in the last 24 hours etc
Posted December 28th, 2007 in Linux/Unix/BSD (Updated January 30th, 2011)
The Unix/Linux shell command "find" is really useful for finding files on your computer. There are also graphical utilities for finding files, but sometimes it is easier to use the command line, or it's simply not possible, eg if logged in to a remote server using SSH. This post looks at how to use the find utility to locate files based on the modification time eg looking for files that have been modified in the last 24 hours.
CentOS 4.6 faulty ISO images
Posted December 23rd, 2007 in Linux/Unix/BSD
I sell CentOS on my Linux CD Mall website, and CentOS 4.6 was released recently as an update to the 4.x branch of CentOS (and based on the Red Hat Enterprise Linux 4.6 release of a couple of weeks before). After CentOS 4.6 was released, I downloaded the CD and DVD ISO images as usual, but shortly after was notified by the CentOS mailing list that the images on the mirrors were faulty:
MD5SUM errors with CentOS 4.6 when creating CDs and DVDs
Posted December 22nd, 2007 in Linux/Unix/BSD
When I downloaded the CentOS 4.6 ISO images they checksummed fine using MD5 checksums. When I burn them to CD or DVD the checkums of the disc itself do not match the actual MD5s. I have noticed this behaviour before with the CentOS 3.x and 4.x branch.
Shell scripting using the date command
Posted December 7th, 2007 in Linux/Unix/BSD
A useful command line tool is date, which is typically used for displaying the current system date, or setting it. The default format of the date and time displayed will be the system default, eg "Fri Dec 7 16:41:08 NZDT 2007", but it is possible to apply your own formatting, and also to specify a different date to use, without adjusting the system clock.
CentOS 5.1 is released
Posted December 2nd, 2007 in Linux/Unix/BSD
CentOS 5.1 was released today. It is based on the Red Hat Enterprise Linux release 5.1, and includes packages from all variants including Server and Client. All RHEL repositories have been combined into one, to make it easier for end users to work with. And the option to further enable external repositories at install time is now available in the installer.
Reset the Ctrl+Alt+Escape shortcut sequence to kill a window in KDE
Posted November 30th, 2007 in Linux/Unix/BSD
In X Windows, the Ctrl+Alt+Esc shortcut keystroke sequence allows you to kill a window. The cursor will normally turn into something like a crosshair, and the application window that you then click on will be killed. This is extremely useful for terminating a process that has died but the window is still there with a blank canvas.
In KDE you can change shortcut key sequences, including this useful kill window one. If you are like me, and you select the "Windows Scheme (With Win Key)" for the shortcut keys, then the Ctrl+Alt+Esc sequence will be disabled and you need to re-enable it yourself. The instructions below show how to re-enable this useful shortcut key sequence.
Adding additional kicker applets with Kubuntu
Posted November 29th, 2007 in Linux/Unix/BSD
The default install of Kubuntu doesn't include useful kicker applets such as the system monitor, media player controller and so on. Fortunately it's very easy to add these with apt-get or using adept or a similar package management tool. Kicker is the taskbar that appears at the bottom (by default) of the screen on KDE, and contains things like the currently running applications, desktop switcher, K menu, system tray and clock.
History search auto completion on the BASH shell on Ubuntu
Posted November 28th, 2007 in Linux/Unix/BSD (Updated January 25th, 2008)
A few days ago I posted about enabling the PageUp and PageDown keys for history search auto completion in the BASH shell, looking at what needs to be done to configure it for CentOS 5. Now that I've just set up Kubuntu in a VMWare Virtual Machine as my primary Linux desktop, I needed to have the same thing working. I spend a fair amount of time doing stuff from the command line, and being able to search through the history in this way is very important to me.
Yum error Metadata file does not match checksum
Posted November 27th, 2007 in Linux/Unix/BSD
When trying to install something on a CentOS 5 machine using Yum today, I got the error message "Metadata file does not match checksum" when Yum was trying to update the repository metadata. My first instinct was to run the error message through Google but the first couple of answers looked a little complex. I then remembered I'd had issues with Yum in an earlier post when I got the database disk image is malformed error message, so decided to try out the same solution before following the advice from the other sites.
Install Yum on openSUSE with Yast
Posted November 23rd, 2007 in Linux/Unix/BSD (Updated November 24th, 2007)
openSUSE has an excellent system management tool called Yast, but the software package management tool in Yast is really slow to run. It is possible to install and use Yum instead on openSUSE and all of a sudden the slowness of running Yast's package management goes away. I have a pretty fast machine with a lot of memory, but it can take 5 to 10 minutes to open up the Yast software management application.
Running all desktops on VMWare
Posted November 22nd, 2007 in Linux/Unix/BSD and VMWare
I have become increasingly dissatisfied with openSUSE, particularly since upgrading from 10.2 to 10.3 with a large number of breakages and general instability after the upgrade and am currently moving to a new setup with all my day to day desktop operating systems running as virtual machines in VMWare.
C++ compiler cannot create executables on Ubuntu
Posted November 21st, 2007 in Linux/Unix/BSD
If you get the "C++ compiler cannot create executables" error message when trying to compile some software application on Ubuntu (or Kubuntu or Xubuntu or similar) then you need to install the "build-essential" packages.
VPS hostname reverted back to default value
Posted November 20th, 2007 in Linux/Unix/BSD
Last week I posted about how to change the hostname on CentOS. Running the hostname command worked nicely and did change the hostname, and restarting the postfix service meant it started using the new hostname. I then rebooted the VPS later on in the day, and unfortunately the hostname had defaulted back to the VPS default name, along the lines of vps347.foo.bar.example.com
Changing the hostname on CentOS
Posted November 17th, 2007 in Linux/Unix/BSD
If the hostname setting is incorrect on your CentOS/RedHat/Fedora machine, it's really easy to change the hostname from the command line. There are also GUI tools for doing this but we'll just look at the CLI tools for doing this.
CUPS printing not working on MandrivaOne 2008.0
Posted November 16th, 2007 in Linux/Unix/BSD
I sell Linux on my Linux CD Mall website and one of my customers emailed me today with a problem he was having trying to use printers with the 32 bit Live Gnome CD version of MandrivaOne 2008.0. For some reason he was getting error messages when he tried to add a printer. I thought that possibly this was an issue with not being able to print from a live CD so thought I'd check it out and see if the problem would be fixed when I actually installed Mandriva.
PageUp and PageDown history search auto completion on the BASH shell
Posted November 14th, 2007 in Linux/Unix/BSD (Updated May 3rd, 2010)
From the BASH shell it's possible to have auto-completion where you start to type in part of a command, and then use a keystroke sequence, such as PageUp or PageDown, to then cycle through the history for commands which started with the first text you have entered.
Switching SELinux off on CentOS 5
Posted November 13th, 2007 in Linux/Unix/BSD
Security-Enhanced Linux, also know as SELinux, implements various security policies on Linux and additional levels of access crontrol. It was originally developed by the U.S. National Security Agency to adhere to the "Orange Book" guidelines. On CentOS 5 it is enabled by default, but there may be circumstances where you don't need SELinux's additional security and may want to disable it.
Changing the color of the BASH shell prompt
Posted November 11th, 2007 in Linux/Unix/BSD (Updated June 11th, 2010)
It's possible to change the contents and color of the BASH shell prompt. My SSH sessions use a white background and I find the default [chris@localhost ~] style a little boring. I also find it useful to have the prompt green for ordinary user sessions, and red for root sessions so it's easy to see how much damage you can do by colour alone.
Fedora 8 is released - KDE Live CD Screenshots
Posted November 10th, 2007 in Linux/Unix/BSD
Fedora 8 has been released. Yesterday I showed a few screenshots of the Fedora 8 Gnome Live CD, and today we'll look at the Fedora 8 KDE Live CD with a few screenshots.
Fedora 8 is released - Gnome Live CD Screenshots
Posted November 9th, 2007 in Linux/Unix/BSD (Updated November 10th, 2007)
Fedora 8 has been released and contains a vast number of improvements new features, and a new theme known as Nodoka. Featured here are some screenshots from the Gnome Live CD.
A "Live CD" allows you to boot a Linux desktop directly from the CD without installing anything to your computer. This is useful for testing a Linux distribution out without harming your existing operating system. The Fedora Live CDs allow you to also install Fedora once booted into the desktop if you so choose, and can be purchase from Linux CD Mall
SUSE Yast No such client module sw_single
Posted November 8th, 2007 in Linux/Unix/BSD (Updated November 24th, 2007)
After installing some software on openSUSE 10.3 using Yum this morning, which was much faster than using the Yast software installer, I went to install something else this evening and got the following error message when I clicked on the "Software Management" icon in Yast:
"Error loading language plugin /usr/lib64/YaST2/plugin/libpy2lang_perl.so: libboost_filesystem.so.1.33.1: cannot open shared object file: No such file or directory No such client module sw_single"
Yum sqlite database disk image is malformed error
Posted October 29th, 2007 in Linux/Unix/BSD
When trying to install something this morning using yum on a CentOS 5 machine, I got the error message "_sqlite.DatabaseError: database disk image is malformed". This article looks at how to fix the error.
Installing maildrop on CentOS 5
Posted October 20th, 2007 in Email Servers and Linux/Unix/BSD
I have been in the process of migrating my websites from a couple of dedicated machines to a VPS (Virtual Private Server) which has a fairly minimal base install of CentOS 5 on it. My existing mailserver runs on Gentoo Linux, running Postfix, courier-imap, maildrop, Spamassassin and ClamAV, with the mail accounts and aliases handled by MySQL.
I would have liked to have run only packages available from the CentOS distribution (plus the addons etc) but neither courier-imap nor maildrop are available in the CentOS package trees. Instead I would need to use either cyrus-imapd or dovecot and maildrop was not available at all.
Querying the list of files contained in an RPM file
Posted October 19th, 2007 in Linux/Unix/BSD (Updated October 19th, 2007)
RPM is a package management tool created by RedHat for installing software packages, and can be used to query the files that will be installed by the RPM package file. You can query an RPM file that is on your local file system, or even a file that is on an FTP or HTTP server. The RPM file does not actually need to be installed on your system to be able to find out what it contains.
Microsoft wireless mouse stopped working on Linux
Posted October 18th, 2007 in Hardware & Gadgets and Linux/Unix/BSD (Updated October 18th, 2007)
Yesterday while I was doing some work in Adobe Photoshop in a VMWare virtual machine on my Linux KDE desktop, my Microsoft Wireless Optical Mouse just suddenly stopped working for no apparent reason. At first I thought VMWare had done something funny with mouse capture so I jumped out of the virtual machine but it still wasn't working. Plugging a regular mouse with a cord into a USB port worked just fine, but the wireless mouse refused to work.
Nslookup: command not found error on CentOS 5
Posted October 17th, 2007 in Linux/Unix/BSD
I've just started using a VPS (Virtual Private Server) with CentOS 5.0 i386 as the virtual server operating system, but it has a pretty minimal operating system install. When I went to run the nslookup command to look up an IP address I got the error message nslookup: command not found.
Install yum with rpm on CentOS
Posted October 16th, 2007 in Linux/Unix/BSD (Updated October 16th, 2007)
I set up a VPS (Virtual Private Server) with Net24 today with CentOS 5.0 i386 as the virtual server operating system. After logging in as root I discovered the operating system install was pretty minimal and didn't include yum for package management, so I had to manually install yum with rpm.
New_Face failed error when using MPlayer
Posted October 10th, 2007 in Applications and Linux/Unix/BSD (Updated October 10th, 2007)
After upgrading from openSUSE 10.2 to openSUSE 10.3 I got the error message New_Face failed. Maybe the font path is wrong. Please supply the text font file (~/.mplayer/subfont.ttf) when starting up MPlayer to watch video files. MPlayer would run fine and show the video and play sound ok, but the on screen display would fail to display anything; the subfont.ttf it was trying to find is what was used for the on screen display.
Installing AWStats on CentOS
Posted September 26th, 2007 in Apache and Linux/Unix/BSD
AWStats provides a useful overview of website statistics from your Apache log files. There is no automatic way to install AWStats on CentOS using yum, so this article looks at how to install AWStats on CentOS. The instructions below should also work on other Linux distributions that do not have an automatic way of installing AWStats.
Inadvertent upgrade from openSUSE 10.2 to openSUSE 10.3
Posted September 19th, 2007 in Linux/Unix/BSD (Updated September 28th, 2007)
I had installed openSUSE 10.2 on my primary desktop machine (which has a dual core 64 bit AMD processor) in December 2006, but there never seemed to be any updates available in the little Yast Online Update taskbar applet which is supposed to alert you to updates and security patches etc. I found this a little surprising but was always to busy to do anything about it. This post looks at how to configure the Yast Online Update applet, and also how I inadvertently managed to update from openSUSE 10.2 to Release Candidate 1 of openSUSE 10.3.
Installing Geo IP PurePerl
Posted September 18th, 2007 in Linux/Unix/BSD (Updated March 17th, 2009)
I process logs on my webservers using AWStats, and use the GeoIP plugin to translate IP addresses into country codes. This article looks at how to install the Geo I PurePerl plugin, which is used by AWStats, and also how to download and install the Geo IP database files which are required by this plugin. The server I installed this onto was a CentOS 5 server, but the instructions here should work equally well on other Linux distributions.
Overriding the AWStats LogFile Configuration Option
Posted September 7th, 2007 in Apache and Linux/Unix/BSD
I run AWStats on one of my servers and it copies files over from some of the other servers I manage every 15 minutes and processes them. However, I had a server issue yesterday with the machine that AWStats runs on, and it meant the auto process which copies the files over and runs AWStats stopped running for about 12 hours. The end result was some lost information and needing to regenerate stats for the month to date. I needed to override the AWStats LogFile configuration directive on the command line to be able to do this.
Prevent hostname lookups with openssh sshd
Posted September 5th, 2007 in Linux/Unix/BSD and Networking
When you connect to an OpenSSH sshd server, it is configured by default to do a hostname lookup on your IP address. If there are any issues with the DNS configuration on the host machine, or with the DNS server it is using, this can lead to a delay when logging in using ssh for around 30 seconds. It is very easy to switch this host name lookup function off in the sshd_config file.
Starting and Stopping Sendmail with FreeBSD
Posted December 17th, 2004 in Email Servers and Linux/Unix/BSD (Updated May 24th, 2005)
Management of sendmail is done on FreeBSD by changing to sendmail's directory (/etc/mail) and running "make" followed by the appropriate command. This either needs to be done as root or using sudo.
Howto Mount an ISO Image with FreeBSD
Posted December 14th, 2004 in Linux/Unix/BSD (Updated January 18th, 2008)
This article covers how to mount an ISO image using FreeBSD that you might have created with a utility like mkisofs or have downloaded an ISO image from a website or FTP archive.
FreeSBIE - Live Bootable FreeBSD
Posted July 16th, 2004 in Linux/Unix/BSD (Updated March 25th, 2005)
FreeSBIE is a live, bootable CD based on FreeBSD (like Knoppix and Ubuntu for Linux). Pop the CD into your CDROM, reboot the system and you have a live working FreeBSD system using the XFCE desktop without harming the rest of your system.
FreeSBIE - Live Bootable FreeBSD - Desktop Screenshot
Posted July 16th, 2004 in Linux/Unix/BSD (Updated May 23rd, 2007)
FreeSBIE is a live, bootable CD based on FreeBSD (like Knoppix and Ubuntu for Linux). Pop the CD into your CDROM, reboot the system and you have a live working FreeBSD system using the XFCE desktop without harming the rest of your system. This page has a screenshot of FreeSBIE when the system has first booted up.
FreeSBIE - Live Bootable FreeBSD - Desktop Screenshot
Posted July 16th, 2004 in Linux/Unix/BSD (Updated May 23rd, 2007)
FreeSBIE is a live, bootable CD based on FreeBSD (like Knoppix and Ubuntu for Linux). Pop the CD into your CDROM, reboot the system and you have a live working FreeBSD system using the XFCE desktop without harming the rest of your system. This article has a screenshot of FreeSBIE after booting up and opening a couple of applications.
FreeSBIE - Live Bootable FreeBSD - Root Message File
Posted July 16th, 2004 in Linux/Unix/BSD (Updated March 25th, 2005)
FreeSBIE is a live, bootable CD based on FreeBSD (like Knoppix and Gnoppix for Linux). Pop the CD into your CDROM, reboot the system and you have a live working FreeBSD system using the XFCE desktop without harming the rest of your system. This page shows the root message from when you first boot the system.
How to use a flash card reader with Linux
Posted March 24th, 2004 in Linux/Unix/BSD (Updated May 24th, 2005)
This article looks at how to mount a USB flash card reader and flash cards plugged into it with Linux. Also covered is how to make it easy to mount with a desktop icon in KDE and how to scan the SCSI bus to locate the device name and number.
Mounting a flash card reader with a KDE desktop icon
Posted March 24th, 2004 in Linux/Unix/BSD (Updated May 24th, 2005)
This article looks at how to create a desktop icon in KDE which can be used to mount a flash card reader or similar device, whether it's a CD-ROM, DVD reader etc. Once the icon is set up on the desktop it can also be used to unmount the device.
How to use a flash card reader with Linux - How to scan the SCSI bus
Posted March 24th, 2004 in Linux/Unix/BSD (Updated May 24th, 2005)
This article looks at how to use the sg_scan and sg_map utilities to scan the SCSI and USB bus to determine the device name and number for mounting USB devices on Linux.
Create RSA and DSA Keys for SSH
Posted March 5th, 2004 in Linux/Unix/BSD (Updated May 24th, 2005)
Private and public RSA and DSA keys can be generated on Unix based systems (such as Linux and FreeBSD) for use with SSH. The ssh-keygen command allows you to generate, manage and convert these authentication keys.
Manpage for ssh-keygen
Posted March 5th, 2004 in Linux/Unix/BSD and Man Pages (Updated May 24th, 2005)
Private and public RSA and DSA keys can be generated on Unix based systems (such as Linux and FreeBSD) for use with SSH. The ssh-keygen command allows you to generate, manage and convert these authentication keys.
Error Compiling Sablotron on FreeBSD
Posted February 12th, 2004 in Linux/Unix/BSD (Updated May 23rd, 2007)
This article deals with two compilation issues when compiling the Sablotron libraries versions 0.98 and 1.01 on FreeBSD 4.9. It probably also affects other versions of Sablotron and FreeBSD.
Error Compiling Sablotron on FreeBSD - Make: don't know how to make ./jsdom-ref/complete.
Posted February 12th, 2004 in Linux/Unix/BSD (Updated May 23rd, 2007)
This article deals with two compilation issues when compiling the Sablotron libraries versions 0.98 and 1.01 on FreeBSD 4.9. It probably also affects other versions of Sablotron and FreeBSD.
How to check an MD5 hash on a file
Posted January 19th, 2004 in Linux/Unix/BSD (Updated May 23rd, 2007)
MD5 is a one-way hash algorithm which can be used for security or to verify the integrity of a file as it creates a digital signature for a file.
Save a Unix manpage as plain text
Posted January 19th, 2004 in Linux/Unix/BSD and Man Pages (Updated May 24th, 2005)
This article details how to save man pages as human readable plain text files. Man page is an abbreviation for Unix and Linux manual pages which form the basis of the help system for command line utilies.
