Setting Up CentOS 6.2 Minimal on VMWare Fusion

centos, linux, other, vm

Below are the steps required to get CentOS 6.2 Minimal installed within a VMWare Fusion virtual machine. The end goal of this post is to have a working OS which we can ssh into from the Mac hosting the VM.

Specifically I’m doing this to be able to practice/learn/discover various pieces available in CentOS which is the environment that I now work in at Cisco. Also a hat tip to Mo Khan, whom I work with, his blog lead me to document as I go.

Spinning Up the VM

Network Configuration

The minimal version of CentOS doesn’t have the network setup, so if you ping google: ping google.com it will fail. That means you’ll have to configure your network setup. Once your machine has booted:

  • Configure eth0 by running: vi /etc/sysconfig/network-scripts/ifcfg-eth0
1
2
3
4
5
6
7
8
9
10
DEVICE="eth0"
HWADDR="01:23:45:67:89:ab" # yours will be different
NM_CONTROLLED="yes"

# Was originally no, change to yes
ONBOOT="yes"

# New Info
BOOTPROTO=dhcp
IP=192.168.1.128 # you can modify as you'd like
  • Restart the network interface: /etc/init.d/network restart
  • Then ping google.com and success

Setup SSH

  • Install the openssh packages with yum:
1
yum install openssh-server openssh-client -y
  • Now you should be able to ssh into the box locally:
1
ssh root@127.0.0.1
  • Run ifconfig | grep "inet " and pull the ip address that isn’t 127.0.0.1. It will be the same as the eth0 config from above (192.168.1.128). Then on your mac (not linux terminal) ssh into the vm:
1
ssh root@129.168.1.128

This page was delicately crafted on by Gavin Miller.