hadoop部署
[root@xiong ~]# hostnamectl set-hostname hadoop001
[root@xiong ~]# vim /etc/hostname
hadoop001
vim /etc/sysconfig/network
# Created by anaconda
NETWORKING_IPV6=no
PEERNTP=no
HOSTNAME=hadoop001
[root@xiong ~]# reboot
[root@hadoop001 ~]# useradd hadoop
[root@hadoop001 ~]# su - hadoop
[hadoop@hadoop001 ~]$ mkdir app
[root@hadoop001 ~]# mkdir /usr/java
[root@hadoop001 ~]# mkdir /usr/share/java -p
[root@hadoop001 app]# tar -xzvf jdk-8u144-linux-x64.tar.gz -C /usr/java
[root@hadoop001 java]# chown -R root:root jdk1.8.0_144
[root@hadoop001 java]# ls -la
total 12
drwxr-xr-x 3 root root 4096 Feb 23 18:49 .
drwxr-xr-x. 14 root root 4096 Feb 23 17:34 ..
drwxr-xr-x 8 root root 4096 Jul 22 2017 jdk1.8.0_144
[root@hadoop001 java]# vim /etc/profile
#env
export JAVA_HOME=/usr/java/jdk1.8.0_144
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JER_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JER_HOME/bin:$PATH
[root@hadoop001 java]# source /etc/profile
[root@hadoop001 java]# java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
[root@hadoop001 app]# mv hadoop-2.6.0-cdh5.7.0.tar.gz /home/hadoop/app/
[root@hadoop001 app]# su - hadoop
[hadoop@hadoop001 app]$ ls
hadoop-2.6.0-cdh5.7.0.tar.gz
[hadoop@hadoop001 etc]$ vim hadoop/core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
[hadoop@hadoop001 etc]$ vim hadoop/hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
[hadoop@hadoop001 etc]$ ssh-keygen
[hadoop@hadoop001 etc]$ cd ~/.ssh/
[hadoop@hadoop001 .ssh]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[hadoop@hadoop001 .ssh]$ ls -la
total 20
drwx------ 2 hadoop hadoop 4096 Feb 23 19:04 .
drwx------ 4 hadoop hadoop 4096 Feb 23 19:03 ..
-rw-rw-r-- 1 hadoop hadoop 398 Feb 23 19:04 authorized_keys
-rw------- 1 hadoop hadoop 1679 Feb 23 19:03 id_rsa
-rw-r--r-- 1 hadoop hadoop 398 Feb 23 19:03 id_rsa.pub
[hadoop@hadoop001 .ssh]$ chmod 600 authorized_keys
[hadoop@hadoop001 .ssh]$ ls -la
total 20
drwx------ 2 hadoop hadoop 4096 Feb 23 19:04 .
drwx------ 4 hadoop hadoop 4096 Feb 23 19:03 ..
-rw------- 1 hadoop hadoop 398 Feb 23 19:04 authorized_keys
-rw------- 1 hadoop hadoop 1679 Feb 23 19:03 id_rsa
-rw-r--r-- 1 hadoop hadoop 398 Feb 23 19:03 id_rsa.pub
[hadoop@hadoop001 .ssh]$ cd ~/app/hadoop-2.6.0-cdh5.7.0
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ bin/hdfs namenode -format
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ sbin/start-dfs.sh
19/02/23 19:08:53 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: Error: JAVA_HOME is not set and could not be found.
localhost: Error: JAVA_HOME is not set and could not be found.
Starting secondary namenodes [0.0.0.0]
The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established.
ECDSA key fingerprint is SHA256:gjoxsGPX3oqDeiLcTFqMmr7e5YyE6UbM4Qns9Z8FY6E.
ECDSA key fingerprint is MD5:5a:ad:48:61:69:e7:fc:45:c8:4c:4d:66:e0:b7:50:ff.
Are you sure you want to continue connecting (yes/no)? yes
0.0.0.0: Warning: Permanently added '0.0.0.0' (ECDSA) to the list of known hosts.
0.0.0.0: Error: JAVA_HOME is not set and could not be found.
19/02/23 19:09:06 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ echo $JAVA_HOME
/usr/java/jdk1.8.0_144
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ cd etc/hadoop
[hadoop@hadoop001 hadoop]$ vim hadoop-env.sh
export JAVA_HOME=/usr/java/jdk1.8.0_144
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ sbin/start-dfs.sh
19/02/23 19:12:13 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: starting namenode, logging to /home/hadoop/app/hadoop-2.6.0-cdh5.7.0/logs/hadoop-hadoop-namenode-hadoop001.out
localhost: starting datanode, logging to /home/hadoop/app/hadoop-2.6.0-cdh5.7.0/logs/hadoop-hadoop-datanode-hadoop001.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /home/hadoop/app/hadoop-2.6.0-cdh5.7.0/logs/hadoop-hadoop-secondarynamenode-hadoop001.out
19/02/23 19:12:28 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ jps
2842 NameNode
3226 Jps
3117 SecondaryNameNode
2959 DataNode
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ vim ~/.bash_profile
export HADOOP_PREFIX=/home/hadoop/app/hadoop-2.6.0-cdh5.7.0
export PATH=$HADOOP_PREFIX/bin:$PATH
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ source ~/.bash_profile
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ hdfs dfs -ls /
19/02/23 19:16:31 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ hdfs dfs -mkdir /hello
19/02/23 19:17:37 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ hdfs dfs -ls /
19/02/23 19:17:46 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 2019-02-23 19:17 /hello
hadoop部署的更多相关文章
- hadoop部署小结的命令
hadoop部署总结的命令 学习笔记,转自:hadoop部署总结的命令http://www.aboutyun.com/thread-5385-1-1.html(出处: about云开发)
- Hadoop 部署文档
Hadoop 部署文档 1 先决条件 2 下载二进制文件 3 修改配置文件 3.1 core-site.xml 3.2 hdfs-site.xml 3.3 mapred-site.xml 3.4 ya ...
- hadoop进阶----hadoop经验(一)-----生产环境hadoop部署在超大内存服务器的虚拟机集群上vs几个内存较小的物理机
生产环境 hadoop部署在超大内存服务器的虚拟机集群上 好 还是 几个内存较小的物理机上好? 虚拟机集群优点 虚拟化会带来一些其他方面的功能. 资源隔离.有些集群是专用的,比如给你三台设备只跑一个 ...
- Hadoop部署方式-完全分布式(Fully-Distributed Mode)
Hadoop部署方式-完全分布式(Fully-Distributed Mode) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 本博客搭建的虚拟机是伪分布式环境(https://w ...
- Hadoop部署方式-伪分布式(Pseudo-Distributed Mode)
Hadoop部署方式-伪分布式(Pseudo-Distributed Mode) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.下载相应的jdk和Hadoop安装包 JDK:h ...
- Hadoop部署方式-本地模式(Local (Standalone) Mode)
Hadoop部署方式-本地模式(Local (Standalone) Mode) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. Hadoop总共有三种运行方式.本地模式(Local ...
- hadoop部署中遇到ssh设置的问题
尽管hadoop和一些培训视频课程上讲分布式部署比较详细,但是在部署时仍遇到了一些小问题,在此mark一下: 1.linux的namenode主机上安装了ssh,也启动了ssh,并且执行了: /etc ...
- hadoop部署工具与配置工具
https://github.com/xianglei/phpHiveAdmin 随着Hadoop的推出,大数据处理实现了技术上的落地.但是对于一般的公司和开发者而言,Hadoop依旧是一个陌生或者难 ...
- hadoop部署、启动全套过程
Hadoop是Apache基金会的开源项目,为开发者提供了一个分布式系统的基础架构,用户可以在不了解分布式系统的底层细节的情况下开发分布式的应用,充分利用集群的强大功能,实现高速运算和存储.Hadoo ...
- hadoop部署错误
hadoop的单机部署很简单也不容易出错,但是对生产环境的价值和意义不大,但是可以快速用于开发. 部署hadoop的错误原因不少,并且很奇怪. 比如,用户名不同,造成客户端和服务器通讯产生认证失败的错 ...
随机推荐
- LOJ子序列
题目描述 https://loj.ac/problem/6074 题解 对于子序列的dp,我们可以设置一个dp. 我们设dp[i]表示以i这个字符结尾的子序列个数,转移为dp[i]+=∑dp[k]-d ...
- postgresSQL 实现数据修改后,自动更新updated_date/ts等字段
1. 需求说明: 实现MYSQL中有on update CURRENT_TIMESTAMP 2. 需求分析 由于数据库迁移需要将MYSQL中的数据迁移到postgresSQL中,由于MYSQL中有on ...
- 树莓派中QT实现I2C
树莓派中QT实现I2C 在QT中实现 I2C 使用的驱动为 wiringPi 库的引入 LIBS += -lwiringPi LIBS += -lwiringPiDev 代码实现 widget.h 中 ...
- C++: 类成员初始化列表语法
类的成员初始化列表的初始化的基本语法,类的构造函数还可以运用此语法为其变量初始化: class Class { private: int a; int b; char ch; public: Cl ...
- Educational Codeforces Round 63 (Rated for Div. 2)
传送门 A. Reverse a Substring 题意: 给你一串 s,让你判断能否通过反转区间[l,r]的元素,使得反转后的串的字典序小于 s: 如果能,输出 "YES",并 ...
- [源码分析]StringBuffer
[源码分析]StringBuffer StringBuffer是继承自AbstractStringBuilder的. 这里附上另外两篇文章的连接: AbstractStringBuilder : ht ...
- java压缩文件或文件夹并导出
java压缩文件或文件夹并导出 tozipUtil: package com.zhl.push.Utils; import java.io.File; import java.io.FileInput ...
- linux下安装kubectl
查看所有版本: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md 下载指定版本: curl -O https://dl ...
- luasocket编译安装遇到的坑
由于需要获得本机的IP地址,所以需要 : local socket = require('socket') local server_hostname = socket.dns.gethostname ...
- 1、IDEA的常用快捷键
一.常用的快捷键1.Ctrl+/ 或 Ctrl+Shift+/ 注释(// 或者/*...*/ )###2.Ctrl+D 复制行### 注意在MyEclipse中Ctrl+D的作用是删除行3.Ctrl ...