HOWTO install Hadoop on Windows
Installing the Hortonworks Data Platform for Windows couldn’t be easier. Lets take a look at how to install a one node cluster on your Windows Server 2012 machine. Follow @hortonworksto let us know if you’d like more content like this.
To start, download the HDP for Windows MSI at http://hortonworks.com/thankyou-hdp11-win/. It is about 460MB, and will take a moment to download. Documentation for the download is available here.
As indicated in the documentation here, first we must install Microsoft Visual C++ 2010 Redistributable Package (x64), available here.
Download and install .NET from here if you haven’t already.
We need to setup Java, which you can get here. We need to setup JAVA_HOME, which Hadoop requires. Make sure to install Java to somewhere without a space in the path, “Program Files” will not work!
To setup JAVA_HOME, in the file browsers -> right click computer -> Properties -> Advanced System Settings -> Environment variables. Then setup a new System variable called JAVA_HOME that points to your Java install (in this case, C:\java\jdk1.6.0_31).
Finally, we need to download python from here and set the Path environment variable as we did JAVA_HOME. Go to Computer -> Properties -> Advanced System Settings -> Environment variables. Then append the install path to Python, for example C:\Python27, to this path after a ‘;’.
Verify your path is setup by entering a new shell and typing: python
, which should run the python interpreter. Type quit() to exit. Now we’re ready for our configuration.
Next, notepad the file clusterproperties.txt
, which we will setup for a simple, one node cluster operation. Note: first we need to discover our hostname, and enter it into our config instead of something generic like ‘localhost.’ Use the hostname command, for example:
hostname
WIN-4VLBRQK8FA8
We then place this hostname in our config. Be sure the replace the example value with your own hostname!
#Log directory
HDP_LOG_DIR=c:\hadoop\logs
#Data directory
HDP_DATA_DIR=c:\hadoop\data
#Hosts
NAMENODE_HOST=WIN-4VLBRQK8FA8
SECONDARY_NAMENODE_HOST=WIN-4VLBRQK8FA8
JOBTRACKER_HOST=WIN-4VLBRQK8FA8
HIVE_SERVER_HOST=WIN-4VLBRQK8FA8
OOZIE_SERVER_HOST=WIN-4VLBRQK8FA8
TEMPLETON_HOST=WIN-4VLBRQK8FA8
SLAVE_HOSTS=WIN-4VLBRQK8FA8
#Database host
DB_FLAVOR=derby
DB_HOSTNAME=WIN-4VLBRQK8FA8
#Hive properties
HIVE_DB_NAME=hive
HIVE_DB_USERNAME=hive
HIVE_DB_PASSWORD=hive
#Oozie properties
OOZIE_DB_NAME=oozie
OOZIE_DB_USERNAME=oozie
OOZIE_DB_PASSWORD=oozie
And finally, install HDP for Windows:
msiexec.exe /i "hdp-1.1.0-160.winpkg.msi" /lv install.log \
HDP_LAYOUT=c:\Users\Administrator\Downloads\clusterproperties.txt HDP_DIR=c:\HDP DESTROY_DATA="yes"
This will bring up an MSI install window. When it is done, to verify your installation, check the HDP_DIR it was installed to:
dir c:\HDP
You should see files, such as ‘start_local_hdp_services.cmd’. Run this file:
.\start_local_hdp_services.cmd
With services up, you’re in good shape to run the SmokeTests.
Run-SmokeTests.cmd
Which will fire off a mapreduce job right away. Congratulations, you’re Hadooping on Windows!
If you’d like to learn more about Hadoop, check out the Hortonworks Sandbox, a fully capable virtual machine for you to learn Hadoop with.
转自:http://hortonworks.com/blog/installing-hadoop-on-windows/
上一篇: 装饰器模式(Decorator)
下一篇: python词频统计 生成词云
推荐阅读
-
HOWTO install Hadoop on Windows
-
windows下idea中搭建hadoop开发环境,向远程hadoop集群提交mapreduce任务
-
Windows安装Python、pip、easy_install的方法
-
Windows安装Python、pip、easy_install的方法
-
配置Windows+Hadoop+IDEA+Maven开发环境
-
windows 7 with eclipse 下hadoop应用开发环境搭建
-
windows下idea编写WordCount程序,并打jar包上传到hadoop集群运行
-
How to install PHP ISAPI on Windows 2008 IIS7 x64 <转载>
-
hadoop入门:在windows上用Eclipse编写程序
-
python在Windows下安装setuptools(easy_install工具)步骤详解