Hadoop 1.x 伪分布式安装部署

发布时间:2024-01-08 16:20:15

1.关闭防火墙和selinux

service iptables stop #关闭

service iptables status ?#查看状态

cd /etc/sysconfig/selinux修改为disable


2.设置为静态的IP


3.IP和主机名要一致

hostname查看主机名

cd /etc/hosts ??

vim hosts修改ip地址后的主机名,与hostname一致

修改/etc/sysconfig/network中HOSTNAME的值为hostname的值

/etc/rc.d/init.d/network?restart 重启

来源:http://blog.csdn.net/shirdrn/article/details/6562292


4.java环境变量配置

cd /opt/software/hadoop

?cd hadoop-1.2.1

cd conf

vim??hadoop-env.sh

设置文件中的JAVA_HOME,并将#去掉


5.输入命令

[root@localhost root]# ssh-keygen -t rsa

之后一直点回车

[root@localhost root]# cd .ssh
[root@localhost .ssh]# ls
id_rsa ?id_rsa.pub
[root@localhost .ssh]# ll
total 8
-rw------- ? ?1 root ? ? root ? ? ? ? ?887 Jun 20 03:48 id_rsa
-rw-r--r-- ? ?1 root ? ? root ? ? ? ? ?219 Jun 20 03:48 id_rsa.pub
[root@localhost .ssh]# cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

[root@localhost .ssh]# ll

[root@localhost .ssh]# ssh localhost
The authenticity of host 'localhost (192.168.235.10)' can't be established.
RSA key fingerprint is 05:36:83:f3:3c:d7:03:1a:38:16:59:7c:e2:c0:e8:54.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost,192.168.235.10' (RSA) to the list of known hosts.
Last login: Sat Jun 20 03:08:07 2015 from 192.168.235.1
[root@root root]# exit
logout
Connection to localhost closed.
[root@localhost .ssh]# ll
total 16
-rw-r--r-- ? ?1 root ? ? root ? ? ? ? ?219 Jun 20 03:50 authorized_keys
-rw------- ? ?1 root ? ? root ? ? ? ? ?887 Jun 20 03:48 id_rsa
-rw-r--r-- ? ?1 root ? ? root ? ? ? ? ?219 Jun 20 03:48 id_rsa.pub
-rw-r--r-- ? ?1 root ? ? root ? ? ? ? ?234 Jun 20 03:51 known_hosts
[root@localhost .ssh]# ssh localhost
Last login: Sat Jun 20 03:51:38 2015 from localhost.localdomain


5.使用utraleidt编辑文件

配置core-site.xml、mapred-site.xml、hdfs-site.xml。

请参考:http://www.cnblogs.com/linjiqin/archive/2013/06/21/3147880.html

文章来源:https://shanml.blog.csdn.net/article/details/46574695
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。