SlideShare a Scribd company logo
1 of 19
Download to read offline
Taiwan Steel Union
Hadoop 3.1.1
Single-node Installation on Ubuntu
康志強
2018/8/23
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
1
一、 前言................................................................................................................................. 2
二、安裝環境................................................................................................................................. 3
三、安裝步驟................................................................................................................................. 4
1. 安裝環境說明................................................................................................................. 4
2. 設定................................................................................................................................. 5
3. Single node 設定.............................................................................................................. 6
4. Cloud001 的 SSH 無密碼登入........................................................................................ 7
5. 安裝 JDK......................................................................................................................... 8
6. Hadoop 3.1.1 安裝......................................................................................................... 10
7. Hadoop 3.1.1 啟動......................................................................................................... 15
五、REFERENCE:....................................................................................................................... 18
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
2
一、前言
 http://hadoop.apache.org/
 Hadoop Common: The common utilities that support the other Hadoop modules.
 Hadoop Distributed File System (HDFS™): A distributed file system that
provides high-throughput access to application data.
 Hadoop YARN: A framework for job scheduling and cluster resource
management.
 Hadoop MapReduce: A YARN-based system for parallel processing of large data
sets.

Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
3
二、安裝環境
VM Platform AWS t3.large
VM Guest OS ubuntu-16.04
VMRAM 8.0 GB
VM HD EBS
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
4
三、安裝步驟
1. 安裝環境說明
這裡我們建構一個由一台機器組成的叢集
Hostname User/Password Cluster 角色 OS
ubuntu/ ubuntu Name node
Secondary Name node
Resource manager
ubuntu-16.04 64 bits
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
5
2. 設定
(1) 修改 hostname , 改成 cloud001
vim /etc/hostname
(2) 修改 hduser 權限 : (跳過)
vim /etc/sudoers
(3) 系统升级到最新
sudo apt-get update
sudo apt-get upgrade
基本上先把 cloud001 裝好,再 clone 成 002,003 後,改 hotname 就可以了
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
6
3. Single node 設定
ubuntu@ip-172-30-1-102:~$ vim /etc/hosts
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
7
4. Cloud001 的 SSH 無密碼登入
(1) 安裝 SSH
sudo apt-get install ssh
(2) 產生金鑰(一直 Enter 就可以)
ubuntu@ip-172-30-1-102:~$ ssh-keygen -t rsa
(3) 把 id_rsa.pub 追加到授權的 key 裡面去
ubuntu@ip-172-30-1-102:~$ cat id_rsa.pub >> authorized_keys
(4) 重啟 SSH 服務
ubuntu@ip-172-30-1-102:~$ service ssh restart
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
8
測試
ssh localhost
5. 安裝 JDK
安裝 Java (OpenJDK 1.8.0) 及 設定環境變數
ubuntu@ip-172-30-1-102:~$ sudo apt-get install openjdk-8-jre openjdk-8-jdk
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
9
環境變數
ubuntu@ip-172-30-1-102:~$ vim ~/.bashrc
最後面增加
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HADOOP_HOME=/usr/local/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib/native"
export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native:$JAVA_LIBRARY_PATH
[ NOTE ] : 上述環境變數設定中的指令 :
export HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib/native"
是為了解決下列出現 "無法使用本地 Java library” 的警告訊息 :
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform...
using builtin-java classes where applicable
輸入下面的命令來使之生效
ubuntu@ip-172-30-1-102:~$ source ~/.bashrc
測試
ubuntu@ip-172-30-1-102:~$ java -version
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
10
6. Hadoop 3.1.1 安裝
(1) 下載檔案 hadoop-3.1.1.tar.gz, 解壓到/usr/local 路径下
ubuntu@ip-172-30-1-102:~$wget http://www-
us.apache.org/dist/hadoop/common/hadoop-3.1.1/hadoop-3.1.1.tar.gz
# 直接解壓縮到 /usr/local
ubuntu@ip-172-30-1-102:~$ sudo tar -zxvf ./hadoop-3.1.1.tar.gz -C /usr/local
ubuntu@ip-172-30-1-102:~$ cd /usr/local
# 將檔案夾名稱改為 hadoop
ubuntu@ip-172-30-1-102:~$ sudo mv ./hadoop-3.1.1/ ./hadoop
(2) hadoop 配置
配置之前,需要在 cloud001 新增以下資料夾
/home/hduser/dfs/name
/home/hduser/dfs/data
/home/hduser/temp
sudo rm -rf /usr/local/hadoop/hadoopdata/hdfs
mkdir -p /usr/local/hadoop/hadoopdata/hdfs/namenode
mkdir -p /usr/local/hadoop/hadoopdata/hdfs/datanode
sudo chown -R ubuntu:ubuntu /usr/local/hadoop
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
11
修改相關設定擋案內容,清單如下
/usr/local/hadoop/etc/hadoop/core-site.xml
/usr/local/hadoop/etc/hadoop/hadoop-env.sh
/usr/local/hadoop/etc/hadoop/hdfs-site.xml
/usr/local/hadoop/etc/hadoop/yarn-site.xml
/usr/local/hadoop/etc/hadoop/mapred-site.xml
修改 hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
修改 core-site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://Cloud001:9000</value>
</property>
</configuration>
修改 hdfs-site.xml
<configuration>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>Cloud001:9001</value>
</property>
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
12
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value> file:/usr/local/hadoop/hadoopdata/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value> file:/usr/local/hadoop/hadoopdata/hdfs/datanode</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
13
修改 mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>yarn.app.mapreduce.am.env</name>
<value>HADOOP_MAPRED_HOME=/usr/local/hadoop</value>
</property>
<property>
<name>mapreduce.map.env</name>
<value>HADOOP_MAPRED_HOME=/usr/local/hadoop</value>
</property>
<property>
<name>mapreduce.reduce.env</name>
<value>HADOOP_MAPRED_HOME=/usr/local/hadoop</value>
</property>
</configuration>
修改 yarn-site.xml
<configuration>
<!-- Site specific YARN configuration properties -->
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
14
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.nodemanager.resource.cpu-vcores</name>
<value>8</value>
</property>
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>8192</value>
</property>
</configuration>
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
15
7. Hadoop 3.1.1 啟動
(1) 格式化 HDFS NameNode:
hadoop namenode -format
(2) 格式化 HDFS DataNode
hadoop datanode -format
(3) 啟動 hdfs
start-dfs.sh
(4) 啟動 YARN
start-yarn.sh
(4) 檢查 Java processes
jps
(5) 查看叢集狀態
hdfs dfsadmin –report
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
16
(6) 查看文件組成
hdfs fsck / -files –blocks
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
17
(7) 查看 HDFS
(8) 查看 RM
Hadoop 3.1.1 (Signle-node) Installation on Ubuntu
18
五、REFERENCE:
1. “How to Setup Hadoop 3.1 on CentOS, Ubuntu and LinuxMint”
https://tecadmin.net/setup-hadoop-single-node-cluster-on-centos-redhat/
2. “How to Install Hadoop On Ubuntu 17.10 And Run Your First MapReduce Program”
https://www.digitalvidya.com/blog/install-hadoop-on-ubuntu-and-run-your-first-mapreduce-
program/
3. How do I set or change the root password for my EC2 Linux instance?
https://aws.amazon.com/tw/premiumsupport/knowledge-center/set-change-root-linux/

More Related Content

What's hot

Component pack 6006 install guide
Component pack 6006 install guideComponent pack 6006 install guide
Component pack 6006 install guideRoberto Boccadoro
 
Hadoop Cluster - Basic OS Setup Insights
Hadoop Cluster - Basic OS Setup InsightsHadoop Cluster - Basic OS Setup Insights
Hadoop Cluster - Basic OS Setup InsightsSruthi Kumar Annamnidu
 
Domino9on centos6
Domino9on centos6Domino9on centos6
Domino9on centos6a8us
 
HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성Young Pyo
 
How to create a secured multi tenancy for clustered ML with JupyterHub
How to create a secured multi tenancy for clustered ML with JupyterHubHow to create a secured multi tenancy for clustered ML with JupyterHub
How to create a secured multi tenancy for clustered ML with JupyterHubTiago Simões
 
High Availability Server with DRBD in linux
High Availability Server with DRBD in linuxHigh Availability Server with DRBD in linux
High Availability Server with DRBD in linuxAli Rachman
 
Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2IMC Institute
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoringTiago Simões
 
Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6Manish Chopra
 
NFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center OperationsNFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center OperationsCumulus Networks
 
Installing and Configuring Domino 10 on CentOS 7
Installing and Configuring Domino 10 on CentOS 7Installing and Configuring Domino 10 on CentOS 7
Installing and Configuring Domino 10 on CentOS 7Devin Olson
 
Ceph_And_OpenStack_Red_Hat_Summit_2015_Boston_20150606
Ceph_And_OpenStack_Red_Hat_Summit_2015_Boston_20150606Ceph_And_OpenStack_Red_Hat_Summit_2015_Boston_20150606
Ceph_And_OpenStack_Red_Hat_Summit_2015_Boston_20150606Diaa Radwan
 
17) 11 (may, 2003) squid master this proxy server
17) 11 (may, 2003)   squid master this proxy server17) 11 (may, 2003)   squid master this proxy server
17) 11 (may, 2003) squid master this proxy serverswarup1435
 
How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...Tiago Simões
 
Automated infrastructure is on the menu
Automated infrastructure is on the menuAutomated infrastructure is on the menu
Automated infrastructure is on the menujtimberman
 
MySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en EspañolMySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en EspañolKeith Hollman
 
SSD based storage tuning for databases
SSD based storage tuning for databasesSSD based storage tuning for databases
SSD based storage tuning for databasesAngelo Rajadurai
 

What's hot (20)

Hadoop completereference
Hadoop completereferenceHadoop completereference
Hadoop completereference
 
Component pack 6006 install guide
Component pack 6006 install guideComponent pack 6006 install guide
Component pack 6006 install guide
 
Hadoop Cluster - Basic OS Setup Insights
Hadoop Cluster - Basic OS Setup InsightsHadoop Cluster - Basic OS Setup Insights
Hadoop Cluster - Basic OS Setup Insights
 
Domino9on centos6
Domino9on centos6Domino9on centos6
Domino9on centos6
 
HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성HADOOP 실제 구성 사례, Multi-Node 구성
HADOOP 실제 구성 사례, Multi-Node 구성
 
How to create a secured multi tenancy for clustered ML with JupyterHub
How to create a secured multi tenancy for clustered ML with JupyterHubHow to create a secured multi tenancy for clustered ML with JupyterHub
How to create a secured multi tenancy for clustered ML with JupyterHub
 
High Availability Server with DRBD in linux
High Availability Server with DRBD in linuxHigh Availability Server with DRBD in linux
High Availability Server with DRBD in linux
 
Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoring
 
Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6
 
NFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center OperationsNFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center Operations
 
Installing and Configuring Domino 10 on CentOS 7
Installing and Configuring Domino 10 on CentOS 7Installing and Configuring Domino 10 on CentOS 7
Installing and Configuring Domino 10 on CentOS 7
 
Ceph_And_OpenStack_Red_Hat_Summit_2015_Boston_20150606
Ceph_And_OpenStack_Red_Hat_Summit_2015_Boston_20150606Ceph_And_OpenStack_Red_Hat_Summit_2015_Boston_20150606
Ceph_And_OpenStack_Red_Hat_Summit_2015_Boston_20150606
 
17) 11 (may, 2003) squid master this proxy server
17) 11 (may, 2003)   squid master this proxy server17) 11 (may, 2003)   squid master this proxy server
17) 11 (may, 2003) squid master this proxy server
 
How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...
 
Automated infrastructure is on the menu
Automated infrastructure is on the menuAutomated infrastructure is on the menu
Automated infrastructure is on the menu
 
Solaris
SolarisSolaris
Solaris
 
MySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en EspañolMySQL Replication: Demo Réplica en Español
MySQL Replication: Demo Réplica en Español
 
Pdf c1t tlawaxb
Pdf c1t tlawaxbPdf c1t tlawaxb
Pdf c1t tlawaxb
 
SSD based storage tuning for databases
SSD based storage tuning for databasesSSD based storage tuning for databases
SSD based storage tuning for databases
 

Similar to Hadoop 3.1.1 single node

installation of hadoop on ubuntu.pptx
installation of hadoop on ubuntu.pptxinstallation of hadoop on ubuntu.pptx
installation of hadoop on ubuntu.pptxvishal choudhary
 
Mahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud PlatformMahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud PlatformIMC Institute
 
#VirtualDesignMaster 3 Challenge 4 – James Brown
#VirtualDesignMaster 3 Challenge 4 – James Brown#VirtualDesignMaster 3 Challenge 4 – James Brown
#VirtualDesignMaster 3 Challenge 4 – James Brownvdmchallenge
 
Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14jijukjoseph
 
Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesWilliam Lee
 
Hadoop installation on windows
Hadoop installation on windows Hadoop installation on windows
Hadoop installation on windows habeebulla g
 
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...Hadoop installation and Running KMeans Clustering with MapReduce Program on H...
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...Titus Damaiyanti
 
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage ServiceQuick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage ServiceCloudian
 
Erp 2.50 openbravo environment installation openbravo-wiki
Erp 2.50 openbravo environment installation   openbravo-wikiErp 2.50 openbravo environment installation   openbravo-wiki
Erp 2.50 openbravo environment installation openbravo-wikiyaranusa
 
How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7VCP Muthukrishna
 
Fedora 17-installation guide-en-us
Fedora 17-installation guide-en-usFedora 17-installation guide-en-us
Fedora 17-installation guide-en-usnelson-10
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5William Lee
 
Setup and run hadoop distrubution file system example 2.2
Setup and run hadoop  distrubution file system example  2.2Setup and run hadoop  distrubution file system example  2.2
Setup and run hadoop distrubution file system example 2.2Mounir Benhalla
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14kmsa
 

Similar to Hadoop 3.1.1 single node (20)

installation of hadoop on ubuntu.pptx
installation of hadoop on ubuntu.pptxinstallation of hadoop on ubuntu.pptx
installation of hadoop on ubuntu.pptx
 
Mahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud PlatformMahout Workshop on Google Cloud Platform
Mahout Workshop on Google Cloud Platform
 
#VirtualDesignMaster 3 Challenge 4 – James Brown
#VirtualDesignMaster 3 Challenge 4 – James Brown#VirtualDesignMaster 3 Challenge 4 – James Brown
#VirtualDesignMaster 3 Challenge 4 – James Brown
 
Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14
 
Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP Languages
 
Hadoop installation on windows
Hadoop installation on windows Hadoop installation on windows
Hadoop installation on windows
 
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...Hadoop installation and Running KMeans Clustering with MapReduce Program on H...
Hadoop installation and Running KMeans Clustering with MapReduce Program on H...
 
RDO-Packstack Workshop
RDO-Packstack Workshop RDO-Packstack Workshop
RDO-Packstack Workshop
 
Hadoop 2.4 installing on ubuntu 14.04
Hadoop 2.4 installing on ubuntu 14.04Hadoop 2.4 installing on ubuntu 14.04
Hadoop 2.4 installing on ubuntu 14.04
 
Snort-IPS-Tutorial
Snort-IPS-TutorialSnort-IPS-Tutorial
Snort-IPS-Tutorial
 
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage ServiceQuick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
 
Erp 2.50 openbravo environment installation openbravo-wiki
Erp 2.50 openbravo environment installation   openbravo-wikiErp 2.50 openbravo environment installation   openbravo-wiki
Erp 2.50 openbravo environment installation openbravo-wiki
 
How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7
 
user-guide-a4.pdf
user-guide-a4.pdfuser-guide-a4.pdf
user-guide-a4.pdf
 
Fedora 17-installation guide-en-us
Fedora 17-installation guide-en-usFedora 17-installation guide-en-us
Fedora 17-installation guide-en-us
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
Setup and run hadoop distrubution file system example 2.2
Setup and run hadoop  distrubution file system example  2.2Setup and run hadoop  distrubution file system example  2.2
Setup and run hadoop distrubution file system example 2.2
 
Influxdb
InfluxdbInfluxdb
Influxdb
 
Lab docker
Lab dockerLab docker
Lab docker
 
Oracle11g On Fedora14
Oracle11g On Fedora14Oracle11g On Fedora14
Oracle11g On Fedora14
 

More from 康志強 大人

AWS Lambda Multi-Cloud Practices
AWS Lambda Multi-Cloud PracticesAWS Lambda Multi-Cloud Practices
AWS Lambda Multi-Cloud Practices康志強 大人
 
AWS CloudFront、S3 Streamming
AWS CloudFront、S3 StreammingAWS CloudFront、S3 Streamming
AWS CloudFront、S3 Streamming康志強 大人
 
Running Hadoop on Amazon EC2
Running Hadoop on Amazon EC2Running Hadoop on Amazon EC2
Running Hadoop on Amazon EC2康志強 大人
 
FreeNAS installation and setup for shared storage (1/2)
FreeNAS installation and setup for shared storage (1/2)FreeNAS installation and setup for shared storage (1/2)
FreeNAS installation and setup for shared storage (1/2)康志強 大人
 
CloudStack Installation on Ubuntu
CloudStack Installation on UbuntuCloudStack Installation on Ubuntu
CloudStack Installation on Ubuntu康志強 大人
 
OpenSTACK Installation on Ubuntu
OpenSTACK Installation on UbuntuOpenSTACK Installation on Ubuntu
OpenSTACK Installation on Ubuntu康志強 大人
 
JackHare- a framework for SQL to NoSQL translation using MapReduce
JackHare- a framework for SQL to NoSQL translation using MapReduceJackHare- a framework for SQL to NoSQL translation using MapReduce
JackHare- a framework for SQL to NoSQL translation using MapReduce康志強 大人
 

More from 康志強 大人 (8)

AWS Lambda Multi-Cloud Practices
AWS Lambda Multi-Cloud PracticesAWS Lambda Multi-Cloud Practices
AWS Lambda Multi-Cloud Practices
 
AWS CloudFront、S3 Streamming
AWS CloudFront、S3 StreammingAWS CloudFront、S3 Streamming
AWS CloudFront、S3 Streamming
 
Running Hadoop on Amazon EC2
Running Hadoop on Amazon EC2Running Hadoop on Amazon EC2
Running Hadoop on Amazon EC2
 
Tomcat ssl 設定
Tomcat ssl 設定Tomcat ssl 設定
Tomcat ssl 設定
 
FreeNAS installation and setup for shared storage (1/2)
FreeNAS installation and setup for shared storage (1/2)FreeNAS installation and setup for shared storage (1/2)
FreeNAS installation and setup for shared storage (1/2)
 
CloudStack Installation on Ubuntu
CloudStack Installation on UbuntuCloudStack Installation on Ubuntu
CloudStack Installation on Ubuntu
 
OpenSTACK Installation on Ubuntu
OpenSTACK Installation on UbuntuOpenSTACK Installation on Ubuntu
OpenSTACK Installation on Ubuntu
 
JackHare- a framework for SQL to NoSQL translation using MapReduce
JackHare- a framework for SQL to NoSQL translation using MapReduceJackHare- a framework for SQL to NoSQL translation using MapReduce
JackHare- a framework for SQL to NoSQL translation using MapReduce
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Hadoop 3.1.1 single node

  • 1. Taiwan Steel Union Hadoop 3.1.1 Single-node Installation on Ubuntu 康志強 2018/8/23
  • 2. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 1 一、 前言................................................................................................................................. 2 二、安裝環境................................................................................................................................. 3 三、安裝步驟................................................................................................................................. 4 1. 安裝環境說明................................................................................................................. 4 2. 設定................................................................................................................................. 5 3. Single node 設定.............................................................................................................. 6 4. Cloud001 的 SSH 無密碼登入........................................................................................ 7 5. 安裝 JDK......................................................................................................................... 8 6. Hadoop 3.1.1 安裝......................................................................................................... 10 7. Hadoop 3.1.1 啟動......................................................................................................... 15 五、REFERENCE:....................................................................................................................... 18
  • 3. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 2 一、前言  http://hadoop.apache.org/  Hadoop Common: The common utilities that support the other Hadoop modules.  Hadoop Distributed File System (HDFS™): A distributed file system that provides high-throughput access to application data.  Hadoop YARN: A framework for job scheduling and cluster resource management.  Hadoop MapReduce: A YARN-based system for parallel processing of large data sets. 
  • 4. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 3 二、安裝環境 VM Platform AWS t3.large VM Guest OS ubuntu-16.04 VMRAM 8.0 GB VM HD EBS
  • 5. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 4 三、安裝步驟 1. 安裝環境說明 這裡我們建構一個由一台機器組成的叢集 Hostname User/Password Cluster 角色 OS ubuntu/ ubuntu Name node Secondary Name node Resource manager ubuntu-16.04 64 bits
  • 6. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 5 2. 設定 (1) 修改 hostname , 改成 cloud001 vim /etc/hostname (2) 修改 hduser 權限 : (跳過) vim /etc/sudoers (3) 系统升级到最新 sudo apt-get update sudo apt-get upgrade 基本上先把 cloud001 裝好,再 clone 成 002,003 後,改 hotname 就可以了
  • 7. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 6 3. Single node 設定 ubuntu@ip-172-30-1-102:~$ vim /etc/hosts
  • 8. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 7 4. Cloud001 的 SSH 無密碼登入 (1) 安裝 SSH sudo apt-get install ssh (2) 產生金鑰(一直 Enter 就可以) ubuntu@ip-172-30-1-102:~$ ssh-keygen -t rsa (3) 把 id_rsa.pub 追加到授權的 key 裡面去 ubuntu@ip-172-30-1-102:~$ cat id_rsa.pub >> authorized_keys (4) 重啟 SSH 服務 ubuntu@ip-172-30-1-102:~$ service ssh restart
  • 9. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 8 測試 ssh localhost 5. 安裝 JDK 安裝 Java (OpenJDK 1.8.0) 及 設定環境變數 ubuntu@ip-172-30-1-102:~$ sudo apt-get install openjdk-8-jre openjdk-8-jdk
  • 10. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 9 環境變數 ubuntu@ip-172-30-1-102:~$ vim ~/.bashrc 最後面增加 export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 export HADOOP_HOME=/usr/local/hadoop export PATH=$PATH:$HADOOP_HOME/bin export PATH=$PATH:$HADOOP_HOME/sbin export HADOOP_MAPRED_HOME=$HADOOP_HOME export HADOOP_COMMON_HOME=$HADOOP_HOME export HADOOP_HDFS_HOME=$HADOOP_HOME export YARN_HOME=$HADOOP_HOME export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native export HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib/native" export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native:$JAVA_LIBRARY_PATH [ NOTE ] : 上述環境變數設定中的指令 : export HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib/native" 是為了解決下列出現 "無法使用本地 Java library” 的警告訊息 : WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 輸入下面的命令來使之生效 ubuntu@ip-172-30-1-102:~$ source ~/.bashrc 測試 ubuntu@ip-172-30-1-102:~$ java -version
  • 11. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 10 6. Hadoop 3.1.1 安裝 (1) 下載檔案 hadoop-3.1.1.tar.gz, 解壓到/usr/local 路径下 ubuntu@ip-172-30-1-102:~$wget http://www- us.apache.org/dist/hadoop/common/hadoop-3.1.1/hadoop-3.1.1.tar.gz # 直接解壓縮到 /usr/local ubuntu@ip-172-30-1-102:~$ sudo tar -zxvf ./hadoop-3.1.1.tar.gz -C /usr/local ubuntu@ip-172-30-1-102:~$ cd /usr/local # 將檔案夾名稱改為 hadoop ubuntu@ip-172-30-1-102:~$ sudo mv ./hadoop-3.1.1/ ./hadoop (2) hadoop 配置 配置之前,需要在 cloud001 新增以下資料夾 /home/hduser/dfs/name /home/hduser/dfs/data /home/hduser/temp sudo rm -rf /usr/local/hadoop/hadoopdata/hdfs mkdir -p /usr/local/hadoop/hadoopdata/hdfs/namenode mkdir -p /usr/local/hadoop/hadoopdata/hdfs/datanode sudo chown -R ubuntu:ubuntu /usr/local/hadoop
  • 12. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 11 修改相關設定擋案內容,清單如下 /usr/local/hadoop/etc/hadoop/core-site.xml /usr/local/hadoop/etc/hadoop/hadoop-env.sh /usr/local/hadoop/etc/hadoop/hdfs-site.xml /usr/local/hadoop/etc/hadoop/yarn-site.xml /usr/local/hadoop/etc/hadoop/mapred-site.xml 修改 hadoop-env.sh export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 修改 core-site.xml <configuration> <property> <name>fs.default.name</name> <value>hdfs://Cloud001:9000</value> </property> </configuration> 修改 hdfs-site.xml <configuration> <property> <name>dfs.namenode.secondary.http-address</name> <value>Cloud001:9001</value> </property>
  • 13. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 12 <property> <name>dfs.replication</name> <value>3</value> </property> <property> <name>dfs.namenode.name.dir</name> <value> file:/usr/local/hadoop/hadoopdata/hdfs/namenode</value> </property> <property> <name>dfs.datanode.data.dir</name> <value> file:/usr/local/hadoop/hadoopdata/hdfs/datanode</value> </property> <property> <name>dfs.webhdfs.enabled</name> <value>true</value> </property>
  • 14. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 13 修改 mapred-site.xml <configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> <property> <name>yarn.app.mapreduce.am.env</name> <value>HADOOP_MAPRED_HOME=/usr/local/hadoop</value> </property> <property> <name>mapreduce.map.env</name> <value>HADOOP_MAPRED_HOME=/usr/local/hadoop</value> </property> <property> <name>mapreduce.reduce.env</name> <value>HADOOP_MAPRED_HOME=/usr/local/hadoop</value> </property> </configuration> 修改 yarn-site.xml <configuration> <!-- Site specific YARN configuration properties -->
  • 15. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 14 <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> <property> <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name> <value>org.apache.hadoop.mapred.ShuffleHandler</value> </property> <property> <name>yarn.nodemanager.resource.cpu-vcores</name> <value>8</value> </property> <property> <name>yarn.nodemanager.resource.memory-mb</name> <value>8192</value> </property> </configuration>
  • 16. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 15 7. Hadoop 3.1.1 啟動 (1) 格式化 HDFS NameNode: hadoop namenode -format (2) 格式化 HDFS DataNode hadoop datanode -format (3) 啟動 hdfs start-dfs.sh (4) 啟動 YARN start-yarn.sh (4) 檢查 Java processes jps (5) 查看叢集狀態 hdfs dfsadmin –report
  • 17. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 16 (6) 查看文件組成 hdfs fsck / -files –blocks
  • 18. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 17 (7) 查看 HDFS (8) 查看 RM
  • 19. Hadoop 3.1.1 (Signle-node) Installation on Ubuntu 18 五、REFERENCE: 1. “How to Setup Hadoop 3.1 on CentOS, Ubuntu and LinuxMint” https://tecadmin.net/setup-hadoop-single-node-cluster-on-centos-redhat/ 2. “How to Install Hadoop On Ubuntu 17.10 And Run Your First MapReduce Program” https://www.digitalvidya.com/blog/install-hadoop-on-ubuntu-and-run-your-first-mapreduce- program/ 3. How do I set or change the root password for my EC2 Linux instance? https://aws.amazon.com/tw/premiumsupport/knowledge-center/set-change-root-linux/