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 ,其它的命令也可以出现这种情况 ...
随机推荐
- druid数据源的加密解密工具
数据库得加密 先来一个网上大多数的教程吧,一个比较好的教程,如下. jar包版本:druid-1.0.13.jar 1. 加密,用以下命令将用户名和密码加密 cmd命令行执行 java -cp D:/ ...
- 完美前向保密PFS
===========来自网友=========== “前向安全性”应当是叫做“forward security”.该定义最早是由Mihir Bellare和Sara K. Miner在 CRYPTO ...
- bzoj2118
最短路 很早以前做的了 数据范围太大,不能直接算 mn=min(a[i]) 算出d[i]表示sum%mn=i最小能构成的数,这个用最短路就行了,然后计算d[i],d[i]+mn的个数统计答案 #inc ...
- POST-GET请求
在应用中最常用的Http请求无非是get和post,get请求可以获取静态页面,也可以把参数放在URL字串后面,传递给servlet.post与get的不同之处在于post的参数不是放在URL字串里面 ...
- VBS调用并监控记事本进程
Dim flag flag=true Set WshShell = CreateObject("WScript.Shell") '创建WScript.Shell对象 Set ...
- NW.js将网站打包成桌面应用
需求:已有一个网站,因为浏览器兼容性等问题,想自己封装一个浏览器,打开时固定打开这个网站,通过这样的封装,将网站变成桌面应用程序. 1. 下载并安装NW.js的最新稳定版本(NW.js) 2. 创建一 ...
- jQuery 文档操作 - html() 方法
1.转自:http://www.w3school.com.cn/jquery/manipulation_html.asp 设置所有 p 元素的内容: <html> <head> ...
- Devexpress GridControl
1.隐藏“Drag a column header here to group by that column”如下: 选择gridview->属性 选择OptionView->ShowGr ...
- HBase 二级索引与Coprocessor协处理器
Coprocessor简介 (1)实现目的 HBase无法轻易建立“二级索引”: 执行求和.计数.排序等操作比较困难,必须通过MapReduce/Spark实现,对于简单的统计或聚合计算时,可能会因为 ...
- Spring开发包介绍
-----------------siwuxie095 核心开发包 建立 Spring 工程时,需要引入 Spring 的开发包,否则无 ...