In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Foreword:
In the last article, we introduced the relevant contents of Hive source code compilation. This article will mainly introduce the steps of building Hive environment and its simple use. 1. Download the installation package and unzip the # download address http://archive.cloudera.com/cdh6/cdh/5/ Select hive-1.1.0-cdh6.7.0.tar.gz package You can also use the package [hadoop@hadoop000 ~] $lltotal 32drwxrwxr-x 4 hadoop hadoop 4096 Jun 1 21:27 app-- the software installation path drwx- 3 hadoop hadoop 4096 Jun 1 21:46 datadrwxrwxr-x 2 hadoop hadoop 4096 May 31 19:41 libdrwxrwxr-x 2 hadoop hadoop 4096 May 31 19:41 maven_repodrwxrwxr-x 2 hadoop hadoop 4096 Jun 1 21:46 pidsdrwxrwxr-x 2 hadoop hadoop 4096 May 31 19:42 shelldrwxrwxr-x 2 hadoop hadoop 4096 May 31 19:48 software-installation package path drwxrwxr-x 3 hadoop hadoop 4096 May 31 20:59 source-source package path [hadoop@hadoop000 ~] $cd software/ [hadoop@hadoop000 software] $pwd/home/hadoop/software [hadoop@hadoop000 software] $wget http://archive.cloudera.com/cdh6/cdh/5/hive-1.1.0-cdh6.7.0.tar.gz[hadoop@hadoop000 software] $tar-xzvf hive-1.1. 0-cdh6.7.0.tar.gz-C / home/hadoop/app/2. Configure the environment variable [hadoop@oradb3 ~] $vi. Bash _ profile# to add the following: export HIVE_HOME=/home/hadoop/app/hive-1.1.0-cdh6.7.0export PATH=$HIVE_HOME/bin:$ path [Hadoop @ oradb3 ~] $source. Bash _ profile# or add to the global environment variable / etc/profile can also be 3. Profile modification [hadoop@hadoop000 conf] $pwd/home/hadoop/app/hive-1.1.0-cdh6.7.0/conf [hadoop@hadoop000 conf] $cp hive-env.sh.template hive-env.sh [hadoop@hadoop000 conf] $vi hive-env.sh# change HADOOP_HOMEHADOOP_HOME=/home/hadoop/app/hadoop-2.6.0-cdh6.7.0 [hadoop@hadoop000 conf] $vi hive-site.xml Javax.jdo.option.ConnectionURL jdbc:mysql://localhost:3306/ruozedata_basic03?createDatabaseIfNotExist=true javax.jdo.option.ConnectionDriverName com.mysql.jdbc.Driver javax.jdo.option.ConnectionUserName root javax.jdo.option.ConnectionPassword 123456 4. Add the MySQL driver package under lib # you need to download the download address https://dev.mysql.com/downloads/connector/j/[hadoop@oradb3 lib] $pwd/home/hadoop/app/hive-1.1.0-cdh6.7.0/lib [hadoop@oradb3 lib] $ll mysql-connector-java-5.1.13-bin.jar-rw-r--r-- 1 hadoop hadoop 767492 Jun 1 22:01 mysql-connector-java-5.1.13-bin.jar5. Create a table to test [hadoop@oradb3 ~] $hivewhich: no hbase in (/ home/hadoop/app/hive-1.1.0-cdh6.7.0/bin:/home/hadoop/app/hadoop-2.6.0-cdh6.7.0/bin:/usr/java/jdk1.7/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin) Logging initialized using configuration in jar:file:/home/hadoop/app / HiveMur1.1.0 Mustco cdh6.7.0According to HiveMub 1.1.0 Mustco Cdh6.7.0.jarhammer stop hiveMurray log4j.propertieshive > create database ruoze OKTime taken: 1.35 secondshive > use ruoze;OKTime taken: 0.05 secondshive > create table test (id int); OKTime taken: 0.65 secondshive > show tables;OKtestTime taken: 0.239 seconds, Fetched: 1 row (s) # for more information, please see: https://blog.csdn.net/scgaliguodong123_/article/details/46868525
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.