bash:haoop:command not found
今天重新搭建了一个3节点的Hadoop集群,想着在上面测试一个MapReduce实例,然后就出现了以下错误:
[hadoop@master hadoop-2.6.]$ hadoop
-bash: hadoop: command not found
出现这个错误的原因是没有配置环境变量,操作过程如下。
vi /etc/profile //权限不够时再前面加上sudo
进入配置文件后,按照以下配置进行对比,没有的请写进去。
#hadoop
export HADOOP_HOME=/opt/modules/hadoop-2.6. #java
export JAVA_HOME=/opt/modules/jdk
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin
配置完成后执行下列命令更新配置
source /etc/profile
然后运行hadoop命令查看配置是否生效,内容如下。
[hadoop@master hadoop-2.6.]$ hadoop
Usage: hadoop [--config confdir] COMMAND
where COMMAND is one of:
fs run a generic filesystem user client
version print the version
jar <jar> run a jar file
checknative [-a|-h] check native hadoop and compression libraries availability
distcp <srcurl> <desturl> copy file or directories recursively
archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive
classpath prints the class path needed to get the
credential interact with credential providers
Hadoop jar and the required libraries
daemonlog get/set the log level for each daemon
trace view and modify Hadoop tracing settings
or
CLASSNAME run the class named CLASSNAME Most commands print help when invoked w/o parameters.
以上就是博主为大家介绍的这一板块的主要内容,这都是博主自己的学习过程,希望能给大家带来一定的指导作用,有用的还望大家点个支持,如果对你没用也望包涵,有错误烦请指出。如有期待可关注博主以第一时间获取更新哦,谢谢!
版权声明:本文为博主原创文章,未经博主允许不得转载。
bash:haoop:command not found的更多相关文章
- scp报错 -bash: scp: command not found
环境:RHEL6.5 使用scp命令报错: [root@oradb23 media]# scp /etc/hosts oradb24:/etc/ -bash: scp: command not fou ...
- source /etc/profile报错-bash: id:command is not found
由于误操作导致 source /etc/profile 报错 -bash: id:command is not found 此时,linux下很多命令到不能能用,包括vi ls 等... 可以使用 e ...
- -bash: .bash_profile: command not found
今天有一同事安装了ORACLE后,在切换账号时遇到错误提示"-bash: .bash_profile: command not found".如下所示 [root@GLETestL ...
- Linux下提示 bash: xxx command not found
今天在虚拟机上安装了CentOS5.5,发现运行一些很正常的诸如:init,shutdown,fdisk 等命令时,悍然提示: bash: xxx command not found. 那么,首先就要 ...
- [原创]-bash: iostat: command not found解决办法
[root@testhost ~]# iostat-bash: iostat: command not found IOSTAT 命令不可用,首先确认sysstat包是否安装,sysstat包中包括i ...
- # mysql -u root -p -bash: mysql: command not found
[root@jboss ~]# mysql -u root -p-bash: mysql: command not found 需要安装mysql # yum install mysql之后就行 了
- bash:fdisk:command not found
bash:fdisk:command not found [lansir@Red-Hat ~]$ fdisk -l-bash: fdisk: command not found 原因是fdisk不在P ...
- Centos提示-bash: make: command not found的解决办法
一般出现这个-bash: make: command not found提示,是因为安装系统的时候使用的是最小化mini安装,系统没有安装make.vim等常用命令,直接yum安装下即可: yum - ...
- bash: ifconfig: command not found解决方法
1.问题: #ifconfig bash: ifconfig: command not found 2.原因:非root用户的path中没有/sbin/ifconfig ,其它的命令也可以出现这种情况 ...
随机推荐
- css中的特殊居中
大图居中: 先看一下普通的居中: 代码为: <!DOCTYPE html> <html lang="en"> <head> <meta c ...
- python 基础 列表 字符串转换
1. 字符串转列表 str1 = "hi hello world" print(str1.split(" "))输出:['hi', 'hello', 'worl ...
- maven可用镜像
<mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> & ...
- shell分库备份
分库备份企业实战题7:如何实现对MySQL数据库进行分库备份,请用脚本实现 #!/bin/bash MysqlUser=root PassWord=root Port= Socket="/u ...
- cygwin运行git submodule init出错error while loading shared libraries的解决
installing the Devel\gettext package should solve your problem. git-submodule requires that. Unfortu ...
- macos上改变输入法顺序
设置界面上是不能拖放顺序的,唯一解决办法是: 一.先选择所有文档使用相同输入源 二.选择用美国英语 三.再选择允许多个输入源,再打开原来的中文输入法 顺序就调过来了!尼玛,这就是苹果的人性化?懒得吐嘈 ...
- sklearn交叉验证法(Cross Validation)
import numpy as np from sklearn import datasets from sklearn.cross_validation import train_test_spli ...
- HDU 3966 Aragorn's Story (简单树链剖分)
题意:给一棵树,并给定各个点权的值,然后有3种操作: I C1 C2 K: 把C1与C2的路径上的所有点权值加上K D C1 C2 K:把C1与C2的路径上的所有点权值减去K Q C:查询节点编号为C ...
- How to install Samba server on Ubuntu 12.04
Part 1: Configuring anonymous share with samba server To install the samba package,enter the followi ...
- SQL语言 持续更新中……
SQL提供了很多的聚集函数 COUNT([DISTINCT\ALL]*) SUM([DISTINCT\ALL]<列名>)AVG().…… WHERE 子句中是不能用聚集函数作为条件表达式 ...