CentOS6.5基於ROOT使用者的HDFS偽分散式部署(a Single Node Cluster)
hadoop部署
單機 --無程式
偽分散式部署 -- 程式存在+1節點 開發
叢集部署 -- 程式存在+n階段 開發/生產
#hadoop解壓
[root@hadoop001 software]# tar -xzvf hadoop-2.8.1.tar.gz
[root@hadoop001 software]# chown -R root:root hadoop-2.8.1
[root@hadoop001 hadoop-2.8.1]# ll
drwxrwxr-x. 2 root root 4096 Jun 2 2017 bin -- 執行命令shell
drwxrwxr-x. 3 root root 4096 Jun 2 2017 etc -- 配置檔案
drwxrwxr-x. 2 root root 4096 Jun 2 2017 include
drwxrwxr-x. 3 root root 4096 Jun 2 2017 lib -- 庫
drwxrwxr-x. 2 root root 4096 Jun 2 2017 libexec
-rw-rw-r--. 1 root root 99253 Jun 2 2017 LICENSE.txt
-rw-rw-r--. 1 root root 15915 Jun 2 2017 NOTICE.txt
-rw-r--r--. 1 root root 1366 Jun 2 2017 README.txt
drwxrwxr-x. 2 root root 4096 Jun 2 2017 sbin -- 啟動和關閉hadoop
drwxrwxr-x. 4 root root 4096 Jun 2 2017 share -- jar
#hadoop全域性環境變數
[root@hadoop001 hadoop-2.8.1]# vim /etc/profile
export HADOOP_HOME=/opt/software/hadoop-2.8.1
export PATH=$HADOOP_HOME/bin:$PROTOC_HOME/bin:$FINDBUGS_HOME/bin:$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATH
[root@hadoop001 hadoop-2.8.1]# source /etc/profile
[root@hadoop001 hadoop-2.8.1]# which hadoop
/opt/software/hadoop-2.8.1/bin/hadoop
[root@hadoop001 bin]# rm -rf *.cmd
[root@hadoop001 sbin]# rm -rf *.cmd
#配置core-site檔案
點選(此處)摺疊或開啟
-
[root@hadoop001 hadoop]# vim core-site.xml
<configuration>
-
<property>
-
<name>fs.defaultFS</name>
-
<value>hdfs://localhost:9000</value> --HDFD埠和路徑
-
</property>
-
</configuration>
-
-
[root@hadoop001 hadoop]# vim hdfs-site.xml:
-
<configuration>
-
<property>
-
<name>dfs.replication</name>
-
<value>1</value> -- 叢集主機數量
-
</property>
-
</configuration>
- <configuration>
#本機ssh驗證配置
[root@hadoop001 hadoop]# cd ~
[root@hadoop001 ~]# cd .ssh
[root@hadoop001 .ssh]# ll
total 0
[root@hadoop001 ~]# rm -rf .ssh
[root@hadoop001 ~]# ssh-keygen
[root@hadoop001 ~]# cd .ssh
[root@hadoop001 .ssh]# ll
total 8
-rw-------. 1 root root 1675 May 14 23:38 id_rsa
-rw-r--r--. 1 root root 396 May 14 23:38 id_rsa.pub
[root@hadoop001 .ssh]# cat id_rsa.pub >> authorized_keys
[root@hadoop001 .ssh]# ll
total 12
-rw-r--r--. 1 root root 396 May 14 23:40 authorized_keys
-rw-------. 1 root root 1675 May 14 23:38 id_rsa
-rw-r--r--. 1 root root 396 May 14 23:38 id_rsa.pub
#第一次必須操作,本機修改過埠
[root@hadoop001 ~]# ssh localhost date
ssh: connect to host localhost port 22: Connection refused
[root@hadoop001 ~]# ssh -p2222 localhost date
The authenticity of host '[localhost]:2222 ([::1]:2222)' can't be established.
RSA key fingerprint is 09:b9:67:65:cb:e6:ca:31:5d:33:6c:3b:92:9e:c2:1a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[localhost]:2222' (RSA) to the list of known hosts.
Mon May 14 23:42:37 EDT 2018
#格式化HDFS檔案系統
[root@hadoop001 ~]# which hdfs
/opt/software/hadoop-2.8.1/bin/hdfs
[root@hadoop001 ~]# hdfs namenode -format
#啟動HDFS檔案系統
[root@hadoop001 sbin]# /opt/software/hadoop-2.8.1/sbin/start-dfs.sh
Starting namenodes on [localhost]
localhost: ssh: connect to host localhost port 22: Connection refused
localhost: ssh: connect to host localhost port 22: Connection refused
Starting secondary namenodes [0.0.0.0]
0.0.0.0: ssh: connect to host 0.0.0.0 port 22: Connection refused
#解決port 22錯誤
[root@hadoop000 hadoop]# vi hadoop-env.sh
新增:export HADOOP_SSH_OPTS="-p 2222"
#解決 ERROR:JAVA_HOME
[root@hadoop000 hadoop]# vi hadoop-env.sh
export JAVA_HOME=/usr/java/jdk1.8.0_45
#啟動OK
[root@hadoop001 sbin]# /opt/software/hadoop-2.8.1/sbin/start-dfs.sh
[root@hadoop001 hadoop]# /opt/software/hadoop-2.8.1/sbin/start-dfs.sh
Starting namenodes on [localhost]
localhost: starting namenode, logging to /opt/software/hadoop-2.8.1/logs/hadoop-root-namenode-hadoop001.out
localhost: starting datanode, logging to /opt/software/hadoop-2.8.1/logs/hadoop-root-datanode-hadoop001.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /opt/software/hadoop-2.8.1/logs/hadoop-root-secondarynamenode-hadoop001.out
#檢測與啟動
[root@hadoop000 hadoop-2.8.1]# jps
16243 Jps
15943 DataNode
5127 Launcher
16139 SecondaryNameNode
15853 NameNode
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31441024/viewspace-2154526/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- CentOS6.5基於Hadoop使用者的HDFS偽分散式部署(a Single Node Cluster)CentOSHadoop分散式
- CentOS6.5基於Hadoop使用者的Yarn偽分散式部署(a Single Node Cluster)CentOSHadoopYarn分散式
- CentOS6.5實現Hadoop_2.8.1編譯及HDFS偽分散式部署CentOSHadoop編譯分散式
- 偽分散式hdfs的配置(個人總結)分散式
- 3.Hadoop Single Node Cluster安裝Hadoop
- 在 Ubuntu 22 的基礎上進行 Hadoop 偽分散式(HDFS)的搭建UbuntuHadoop分散式
- hadoop3.1.0 HDFS快速搭建偽分散式環境Hadoop分散式
- Redis 偽分散式安裝部署配置Redis分散式
- Mac部署hadoop3(偽分散式)MacHadoop分散式
- 大資料2-Hadoop偽分散式+ZK+HDFS大資料Hadoop分散式
- root加到hadoop的hdfs使用者組內Hadoop
- HDFS分散式儲存分散式
- 大規模MySQL運維陷阱之基於MyCat的偽分散式架構MySql運維分散式架構
- Hadoop基礎(一):分散式檔案系統HDFSHadoop分散式
- 基於redis的分散式鎖Redis分散式
- 基於 Redis 的分散式鎖Redis分散式
- 基於kubernetes的分散式限流分散式
- 分散式爬蟲的部署之Scrapyd分散式部署分散式爬蟲
- HDFS分散式叢集搭建分散式
- hadoop官網翻譯第二天Setting up a Single Node Cluster.Hadoop
- 分散式Redis深度歷險-Cluster分散式Redis
- 基於java的分散式爬蟲Java分散式爬蟲
- 基於 dubbo 的分散式架構分散式架構
- hadoop+spark偽分散式HadoopSpark分散式
- 基於 Redis 分散式鎖Redis分散式
- 分散式檔案系統-HDFS分散式
- Hadoop hdfs完全分散式搭建教程Hadoop分散式
- HDFS分散式檔案系統分散式
- MinIO 的分散式部署分散式
- [翻譯]基於redis的分散式鎖Redis分散式
- 基於zookeeper的分散式配置中心(一)分散式
- 基於Redis分散式BitMap的應用Redis分散式
- 基於 Zookeeper 的分散式鎖實現分散式
- 基於node實現Vue打包部署指令碼Vue指令碼
- RabbitMQ 中的分散式,普通 cluster 模式的構建MQ分散式模式
- Hbase偽分散式環境搭建分散式
- 什麼是HDFS 分散式儲存分散式
- 基於redis做分散式鎖Redis分散式