Install Hadoop
Install Hadoop
Install Hadoop
source /etc/environment
echo $JAVA_HOME
java -version
Install ssh
sudo apt install openssh-server openssh-client
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys
Install Hadoop:
wget https://dlcdn.apache.org/hadoop/common/hadoop-2.10.1/hadoop-2.10.1.tar.gz
tar xzf hadoop-2.10.1.tar.gz
mv hadoop-2.10.1 hadoop
cd hadoop/etc/hadoop
nano core-site.xml
----- core-site.xml ---------
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
nano hdfs-site.xml
---- hdfs-site.xml ----
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>file:///home/ubuntu/hadoop/hdfs/namenode </value>
</property>
<property>
<name>dfs.data.dir</name>
<value>file:///home/ubuntu/hadoop/hdfs/datanode </value>
</property>
</configuration>
nano yarn-site.xml
--- yarn-site.xml ----
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
---------------
-- Environment Setup —
cp ~/.bashrc ~/.bashrc0
nano ~/.bashrc
source ~/.bashrc
nano ~/hadoop/etc/hadoop/hadoop-env.sh
----- hadoop-env.sh ------
Thay đường dẫn : JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
-------------
- Name Node Setup
hdfs namenode -format
- Verifying Hadoop dfs
start-dfs.sh
- Verifying Yarn Script
start-yarn.sh
- Or start all:
start-all.sh
- jps
- Accessing Hadoop on Browser
http://localhost:50070/
- Verify All Applications for Cluster
http://localhost:8088/
Eclipse:
Them thu vien nguoi dung Hadoop: add cac file jar trong cac thu muc sau:
hadoop/share/hadoop/common/
hadoop/share/hadoop/common/lib
hadoop/share/hadoop/hdfs
hadoop/share/hadoop/yarn
hadoop/share/hadoop/mapreduce
Cai dat Hadoop cluster:
Apache Hadoop Installation on Multi Node Tutorial | CloudDuggu
Tutorial Hadoop multi node installation - intellitech.pro
Apache Hive:
Cài đặt và cấu hình:
>> https://sparkbyexamples.com/apache-hive/apache-hive-installation-on-hadoop/
<property>
<name>hadoop.proxyuser.ubuntu.hosts</name>
<value>*</value>
</property>
Start HiveServer
$ mkdir ~/hiveserver2log
$ cd ~/hiveserver2log
$ nohup hiveserver2 &
$ nohup hive --service hiveserver2 &
$ nohup hive --service hiveserver2 --hiveconf hive.server2.thrift.port=10000 --hiveconf
hive.root.logger=INFO,console &
$ tail -f ~/hiveserver2log/nohup.out
Hive Tutorial:
https://www.guru99.com/hive-tutorials.html
https://sparkbyexamples.com/apache-hive-tutorial/