One of my local servers died a quiet death last week. Much as I tried to revive the li'l bitch, she refused to accede to my plaintive entreaties. She is now consigned to a forlorn corner and I am yet to see to her last rites. In the meantime, I have recently introduced a new addition to my family of servers through the cannibalisation of older (and now retired) members of the same. So, I settled on trying to see if I could save the soul of my now recently defunct Kubuntu box by simply transferring its hard drive to this new server. When I tried to do so, this is what transpired:
Even when compared to the simplicity of Windows 7's shutdown function, Linux goes a step further in flexibility and ease of use. Shutting down a system at 8 AM in Linux is as easy as saying
shutdown 8:00 in a terminal. To explicitly state that the system should power down after shutting down, we would expand it to
shutdown -h 8:00. Alternatively, if we want to perform a reboot, the switch would change to
shutdown -r 8:00.
Some people like to indent their code using TABs. I used to like doing this. I still think that it's a good idea. But circumstances have dictated for the past several years that I need to indent using spaces instead. My favourite command-line editor in Linux and text editor in Windows is VIM / Gvim (where Gvim is basically Vim with a GUI). To configure this editor to override its default and use spaces instead of TABs for indentation, perform the following steps:
I've previously written a short tip on how to perform batch rename operations using
xargs. One of the issues with xargs is that it breaks down when dealing with filenames which include spaces as it assumes that each word in the filename is a separate argument.
So, if you, like me, have to resort to PuTTY sometimes to SSH into a Linux box, I'm sure that you have also subjected yourself to much gnashing of teeth at the lack of a Windows solution to password-less logins into your server. For the uninitiated, password-less SSH allows you to log into a server without manually authenticating yourself.
Finding all the members of a group is an occasional requirement and while there are a number of ways to do this by parsing the
/etc/password files, Debian/Ubuntu come with a simpler solution that performs all this skulduggery for you. This is the
members function that can simply be installed using
sudo apt-get install members . Once this is done, members of a group named
foo can be listed using:
While checking the logs of my server, I ran into the following errors:
May 11 18:00:04 named: zone example.com/IN: NS 'ns1.example.com' has no address records (A or AAAA)
May 11 18:00:04 named: zone example.com/IN: NS 'ns2.example.com' has no address records (A or AAAA)
May 11 18:00:04 named: zone example.com/IN: NS 'ns3.example.com' has no address records (A or AAAA)
I ran into the same errors when I checked the zone files themselves using:
Earlier today, I noticed - in htop - that a particular process, let's say 'foo-123', was running even though I had removed the package 'foo' many days earlier. I tried removing it again and found that I was right and that the package had already been removed. The package dependency list was way too long for me to go removing them one by one, or parsing them out and removing the lot.
The Internet will go bust without DNS and the following is a guide to setting up your own DNS server to provide information about your domains and associated services. While this task can be accomplished very easily when using a hosting control panel, it is great fun to set things up on your own.
Unlike Top, its newer sibling - Htop is better in every way. It provides more detailed information, supports colours and is more configurable. Htop is available in the repositories of most distros. However, CentOS (and therefore, RHEL) is not one of them. While it it apparently available in the EPEL repositories, I could not find it for CentOS 4.9. In any event, what we have below are the (simple) steps to install it from the source packages: