hadoop2.4.1完全分布式安装 hadoop2.4.1完全分布式安装 :http://blog.itpub.net/26613085/viewspace-1219710/
[hadoop@master ~]$ id
groups=500(hadoop)
[hadoop@master ~]$ pwd
/home/hadoop
[hadoop@master ~]$ ll
total 269008
-rwxrwxrwx
1 hadoop hadoop 54246778 Jul 17 14:01
apache-hive-0.13.1-bin.tar.gz
drwxrwxr-x 4 hadoop hadoop 4096 Jul 15 22:42 dfs
drwxr-xr-x 10 hadoop hadoop 4096 Jul 15 23:30 hadoop-2.4.1
-rwxrwxrwx 1 root root 138656756 Jul 15 17:12 hadoop-2.4.1.tar.gz
drwxrwxr-x 8 hadoop hadoop 4096 Jul 17 00:27 hbase-0.98.2-hadoop2
-rwxrwxrwx 1 hadoop hadoop 82246622 Jul 16 23:22 hbase-0.98.2-hadoop2-bin.tar.gz
drwxrwxr-x 3 hadoop hadoop 4096 Jul 15 23:30 tmp
drwxrwxr-x 3 hadoop hadoop 4096 Jul 17 00:27 zookeeper
[hadoop@master ~]$ tar
-zxvf apache-hive-0.13.1-bin.tar.gz
[hadoop@master ~]$ ll
drwxrwxr-x 8 hadoop hadoop 4096 Jul 17 14:02 apache-hive-0.13.1-bin
-rwxrwxrwx 1 hadoop hadoop 54246778 Jul 17 14:01 apache-hive-0.13.1-bin.tar.gz
drwxrwxr-x 4 hadoop hadoop 4096 Jul 15 22:42 dfs
drwxr-xr-x 10 hadoop hadoop 4096 Jul 15 23:30 hadoop-2.4.1
-rwxrwxrwx 1 root root 138656756 Jul 15 17:12 hadoop-2.4.1.tar.gz
drwxrwxr-x 8 hadoop hadoop 4096 Jul 17 00:27 hbase-0.98.2-hadoop2
-rwxrwxrwx 1 hadoop hadoop 82246622 Jul 16 23:22 hbase-0.98.2-hadoop2-bin.tar.gz
drwxrwxr-x 3 hadoop hadoop 4096 Jul 15 23:30 tmp
drwxrwxr-x 3 hadoop hadoop 4096 Jul 17 00:27 zookeeper
[hadoop@master ~]$ cd
apache-hive-0.13.1-bin/conf
[hadoop@master conf]$ vi hive-site.xml
fs.default.name
hdfs://master:8020
mapred.job.tracker
master:8032
javax.jdo.option.ConnectionURL
jdbc:mysql://slave-5:3306/hivedb
javax.jdo.option.ConnectionDriverName
com.mysql.jdbc.Driver
javax.jdo.option.ConnectionUserName
hive
javax.jdo.option.ConnectionPassword
mysql
[root@master hadoop]# vi
/etc/profile
export HIVE_HOME=/home/hadoop/apache-hive-0.13.1-bin
export PATH=$HIVE_HOME/bin:$PATH
[root@master hadoop]#source /etc/profile
[root@master hadoop]# su – hadoop
[hadoop@master ~]$ hive
Logging initialized using configuration in
jar:file:/home/hadoop/apache-hive-0.13.1-bin/lib/hive-common-0.13.1.jar!/hive-log4j.properties
hive> create table
tt(id int,name string); hive>
select * from tt;
OK Time taken: 0.693 seconds
hive> select * from tt;
OK Time taken:
1.054 seconds
查看下hadoop 的文件结构,可以发现有了一些变化
[hadoop@master conf]$
hadoop fs -ls /user/hive/warehouse
14/07/17 16:46:05 WARN
util.NativeCodeLoader: Unable to load native-hadoop library for your
platform... using builtin-java classes where applicable
Found 1 items
drwxr-xr-x - hadoop supergroup 0 2014-07-17 16:44 /user/hive/warehouse/tt
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26613085/viewspace-1221351/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26613085/viewspace-1221351/