On Mac (Lion OS 10.7.5)
- Download
- Launch
- Common for all the four nodes below
- We want to create four nodes below to simulate ideal multi-node cluster. Edge node will have cloudera manager (to install hadoop on the cluster), Eclipse (to develop code), to submit jobs, etc. Namenode will have namenode, secondary namenode and job tracker services. Data nodes will have datanode and task tracker services.
- Open VMWare Fusion and create four virtual machines (VMs) using the Ubuntu image that you downloaded earlier (Click on "Add" >> "New" >> "Install from disc or image" >> "Continue" >> "User another disc or disc image" >> Point to the downloaded Ubuntu image file >> "Customize" based on the memory/processors you have available on your Mac and then give the virtual machine names according to their usage. (You will need to remember the userid+password that you provide here)
- Launch each of the machines
- Login to the machine
- Click on "Dash" >> search for "Terminal" >> Open Terminal
- sudo apt-get install openssh-server (to accept SSH connections)
- ssh-keygen -t rsa -P "" (then hit enter when prompted)
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- chmod 600 ~/.ssh/id_rsa.pub
- Run "ifconfig" command and note down the ip address for each of the machines
- sudo vi /etc/hostname (replace "ubuntu" with new VM name e.g. "edge" or "nn1" or "dn1" or "dn2")
- sudo hostname <VM_Name> (e.g. sudo hostname edge) to change the VM name
- sudo vi /etc/hosts (Comment out the lines for "localhost" and "ubuntu" then add a line for each of the VMs "IPaddress Machine_Name")
- sudo vi /etc/sudoers (add a line at the bottom "<user_id> ALL=(ALL) NOPASSWD: ALL") to provide root previleges for the <user_id>
- Set time and timezone
- sudo apt-get install ntp
- sudo dpkg-reconfigure tzdata
- Restart the macnine (Click on power button on top right >> "shutdown" >> "restart")
- Edge node
- cat ~/.ssh/id_rsa.pub
- Highlight and copy the contents from the cat command above
- Go to each of the other three nodes, vi ~/.ssh/authorized_keys
- Paste the copied contents at the end of the above file & save
- SSH to all the four machines including itself couple of times to make sure you are not prompted for anything. First time you may need to type "yes" in the middle (e.g. ssh nn1, ssh dn1, ssh dn2)
- Download Cloudera manager & run per instructions at the same link
- cd to download dir
- chmod +x cloudera-manager-installer.bin
- sudo ./cloudera-manager-installer.bin
- Follow the instructions
- Open a browser and go to http://localhost:7180
- Login with "admin" and "admin"
- Start the install; Go with the user ID that you started off when you created the VMs
- Enter the ip addresses of all the four (including the edge node itself)
- Continue the installation.
- Name node
- cat ~/.ssh/id_rsa.pub
- Highlight and copy the contents from the cat command above
- Go to each of the other three nodes, vi ~/.ssh/authorized_keys
- Paste the copied contents at the end of the above file & save
- SSH to all the four machines including itself couple of times to make sure you are not prompted for anything. First time you may need to type "yes" in the middle (e.g. ssh nn1, ssh dn1, ssh dn2)
- Data node 1
- cat ~/.ssh/id_rsa.pub
- Highlight and copy the contents from the cat command above
- Go to each of the other three nodes, vi ~/.ssh/authorized_keys
- Paste the copied contents at the end of the above file & save
- SSH to all the four machines including itself couple of times to make sure you are not prompted for anything. First time you may need to type "yes" in the middle (e.g. ssh nn1, ssh dn1, ssh dn2)
- Data node 2
- cat ~/.ssh/id_rsa.pub
- Highlight and copy the contents from the cat command above
- Go to each of the other three nodes, vi ~/.ssh/authorized_keys
- Paste the copied contents at the end of the above file & save
- SSH to all the four machines including itself couple of times to make sure you are not prompted for anything. First time you may need to type "yes" in the middle (e.g. ssh nn1, ssh dn1, ssh dn2)
No comments:
Post a Comment