http://alans.se/blog/2010/hadoop-hbase-cygwin-windows-7-x64/#software
In this post I will describe how to get
a
Having spent the better part of a week reading through blog posts and documentation, I found that none of them covered the process in full detail, at least not for the software versions I intended to use.
This guide was written
for
UPDATE
UPDATE
UPDATE
You will additionally need
Throughout this guide I will assume that your Cygwin install path will be c:cygwin and that Hadoop, ZooKeeper and HBase will be installed in c:cygwinetclocal (/etc/local/), this is however something you can choose yourself. If you choose to install Cygwin elsewhere, I would recommend to use folder names without whitespaces and other non-regular charaters.
The only prerequisite for this quite is that you have Java installed and added to your %PATH% variable (which is usually done automatically).
Download each software bundle and put it somewhere where you'll easilly find it later.
If you've never used Cygwin (or Linux/Unix/etc), you should perhaps get familiar with those environments first. If you still want to continue, read on.
Throughout the Cygwin section - if you find yourself lost, please
follow
If you're familiar with Cygwin you just need to make sure you have these packages installed:
Additionally you will have to set configure ssh to start as a service, and enable passwordless logins. To do this, fire up a Cygwin terminal window after you've completed the installation and do the following:
When asked about privilege separation
answer
When asked if sshd should be installed as a service
answer
When asked about the CYGWIN environment variable,
enter
Now go to the Services and Applications toll in Windows, locate
the
Next Cygwin step is to set up the passwordless login. Go to your
Cygwin terminal and enter
Do
This will add your identification key to the set of authorized
keys, i.e. those that are allowed to login without entering a
password.
Try connecting to localhost to see whether it works
Doing this the first time should prompt you with a warning, enter yes and enter. Now try issuing the same command, this time there should be no warning and no need to enter a password.
This concludes the Cygwin installation.

Since Vlad's guide is made for Hadoop 0.19.0, some of the configuration details specified in his guide do not apply anymore (or have moved to other files), this is an updated version what you'll find in his guide.
First - copy the downloaded tar.gz file to c:cygwinusrlocal (which corresponds to /usr/local in the Cygwin environment). When this is done, it's time to extract the package, this is done by issuing
This command extracts the content of the downloaded hadoop file
into c:cygwinusrlocalhadoop-0.21.0
(/usr/local/hadoop-0.21.0).
Hadoop requires some configuration, the configuration files are
located in c:cygwinusrlocalhadoop-0.21.0conf.
The files that need to be altered are:
core-site.xml
mapred-site.xml
and hdfs-site.xml
Only Hadoop 0.21.0:
Add this line before the line containing
The reason for this is that in order for the CLASSPATH to be build with all the Hadoop jars (line ~120 to ~200) the path needs to be in the Cygwin format (/cygdrive/c/cygwin/usr/local/hadoop...), however in order for Java use the classpath, it needs to be in the Windows format (c:cygwinusrlocalhadoop..). The line transforms the Cygwin built classpath to one that is understood by Windows.
This should be enough for Hadoop to run, test the installation by issuing these commands in a Cygwin window:
The last command will take some seconds to finish and should
produce about 20 lines of output during the creation of the
namenode filesystem.
The final step of the Hadoop setup is to start it and test
it.
To start it issue the following commands in a Cygwin window:
Providing no error messages are printed, this should have started
Hadoop. This can be checked by opening http://localhost:9100 and
http://localhost:9101 in a browser. The first link should provide
information about the NameNode, make sure that the Live Nodes count
is 1. The second link provides information about the cluster.
Now it's time to run a little job on the cluster to see whether or
not the installation was successfull.
First, copy some files to the node:
Provided there were no errors, you've just run your first Hadoop process.

This step, it seems, is only necessary if you're installing the
setup on 64 bit Windows.
The problem seems to be that the ZooKeeper server which comes
bundled with HBase does not work correctly, and thus a standalone
one needs to be set up.
Luckily the ZooKeeper install and configuration is quite easy.
First, copy the download zookeeper-3.3.1-tar.gz file to your c:cygwinusrlocal directory, open a Cygwin window and issue the following commands:
ZooKeeper's configuration file (zoo.cfg) is located in
/usr/local/zookeeper-3.3.1/conf
(c:cygwinusrlocazookeeper-3.3.1conf).
Open the file and paste the following content into it, overwriting
the original config:
Make sure to create the /tmp/zookeeper/data directory and make it writable for everyone (chmod 777).
ZooKeeper is started by typing:
Make sure to test if ZooKeeper is running correctly by connecting to it
This should connect you to ZooKeeper, you can
type

Start by copying hbase-0.20.6.tar.gz to c:cygwinusrllocal and extracting it by issuing
in a Cygwin terminal.
Now it's time to create a symlink to your JRE directory in /usr/local/. Do this by typing:
in a Cygwin terminal. will most likely be jre6, but be sure to double check this before making the link.
HBase's configuration files are located in /usr/local/hbase-0.20.6/conf/ (C:cygwinusrlocalhbase-0.20.6conf), and to get HBase up and running we need to edit hbase-env.sh and hbase-default.xml.
In the hbase-env.sh the JAVA_HOME, HBASE_IDENT_STRING and
HBASE_MANAGES_ZK variables have to be set,
The last variable tells HBase not to use the bundled ZooKeeper server, as we've already installed a stand alone one.
Next, the hbase-default.xml file has to be edited, the two
properties that need to be set
are
Make sure that both directories exist and are writeable by all users (chmod 777).
The command for starting HBase is:
This section is very similar to what's found on the
HBase
Having done all these steps, it's time to start up the cluster.
The startup procedure should follow this order:
So what you do is:
ZooKeeper:
Hadoop:
HBase:
In order to get my system up and running, I used tutorials and information posted by others, this is simply an aggregation of several resources. These include:
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24029704/viewspace-1120669/ ,如需转载,请注明出处,否则将追究法律责任。