Installing VMware Tools on a CentOS 5 VM

The first thing to do in the installation process is to add the CD/DVD ROM device within the VMware Fusion Settings for the CentOS VM. This should be done only after the VM is shut down.


Then start the virtual machine and enter the following commands into Terminal. These commands enable us to download a required C compiler and create a symbolic link to the CentOS kernel files.

$ yum install gcc gcc-c++ kernel-devel
$ sudo ln –s /usr/src/kernels/[kernel version] /usr/src/linux

Mount the right volume and uncompress installation files

$ sudo mount /dev/cdrom /mnt/cdrom
$ cd /mnt/cdrom
$ cp VMwareTools-[version].tar.gz /tmp
$ cd /tmp
$ sudo umount /mnt/cdrom
$ tar zxf VMwareTools-[version].tar.gz

Finally run the installation script

$ cd /tmp/vmware-tools-distrib
$ sudo ./

Finding files on CentOS 5

I’m using the CentOS Linux distro for the first time for some Hadoop Big Data work and am having fun rediscovering the powerful *NIX shell.

An initial challenge I faced was being unable to search for files in the operating system as the “mlocate” package is not installed on CentOS 5 by default.

The below commands download the mlocate package, create a daily cron job to index my system and run a search for any file or folder with the string “Hadoop” in the name.   

$ sudo yum install mlocate
$ sudo /etc/cron.daily/mlocate.cron
$ locate mlocate.cron
$ locate updatedb
$ locate Hadoop | more