Building a Single Node VM is a great way to get started using HAWQ. You can use Amazon for this as well but here are the steps to do this all on your local machine. This post will cover how to get your VM created.
You can either download an existing CentOS 6.5 VM or build one from an ISO. I chose to build it from an ISO and use VMWare Fusion.
1. Add VM in VMWare Fusion.
2. Mount the ISO
Unfortunately, VMWare Fusion will try to start the VM you just created but you haven’t attached mounted the ISO yet.
Shutdown the VM.
Now you can start the VM.
3. Install CentOS
With the DVD ISO mounted, you will immediately go to the installation menu for CentOS when the VM is started. Pick the first option of “Install or Upgrade an existing system”.
Skip the media test.
Pick your language on the next two screens and then pick “Basic Storage Devices”.
“Discard any data”.
I used “hdb” as my hostname.
Pick your timezone.
Set your password. I used “changeme” which is a weak password but just fine for a VM.
Use the default “Replace Existing Linux System(s)”.
Write changes to disk.
4. Configure CentOS
Log in as root with the password changeme.
Enable the ethernet adapter.
sed -i 's/ONBOOT=no/ONBOOT=yes/g' /etc/sysconfig/network-scripts/ifcfg-eth0 dhclient
Get the IP Address and add it to your local /etc/hosts file.
ifconfig | grep "inet addr"
My address is 192.168.175.135 so I added this line to my local hosts file:
Now you can ssh to root@hdb to perform the following commands.
chkconfig iptables off service iptables stop echo 0 >/selinux/enforce sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config setenforce 0 sed -i '/\t\bkernel\b/ s/$/ transparent_hugepage=never/' /boot/grub/grub.conf yum update openssl -y yum install ntp -y /etc/init.d/ntpd start yum install httpd -y /etc/init.d/httpd start yum install wget -y ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys cat ~/.ssh/id_dsa ln -s /etc/init.d/httpd /etc/rc3.d/S15httpd ln -s /etc/init.d/ntpd /etc/rc3.d/S74ntpd
5. Memory and Processors
Shutdown the VM.
shutdown -P now
Now go to the Virtual Machine Settings and then Processors and Memory. I am using 8GB of RAM and 4 cores for my VM.
I also created a snapshot of my VM at this stage.
Now the VM is ready for the next step of installing Ambari, Hadoop, and HAWQ.