In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to deploy hbase under windows. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
I. preparation
Prepare and configure the following dependencies according to the official wiki requirements of hbase.
Jre / jdk
Cygwin & openssh
Hbase
Two of them have already been done when hadoop is deployed, leaving only openssh and hbase to deploy.
Because there are a lot of problems, can not write down one by one, if there are any problems, you can leave a message to discuss together.
Second, install ssh
Microsoft has officially developed openssh,OpenSSH for PowerShell under the windows platform.
The blogger downloaded the latest version directly. Unzip it and open a powershell with your administrator. Run cd directly to the extracted directory. Sir, it's key.
.\ ssh-keygen.exe-t rsa-f ssh_host_rsa_key.\ ssh-keygen.exe-t dsa-f ssh_host_dsa_key.\ ssh-keygen.exe-t ecdsa-f ssh_host_ecdsa_key.\ ssh-keygen.exe-t ed25519-f ssh_host_ed25519_key
Later, when I saw the tutorial, it was said to be direct.
.\ ssh-keygen.exe-a
It's fine, but you don't try. You can try it like this first.
Then run.\ sshd.exe if there are no other problems, there should be no prompt. If you are worried, continue to type netstat-ano to check the ports on which windows is now open. If you see 22, it means sshd is up.
At this time, we will run again.
.\ install-sshd.ps1
This script publishes sshd as a windows service, but the runtime may report a prompt to disable the execution of the script on this system. If so, continue to enter permission commands:
Set-executionpolicy
Prompt whether it is Yes or not, just click Y.
At this time, run ssh username@localhost to test, you should be prompted to enter the password of username, enter it.
Then, you need to add this directory to PATH in order to use ssh in cmd.
(after the blogger installed, the log of sshd somehow became 101G, and filled up the disk. It should be a bug. Because it has not been reproduced, the blogger does not care about it for the time being, so it is best not to put the ssh on the system disk. I do not know if the system will hang up if the disk breaks out. )
II. Hbase
Download the binary package of hbase, I use 1.1.5 stable version. Download the tar.gz package, and the blogger decompresses it to P:\ hbase-1.1.5
In fact, I also did an operation, that is, to replace the relevant jar package of the hadoop compiled in the previous article with hbase-1.1.5/lib/hadoop-.jar, because I saw a tutorial saying that the jar package in hbase should be the same as the version of my hadoop, but the blogger does not know whether it has any effect or not, so we can skip this step and replace it later if something goes wrong.
3. Configure 3. 1 configure cygwin
In fact, the blogger is very strange that the hbase release package provides cmd scripts, which theoretically do not rely on cygwin, but in cygwin, the script runs sh, but the program actually uses .exe. Wiki does not mention what the file of the package cmd is for (maybe cmd is still testing?). Bloggers have tried to deploy in windows cmd, but failed. Conditional children's shoes can write a tutorial without cygwin ^ _ ^ (because on the surface, Microsoft has solved the problem of sshd, and the script should be changed to windows, there should be no problem)
The main thing that needs to be configured under cygwin is to map the path under windows to linux. So we need to build a few "shortcuts".
# # Mapping the path of jdk to ln-s / cygdrive/p/jdk7 / usr/local/jdk7## in linux and mapping the path of hbase to ln-s / cygdrive/p/hbase-1.1.5 / usr/local/hbase-1.1.53.2 configuration hbase3.2.1 P:\ hbase-1.1.5\ conf\ hbase-env.sh in linux
Find JAVA_HOME, uncomment, and set the value to / usr/local/jdk7
Look for HBASE_OPTS add-Dhadoop.home.dir=P:/hado both specifies the hadoop directory.
There is another tutorial that mentions the need to set up export HBASE_CLASSPATH=/usr/local/hbase-???/lib/zookeeper-???.jar:/usr/local/hbase-???/lib/slf4j-api-???.jar:/usr/local/hbase-???/lib/slf4j-log4j12-???.jar. On behalf of the version number) although the blogger has set it up, it feels that it should not be needed.
3.2.2 P:\ hbase-1.1.5\ conf\ hbase-site.xml
A file called. / conf/hbase-default.xml is mentioned in the official wiki, but this file is not available under windows. After searching, it is found that this is the configuration file used only by the hbase development environment, while the actual use of this file is hbase-site.xml, so the file is fine. Add the following items to the file:
Hbase.rootdir hdfs://0.0.0.0:19000/hbase hbase.tmp.dir P:/hadoop/cygwin64/tmp/hbase_tmp hbase.zookeeper.quorum 127.0.0.1 hbase.cluster.distributed false
* however, bloggers do not know what these things are @ _ @ * *
4. Start hbase
Uh... Regardless of the complicated configuration, let's start and try it first. Execute in cygwin.
/ usr/local/hbase-1.1.5/conf/hbase-env.sh/usr/local/hbase-1.1.5/bin/start-hbase.sh
If nothing happens, hbase will prompt you to enter the password of ssh, which will launch successfully. Here hbase starts the background process, that is, cygwin can still be operated, but the window of cygwin still cannot be closed, which will cause the hbase process to stop.
5. Testing
Continue to enter in cygwin
/ usr/local/hbase-1.1.5/bin/hbase shell
Open a shell window for hbase. Then you can enter the command.
Create 'test',' data'listput 'test',' row1', 'data:1','value1'put' test', 'row2',' data:2','value2'put 'test',' row3', 'data:3','value3'
The test results are as follows:
Thank you for reading! This is the end of the article on "how to deploy hbase under windows". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.