HADOOP篇
HADOOP安装
1.tar -zvxf hadoop-0.19.2.tar.gz
2.HADOOP的安装路径添加到环境文件/etc/profile中:export HADOOP_HOME=/home/hadoop/setup/hadoop-0.19.2HADOOP配置
export PATH=$HADOOP_HOME/bin:$PATH
1.在$HADOOP/conf/hadoop-env.sh中配置JAVA环境
export JAVA_HOME=/home/hadoop/setup/jdk1.7.0_04
2.在$HADOOP/conf/hadoop-site.xml中增加如下配置
- <span?style="font-size:?small;"><property>?????
- ??<name>fs.default.name</name>?????
- ??<value>hdfs://localhost:9000</value>?????
- </property>?????
- <property>?????
- ??<name>mapred.job.tracker</name>?????
- ??<value>localhost:9001</value>?????
- </property>?????
- <property>?????
- ???<name>dfs.replication</name>?????
- ???<value>1</value>?????
- ?</property></span>??
1.格式化namenode
$HADOOP_HOME/bin/hadoop namenode -format
2.启动hadoop
$HADOOP_HOME/bin/start-all.sh?
HIVE篇
HIVE安装
1.tar -zvxf hive-0.6.0.tar.gz
2.HIVE的安装路径配置到环境文件/etc/profile中:
export HIVE_HOME=/home/hadoop/setup/hive-0.6.0
export PATH=$HIVE_HOME/bin:$PATH
HIVE配置
1.在$HIVE_HOME/conf下创建文件hive-site.xml
- <span?style="font-size:?small;"><?xml?version="1.0"?>????
- <?xml-stylesheet?type="text/xsl"?href="configuration.xsl"?>????
- ????
- <configuration>????
- ?<property>????
- ?<name>hive.metastore.local</name>????
- ???<value>true</value>????
- ?</property>????
- ????
- ?<property>????
- ?<name>javax.jdo.option.ConnectionURL</name>????
- ???<value>jdbc:mysql://192.168.0.237:3306/metastore_db?createDatabaseIfNotExist=true</value>????
- ?</property>????
- ?????
- ?<property>????
- ?<name>javax.jdo.option.ConnectionDriverName</name>????
- ???<value>com.mysql.jdbc.Driver</value>????
- ?</property>????
- ?????
- ?<property>?????
- ???<name>javax.jdo.option.ConnectionUserName</name>?????
- ???<value>t237</value>?????
- ?</property>?????
- ???????
- ?<property>?????
- ???<name>javax.jdo.option.ConnectionPassword</name>?????
- ???<value>123456</value>?????
- ?</property>?????
- ?<property>?????
- ???<name>datanucleus.fixedDatastore</name>?????
- ???<value>false</value>?????
- ?</property>?????
- </configuration>??</span>??
2.HIVE运行
hadoop@ubuntu:~$ hive?