PrefaceThe previous article installed Hadoop, and this article will install Hbase. Of course, if you just want to do a simple experiment, it is actually quite simple. It only takes about ten minutes to complete this experiment. 😄 Install Hbase2.3.5Hbase 2.3.5 installation address: Hbase 2.3.5 Tsinghua mirror source address After downloading, upload the file to VMware and move it to /usr/local sudo mv hbase-2.3.5-bin.tar.gz /usr/local Unzip hbase tar -zxvf hbase-2.3.5-bin.tar.gz Rename the unzipped hbase-2.3.5 to hbase for later configuration sudo mv /usr/local/hbase-2.3.5 /usr/local/hbase Configuring environment variables Add the bin directory under hbase to the path. In this way, you don’t need to go to the /usr/local/hbase directory to start hbase, which greatly facilitates the use of hbase. The following part of the tutorial still switches to the /usr/local/hbase directory for operation, which helps beginners understand the operation process. Once you become proficient, you don't need to switch. vi ~/.bashrc If PATH has not been introduced, please add the following content to the end of the ~/.bashrc file: export PATH=$PATH:/usr/local/hbase/bin After editing is complete, execute the source command to make the above configuration take effect immediately in the current terminal. The command is as follows: source ~/.bashrc Add HBase permissions cd /usr/local sudo chown -R hadoop ./hbase Test version/usr/local/hbase/bin/hbase version After the command is executed, the output information screenshot is as follows: The above output message indicates that HBase has been installed successfully. Next, we will configure HBase in stand-alone mode. Configure pseudo stand-alone mode configuration /usr/local/hbase/conf/hbase-env.sh. Configure the JAVA environment variables and add the configuration HBASE_MANAGES_ZK to true. Use the vi command to open and edit hbase-env.sh. The command is as follows: vim /usr/local/hbase/conf/hbase-env.sh Configure JAVA environment variables. The default installation directory of jdk is /usr/lib/jvm/java-1.7.0-openjdk, then JAVA _HOME = /usr/lib/jvm/java-7-openjdk-amd64, where java-1.7.0-openjdk is your jdk version; configure HBASE_MANAGES_ZK to true, which means that hbase manages zookeeper itself and does not require a separate zookeeper. These variables are already configured in hbase-env.sh. You just need to delete the # in front and modify the configuration content (# represents a comment): export JAVA_HOME=/usr/lib/jvm/default-java export HBASE_MANAGES_ZK=true After adding, save and exit. Configure /usr/local/hbase/conf/hbase-site.xml vim /usr/local/hbase/conf/hbase-site.xml Before starting HBase, you need to set the property hbase.rootdir to specify the storage location of HBase data. If you do not set it, hbase.rootdir defaults to /tmp/hbase-${user.name}, which means that data will be lost every time the system is restarted. Here it is set to the hbase-tmp folder in the HBase installation directory (/usr/local/hbase/hbase-tmp), add the following configuration: <configuration> <property> <name>hbase.rootdir</name> <value>file:///usr/local/hbase/hbase-tmp</value> </property> </configuration> Save and exit Test command runSwitch to the HBase installation directory /usr/local/hbase and then start HBase. The command is as follows: cd /usr/local/hbase bin/start-hbase.sh bin/hbase shell After starting hbase, test simple table creation commands, data insertion commands, data deletion commands, etc. Create a table create 'student','Sname','Ssex','Sage','Sdept','course' insert put 'student','95001','course:math','80' delete delete 'student','95001','Ssex' Query get 'student','95001' The running screenshots are as follows: SummarizeThe experiment of configuring a stand-alone version of Hbase is relatively simple and can be completed quickly, but learning about the big data ecosystem is not that simple. This is just a simple learning experiment in the basic introductory stage. For learning big data, you still need to maintain continuous learning! come on! This is the end of this article about the detailed tutorial on installing Hbase 2.3.5 on Vmware + Ubuntu18.04. For more relevant content about installing Hbase 2.3.5 on Vmware + Ubuntu18.04, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Zen HTML Elements Friends who use zen coding can collect it
>>: Detailed example of reading speed of js objects
1. Requirements: Database backup is particularly ...
Let me briefly explain the functional scenario: T...
Preface MySQL supports multi-threaded replication...
Preface If someone asks you "What are the ch...
There are two files a.htm and b.htm. In the same d...
On the server, in order to quickly log in to the ...
Table of contents 1. Preface 2. Find two pop-up c...
Recently I have been saying that design needs to h...
Ubuntu 16.04 builds FTP server Install ftp Instal...
Password Mode PDO::__construct(): The server requ...
Table of contents Write docker-compose.yml Run do...
Problem explanation: When using the CSS animation...
This article shares the specific code of Vue to i...
If the field storing the name uses the GBK charac...
Sometimes, while working with files in the Linux ...