Timothy E. Archer

System.out.println("Hello World!");

Browsing Posts in System Administration

I usually use VirtualBox as the virtualization solution for a simple way to create basic test machines on my desktop computer. This post is about how to clone a virtual machine which doesn’t have any snapshots. It’s short and sweet, and mostly for my own reference so I have the command handy for doing it in the future.

You CANNOT just copy the .vdi file(s) to a new file and create a new VM using that disk image. If you do so you will get UUID conflicts when trying to point a VM at the copied image on the same machine. Yes, I learned that the hard way.

Instead, you need to use the VBoxManage command line utility to do the cloning which will properly change the UUID.

To do so it looks like this:

"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonevdi "sourceimage.vdi" "destinationimage.vdi"

"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonevdi "d:\VirtualBox VMs\Win2008Server_1\Win2008Server.vdi" "d:\VirtualBox VMs\Win2008Server_2\Win2008Server.vdi"

Recently I had to fix a linux system whose root file system was allowed to fill up. Not having much knowledge of the system, I needed a quick way to find out which files were consuming the most space to see if any of those could be purged. The likely culprit was some huge log files, but how to find them?

du and sort to the rescue!

This simple command dumped out the sizes of all files on the system:

du -x / | sort -rn | more

Let’s pick it apart:
continue reading…

I recently setup Apache Tomcat 6.0.10 and in this post I will share the steps that I went through to install it on my RedHat Linux AS 4 server.

The Basics – Download and Install The Software

  1. First make sure you have a Java Development Kit installed on your server. I have a write up on how to do this at http://timarcher.com/?q=node/59.
  2. Download the Tomcat binary distribution from http://tomcat.apache.org/download-60.cgi. I selected the tar.gz option under the Core section.
  3. Once you have downloaded your file, place it somewhere on your Linux box (I put mine in /root/tomcat). The name of the file I downloaded was apache-tomcat-6.0.10.tar.gz.
    continue reading…

By default, RedHat Linux AS and AS4 servers don’t come with a JDK (Java Development Kit) installed on them. Depending on your install, if you run the java command you may get some sort of error message or a file not found message.

In this post I will describe how to install a JDK on your RedHat Linux server. It should also work on Fedora, however I have not tried it personally.
continue reading…

I believe that every organization should have a NTP/time server if they have more than one computer on site. Having an NTP server will allow you to keep the times on all of your computers in sync. This helps when comparing the logs from various servers to trace through various events that happened. It’s nice to be assured that the event really happened at the time specified in the log file regardless of what server you’re on.

In this post I will show you how to setup your RedHat Linux AS 3 or 4 machine as an NTP server. You could then take all of your other servers and workstations and have them synchronize their time from your NTP server.
continue reading…

By default FTP comes disabled on stock RedHat AS3 and AS4 server installs. For the most part you should not be using it anyways, and instead using something more secure like SFTP. However, in some rare occasions I find the need to enable FTP. Below I will show you how to do it:

  1. Become the root user on your server.
  2. Change to the /etc/xinetd.d directory
    cd /etc/xinetd.d/
    

    continue reading…

Many Oracle shops want their database to automatically start when their server boots up, and to automatically shutdown when they shutdown the server.

Below I will share with you the Oracle init script that I use on my server. It has been tested with Oracle 10gR2 on RedHat Linux AS3.

  1. Login as the root user on your server.
  2. Put the following script in the file named /etc/init.d/dbora:
    continue reading…

This is Part 4 of 4 in my series of posts on some of the simple utilities one can use to test networking and DNS configurations. This post will concentrate on using the utility whois to determine the owner of a domain or IP address on the Internet.

Whois is a very simple utility to use and is included in most Linux distributions nowadays (and probably most other Unix variants too). If you’re a windows user, you’ll have to download a program to use whois, or just use one of the free web based utilities such as this one:
http://www.networksolutions.com/whois/index.jsp

The simplest way to use whois is to specify the command followed by either a domain name, or an IP address.

For example:
continue reading…

This is Part 3 of 4 in my series of posts on some of the simple utilities one can use to test networking and DNS configurations. This post will concentrate on using the utility dig to perform simple DNS server queries to ensure that your hostnames are resolving the way you expect them to.

Dig stands for domain information groper and is included in most Linux distributions nowadays (and probably most other Unix variants too). If you’re a windows user, you’ll have to download the dig program. One such site I’ve found for this program is http://pigtail.net/LRP/dig/

Much like nslookup, dig performs DNS lookups and displays the results from the queried name server. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Dig tends to display its results in a format that DNS administrators recognize which resembles the setup for BIND. Other lookup tools tend to have less functionality than dig.

The most common things I use dig for are to:
continue reading…

This is Part 2 of 4 in my series of posts on some of the most simple utilities one can use to test networking and DNS configurations. This post will concentrate on using nslookup to perform simple DNS server queries to ensure that your hostnames are resolving the way you expect them to.

Nslookup stands for name server lookup and is included in unix and windows machines. Its most basic use is to lookup the IP address for a given hostname. I often also use it to perform reverse lookups (lookup the hostname for an IP address) and I also lookup who is configured as the MX (mail exchanger) server for a specific domain.

I’m not going to go into a detailed explanation of DNS, and all the different possible uses for nslookup, but rather I’ll show you some of the common things I do with it.

First and foremost, I use nslookup to query a nameserver to resolve a hostname to an IP address. To do this, you type the following command:

nslookup timarcher.com

And the output looks like:
continue reading…

Powered by WordPress Web Design by SRS Solutions © 2012 Timothy E. Archer Design by SRS Solutions