kieranbarnes Independent PHP, WordPress & CubeCart Programmer

How to install the nslookup, host OR dig commands in Linux?

Posted on November 25, 2011

Sometimes you are unable to use the nslookup, host OR dig command on your Linux server and receives the following message

  1. -bash: nslookup: command not found -bash: host: command not found -bash: dig: command not found

The reason is the package required for the commands to work isn’t installed during the OS installation.

These are all DNS related commands useful to check the DNS report of a domain/IP.

You need to install the package bind-utils which offer the commands like nslookup, host, dig and others.

SSH to your server as root and execute

  1. yum install bind-utils

Done!

Tagged as: , , , No Comments

Disabling Core Dumps

Posted on August 17, 2011

I recently found a (cPanel) server was generating over 100Gb of core dumps every time a bad PHP script died or Apache died. Writing these generally useless (who actually debugs these on a live web server) to disk is a pointless waste of disk I/O, especially in a VPS environment.

Here is two methods of disabling core dumps;

Messing with time and date on Linux

Posted on March 9, 2011

Some Linux distros don't come with time synchronisation utilities, even though Windows has done it since Windows 2000.

Here's how I solved the issue on a basic CentOS install.

Tagged as: , Continue reading

Key-Based SSH Logins With PuTTY

Posted on November 10, 2010

Following on from the previous SSH security ramblings, one of the most secure methods of security is public/private key-based authentication.

g up key based SSH logins for two reasons;

  • They are more secure. You aren't prompted for a password which could be brute forced or sniffed via man in the middle attacks for example
  • We're lazy. We don't want to type username/password combinations into each server.

SSH Security Ramblings

Posted on November 9, 2010

SSH - Secure Shell isn't that secure. If you're not using it behind a Layer 7 firewall or an enhanced security daemon like cPanel's cPHulk or even just the default config isn't secure.

What can you do?

[Snippet] Create a large file in Linux

Posted on August 21, 2010

Need to create a large file? For disk speed tests? Or space tests?

  1. dd if=/dev/zero of=your.big.file bs=1MB count=500

This will create a 500Mb file in your current directory called  your.big.file

  1. 500+0 records in
  2. 500+0 records out
  3. 500000000 bytes (500 MB) copied, 4.08855 seconds, 122 MB/s
Tagged as: , No Comments

CIFS/SMBFS “mount error 13 = Permission denied”

Posted on July 9, 2010

Are you getting a rather generic "mount error 13 = Permission denied"  when trying to mount Windows shares in Linux? I was.

Samba's been updated, keep up. You need to add the domain=XXX into your -o command, or text file for your credentials.

Tagged as: 2 Comments

Using SCP to copy files between Linux servers

Posted on April 4, 2009

even a gnome shell can look goodSCP? SCP is a method of securely transferring files between a local and a remote host or between two remote hosts, using the Secure Shell (SSH) protocol.

Sounds confusing?

Tagged as: , Continue reading

Permanently mount a Windows share in Linux

Posted on April 4, 2009

A Terrabyte?Sick of manually mounting a Windows share on Linux with "mount" for it to drop off randomly? Or not really knowing if it is mounted or not?

Then make a permanent mount in fstab.

Tagged as: Continue reading

Single Line WordPress Install

Posted on July 20, 2008

I'm getting a pro at installing WordPress now.I'm trying to cut down my install time to a minimum.

Page 1 of 212