格式化:
- hadoop namenode -format
启动:
- start-all.sh
查看进程:
- jps
查询端口状态
- netstat -anpt | grep 50070
访问webui 公网ip:50070
hadoop的web管理界面打不开解决办法;初学hadoop,使用阿里云服务器首先在阿里云控制台找到服务器防火墙打开50070端口服务器控制台–>选择服务器–>安全–>防火墙–>安全规则–>50070完成
在hdfs-site.xml 文件里面添加如下内容<configuration>
<property>
<name>dfs.namenode.http-address</name>
<value>0.0.0.0:50075</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>###50070为默认端口,若想使用别的端口,可自行调整。
core-site.xml 文件
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:8020</value>
</property>
</configuration>
当这些的部署好了需要去关闭防火墙
- systemctl enadle firewalld.service //启用
- systemctl disable firewalld.service //禁用
- systemctl start firewalld.service //启动
- systemctl stop firewalld.service //停止
- systemctl status firewalld.service //查看状态