1 Create a new VM as you wish. Install CentOS6 with minimal configuration. After installation, shutdown the VM.
shutdown –h now
2 Add a new E1000 network interface card (eth1 in this article, if not, change all related steps below).
3 Boot and login.
4 Setup a temporary network:
ifconfig eth1 <temporary ip> netmask <netmask> up
route add default gw <gateway>
- if HTTP proxy is required: edit the yum configuration file.
vi /etc/yum.conf
and add these lines:
# The proxy server – proxy server:port number
proxy=http://mycache.mydomain.com:3128
# The account details for yum connections
proxy_username=yum-user
proxy_password=qwerty
- if HTTP proxy is NOT required: edit DNS configuration file. See step 13.
- if Route is required: edit route configuration file. See step 14.
5 Install perl, and update system.
yum install perl
yum update
6 Shutdown.
shutdown –h now
7 Remove the E1000 network interface card, which was inserted in step 2.
8 Boot and login.
9 Insert VMware Tools CD.
10 Install VMware Tools, and reboot. (NOTE: you may need to do this step every time after system update)
cd /
mount /dev/cdrom /media
tar –zvxf /media/VM*
cd vmware-tools-distrib/
./vmware-install.pl
follow the instructions on your screen.
umount /media
reboot
11 Wait for reboot and login.
12 Setup eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth0
and add these lines:
ONBOOT=yes
- if DHCP is enabled:
BOOTPROTO=dhcp
- if static IP is preferred:
IPADDR=<IP>
NETMASK=255.255.255.0
BOOTPROTO=none
13 Setup DNS.
vi /etc/resolv.conf
and add these lines:
nameserver <1st DNS IP>
nameserver <2nd DNS IP>
domain <domain name> #your domain name, optional
14 Setup route.
vi /etc/sysconfig/network
and add these lines:
NETWORKING=yes
HOSTNAME=<value>
GATEWAY=<Gateway IP>
GATEWAYDEV=eth0
15 Reboot.
reboot
16 Disable SELINUX if you don’t like it.
vi /etc/sysconfig/selinux
find the line start with SELINUX=, and set it to disabled.
SELINUX=disabled