Ubuntu 14.04 LTS下安装Hadoop 1.2.1(集群分布式模式)(8)

hadoop@master:/opt/hadoop-1.2.1/bin$ ./start-all.sh starting namenode, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-hadoop-namenode-master.out slave2: starting datanode, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-hadoop-datanode-slave2.out slave1: starting datanode, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-hadoop-datanode-slave1.out master: starting datanode, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-hadoop-datanode-master.out master: starting secondarynamenode, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-hadoop-secondarynamenode-master.out starting jobtracker, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-hadoop-jobtracker-master.out slave2: starting tasktracker, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-hadoop-tasktracker-slave2.out slave1: starting tasktracker, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-hadoop-tasktracker-slave1.out master: starting tasktracker, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-hadoop-tasktracker-master.out hadoop@master:/opt/hadoop-1.2.1/bin$ jps 5088 JobTracker 5010 SecondaryNameNode 4871 DataNode 4732 NameNode 5277 Jps 5230 TaskTracker hadoop@master:/opt/hadoop-1.2.1/bin$

观察slave1

hadoop@slave1:~/.ssh$ jps 3669 TaskTracker 3718 Jps 3560 DataNode hadoop@slave1:~/.ssh$

观察slave2

hadoop@slave2:~$ jps 3216 Jps 2982 TaskTracker 3095 DataNode

过程中需要注意的问题:

你既然是用hadoop用户去启动hadoop服务的,那这个用户至少得对java、hadoop程序有访问执行权限吧,这点要注意。

其次,这个用户对hadoop的hdfs的文件和mapreduce文件都需要有写入权限吧

问题一:

hadoop@master:/usr/lib/jvm/java/bin$ jps The program 'jps' can be found in the following packages: * openjdk-7-jdk * openjdk-6-jdk Ask your administrator to install one of them

明明都安装了jdk,而且环境变量也没有出现路径错误,为什么就是找不到jps命令呢?结果还是要用update-alternative命令来解决这个问题

hadoop@master:/usr/lib/jvm/java/bin$ sudo update-alternatives --install /usr/bin/jps jps /usr/lib/jvm/java/bin/jps 1 update-alternatives: using /usr/lib/jvm/java/bin/jps to provide /usr/bin/jps (jps) in auto mode

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/1fd0de3a766f8115d0277278e193c214.html