Archive for the ‘linux’ Category

Install Linux VM Additions for Virtual Server 2005

Thursday, September 16th, 2010

Its been a while since Linux VM Additions have been released, but there still is no good writup on how to install them. This is how I do it on a Red Hat install. (I used CentOS 5.2)

Download Virtual Machine Additions for Linux from Microsoft.

Install the msi file and it will add the iso that you need to Virtual Server 2005′s UI.

Mount the iso via the web UI.

Log into the Virtual Machine.

At a Terminal Type:
yum update kernel*
shutdown -r now

After a reboot open the terminal again.

yum install kernel-devel gcc

mkdir /media/cdrom
mount /dev/cdrom /media/cdrom
mkdir /usr/src/vmadd
cp /media/cdrom/*.* /usr/src/vmadd
umount /dev/cdrom

cd /usr/src/vmadd
rpm -ivh vmadd-kernel-module-RHEL-2.0-1.i386.rpm
tail -100 /var/log/vmadd-kernel-module.log | more #
Verify the main install didn’t error.

rpm -ivh vmadd-heartbeat-2.0-1.i386.rpm
rpm -ivh vmadd-shutdown-2.0-1.i386.rpm
rpm -ivh vmadd-timesync-2.0-1.i386.rpm

/etc/init.d/vmadd start
/etc/init.d/vmadd-heartbeat start
/etc/init.d/vmadd-timesync start
/etc/init.d/vmadd-shutdown start

shutdown -r now

*NOTE
If you ever need to uninstall the additions, uninstall in this order:

rpm -e vmadd-heartbeat
rpm -e vmadd-shutdown
rpm -e vmadd-timesync
rpm -e vmadd-kernel-module-RHEL


EDIT
Once after a large amount of yum updates, the additions broke. To fix the problem, I uninstalled the additions, changed back to my src directory and reinstalled with the same commands. It fixed everything.

Changing Hostname and IP in Red Hat linux

Monday, February 8th, 2010

So I am new to administrating linux servers so I am going to post about all the simple things that a noob linux admin would want to know.

I built a base linux vm in Microsoft Virtual Server 2005. If I copy the vhd file from that base install, what do I need to chage before I add it to the production environment?

** Note: I am using a Red Hat Linux OS (CentOS v5.3).

Change the Hostname

First we need to change the computer’s Hostname.

To change the computer’s Hostname, edit these files:

/etc/hosts:

/etc/sysconfig/network:

For the Hostname change to take effect, you need to reboot the computer.

Change the IP Address

To change the IP address of a CentOS 5.3 server, edit:

/etc/hosts:

/etc/sysconfig/network-scripts/ifcfg-eth*:

Add DNS Servers

Finally we need to add some DNS servers since we won’t get them from DHCP any more.

To add the DNS Servers, edit:

/etc/resolv.conf:

To make the changes take effect, you need to either reboot, or restart the network service.

To restart the network service:

or:

Well that’s it for today.