installing hortonworks hadoop for windows

56
Installing Hortonworks for Windows

Upload: jonathan-bloom

Post on 12-Jul-2015

2.661 views

Category:

Technology


6 download

TRANSCRIPT

Page 1: Installing Hortonworks Hadoop for Windows

Installing Hortonworks for Windows

Page 2: Installing Hortonworks Hadoop for Windows

Intro

• I installed Hortonworks for Windows on my local Hyper-V machine.

• The following Slides introduce you to the steps for installing on your machine.

• The entire content can also be found on my blog:

• http://www.bloomconsultingbi.com/2013/10/installation-hortonworks-hadoop-13-part.html

• http://www.bloomconsultingbi.com/2013/10/installation-hortonworks-hadoop-13-part_22.html

• Enjoy~!

Page 3: Installing Hortonworks Hadoop for Windows

So today we are going to install Hadoop 1.3 single node cluster onto a Hyper-V system.

Download the files from the Hortonworks website:

http://hortonworks.com/products/hdp-windows/

Version 1.3

Page 4: Installing Hortonworks Hadoop for Windows

Download Install File

Page 5: Installing Hortonworks Hadoop for Windows

Click the link to begin the download. Unzip the file, creates a folder:

Page 6: Installing Hortonworks Hadoop for Windows

MSI File

Page 7: Installing Hortonworks Hadoop for Windows

See the text file "clusterproperties.txt"

Page 8: Installing Hortonworks Hadoop for Windows

Install and load Hyper-V (Windows 8). Create a new VM. Load Windows 2012 Server.

Page 9: Installing Hortonworks Hadoop for Windows

Start the Server: Be sure to Create a Network Adapter, I created an "Internal" adapter:

Page 10: Installing Hortonworks Hadoop for Windows

Then set the network configuration (Version 4):

Page 11: Installing Hortonworks Hadoop for Windows

Next I copied the files up to the VM Server. Then begin the install. Using the Hortonworks page as a reference:

Page 12: Installing Hortonworks Hadoop for Windows

Pre-requisites

• Next open the Hortonworks page to view the pre-requisites for the install...

• http://docs.hortonworks.com/HDPDocuments/HDP1/HDP-Win-1.3.0/bk_installing_hdp_for_windows/content/win-chap2-singlenode.html

• http://docs.hortonworks.com/HDPDocuments/HDP1/HDP-Win-1.3.0/bk_installing_hdp_for_windows/content/win-getting-ready-2-3-1.html

• Download Python:

• http://www.python.org/download/

Page 13: Installing Hortonworks Hadoop for Windows

Python

Page 14: Installing Hortonworks Hadoop for Windows

Create a folder on the VM, I named it HWHadoop13:

Page 15: Installing Hortonworks Hadoop for Windows

Copy the Python install to the VM as well, and update the Path variable...

Page 16: Installing Hortonworks Hadoop for Windows

Open PowerShell as Administrator. Rewrite the line of code in PowerShell...Execute...Python 2.7.5

*** MESSAGE TO READER ***

Be sure to add the Python executable path to the Environment Variable "PATH"...

Use the following instructions to manually install Python in your local environment:

1.Download Python from here to the workspace directory.

2.Update the PATH environment variable. Using Administrator privileges. From the Powershell window, execute the following commands as Administrator user: msiexec /qn /norestart /log %WORKSPACE%\python-2.7.5.log /i %WORKSPACE%\python-2.7.5.msi setx PATH "$env:path;C:\Python27" /m where

o%WORKSPACE% is the full workspace directory path.

o$env is the Environment setting for your cluster.

Page 17: Installing Hortonworks Hadoop for Windows

Note

Important

Ensure the downloaded Python MSI name matches python-2.7.5.msi. If not, change the above command to match the MSI file name.

Page 18: Installing Hortonworks Hadoop for Windows

Next download the C++ 2010 Redistributable Package...

Page 19: Installing Hortonworks Hadoop for Windows

Copy the file to the HWHadoop (Your home directory for Hadoop) folder...

Page 20: Installing Hortonworks Hadoop for Windows

Type this in the PowerShell command line...

Page 21: Installing Hortonworks Hadoop for Windows

Microsoft Visual C++ 2010 Redistributable Package (64-bit)

1.Use the instructions provided here to download Microsoft Visual C++ 2010

Redistributable Package (64-bit) to the workspace directory.

2.Execute the following command from Powershell with Administrator privileges:

%WORKSPACE%\vcredist_x64.exe /q /norestart

For example:C:\prereqs\vcredist_x64.exe /q /norestart

Page 22: Installing Hortonworks Hadoop for Windows

Now, download the Microsoft Framework...

Microsoft.NET framework 4.0

*** MESSAGE TO READER ***

Be sure to connected to the internet, because it has to pull some files off the web,

if you're not connected, the install will fail...

1.Use the instructions provided here to download Microsoft.NET framework 4.0 to the workspace directory.

2.Execute the following command from Powershell with Administrator privileges:

%WORKSPACE%\slavesetup\dotNetFx40_Full_setup.exe /q /norestart /log %WORKSPACE%/dotNetFx40_Full_setup.exe

Page 23: Installing Hortonworks Hadoop for Windows

.net Framework

Page 24: Installing Hortonworks Hadoop for Windows

And now for the JDK:• JDK 6.31 or higher

• *** MESSAGE TO READER ***

• During the installation process, it threw an error. Turns out you can not have spaces in the path for JAVA_HOME. So uninstall and re-install to new directory, i.e. C:\Java instead of C:\Program Files\...

Page 25: Installing Hortonworks Hadoop for Windows

Use the instructions provided below to manually install JDK to the workspace directory:

1.Check the version. From a command shell or Powershell window, type:java -version

2.(Optional): Uninstall the Java package if the JDK version is less than v1.6 update 31.

3.Go to Oracle Java SE 6 Downloads page and accept the license.

Download the JDK installer to the workspace directory.

Page 26: Installing Hortonworks Hadoop for Windows

Note

Important

Ensure that no whitespace characters are present in the installation directory's path. For example, C:\Program Files is not allowed.

Page 27: Installing Hortonworks Hadoop for Windows

Next

From Powershell with Administrator privileges, execute the following commands: %WORKSPACE%\jdk-6u31-windows-x64.exe /qn /norestart /log %WORKSPACE%\jdk-6u31-windows-x64.log INSTALLDIR=C:\java\jdk1.6.0_31 setx JAVA_HOME

"C:\java\jdk1.6.0_31" /m where %WORKSPACE% is the full workspace directory path.

Page 28: Installing Hortonworks Hadoop for Windows

Note

Important

Ensure the downloaded JDK .exe file's name matches with jdk-6u31-windows-x64.exe. If not, change the above command to match the EXE file name.For example: C:\prereqs\jdk-6u31-windows-x64.exe /qn /norestart/log C:\prereqs\jdk-6u31-windows-x64.log INSTALLDIR=C:\java\jdk1.6.0_31

Page 29: Installing Hortonworks Hadoop for Windows

Note

Page 30: Installing Hortonworks Hadoop for Windows

Oracle

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jdk-6u31-oth-JPR

Only problem is you have to have an Oracle account or you must create one.

execute the Power Shell command...

http://docs.hortonworks.com/HDPDocuments/HDP1/HDP-Win-1.3.0/bk_installing_hdp_for_windows/content/win-chap2-singlenode.html

Page 31: Installing Hortonworks Hadoop for Windows

Java_Home path

• After the pre-requisites are loaded, Python, DotNet, C++ Redistributables, Oracle JDK, you are now ready to proceed.

First, you'll want to set the JAVA_HOME path in the Environmental Variables:

Page 32: Installing Hortonworks Hadoop for Windows

System Properties

Page 33: Installing Hortonworks Hadoop for Windows

Bug

• Please keep in mind, there is a bug here, you may not have a "SPACE" in your path, so you are advised to change the path to something like this, after you re-install the Java JDK.

Page 34: Installing Hortonworks Hadoop for Windows

Environment Variables

Page 35: Installing Hortonworks Hadoop for Windows

Next, set the PATH to include the Python executable...

Page 36: Installing Hortonworks Hadoop for Windows

You will also want to set the HOSTS file to translate the DNS from IP to Server name:

Page 37: Installing Hortonworks Hadoop for Windows

From the DOS prompt type hostname to obtain your hostname:

Page 38: Installing Hortonworks Hadoop for Windows

Open the HOSTS file in Notepad and apply the necessary change,

Page 39: Installing Hortonworks Hadoop for Windows

Now you'll want to Open all Ports:

Page 40: Installing Hortonworks Hadoop for Windows

Next

• Next you want to modify your ClientProperties.txt file, replace the generic info with actual values, I believe it worked better with IP Address rather than HostName... however, the screen capture had the HostName...

Page 41: Installing Hortonworks Hadoop for Windows

View

Page 42: Installing Hortonworks Hadoop for Windows

And finally, begin the install of Hortonworks Hadoop 1.3 for Windows:

Page 43: Installing Hortonworks Hadoop for Windows

Folders

• You will need to add some folders to you C: as you progress, I experienced many errors and had to add the folders each time, here's a view of some of the folder structure (not complete):

Page 44: Installing Hortonworks Hadoop for Windows

Folders

Page 45: Installing Hortonworks Hadoop for Windows

After some trial and error, we have successfully loaded the application:

Page 46: Installing Hortonworks Hadoop for Windows

Start the services:

Page 47: Installing Hortonworks Hadoop for Windows

You can run the smoke test:

Page 48: Installing Hortonworks Hadoop for Windows

Workaround

• Mine failed here, and it turns out the HDFS was never formatted so to help you out here's the article that explains how to format the HDFS drive:

• http://hortonworks.com/community/forums/topic/namenode-cannot-be-started-after-successful-hdp-1-3-installation/

• WORKAROUND:1. Open the “Hadoop Command Line” Command Prompt shortcut.2. Run the following command that sets up the NameNodedirectories: “hadoop namenode -format”

Page 49: Installing Hortonworks Hadoop for Windows

As you can see here, the list of Services, you may have to manually start the ones which did not start automatically:

Page 50: Installing Hortonworks Hadoop for Windows

Here's another view of the C: folder structure:

Page 51: Installing Hortonworks Hadoop for Windows

And here's the Task/Job tracker web page:

Page 52: Installing Hortonworks Hadoop for Windows

Here's the Log web page:

Page 53: Installing Hortonworks Hadoop for Windows

And lastly, the working file system web page:

Page 54: Installing Hortonworks Hadoop for Windows

And here's the shortcuts on the desktop:

Page 55: Installing Hortonworks Hadoop for Windows

Finished

• And that concludes this presentation.

• Happy Hadooping~!

Page 56: Installing Hortonworks Hadoop for Windows

Jonathan Bloom

Current Position:Senior BI Consultant

• Twitter:

• @SQLJon

• Linked-in:

• http://www.linkedin.com/BloomConsultintBI

• Email:

[email protected]