我使用的是ubuntu版本16.04
harsha@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
我能够启动sqoop服务器和sqoop shell但是在终端当我输入sqoop help或sqoop import时它说找不到命令。
错误是
harsha@ubuntu:~$ sqoop help
sqoop: command not found
harsha@ubuntu:~$ sqoop -help
sqoop: command not found
harsha@ubuntu:~$ sqoop --help
sqoop: command not found
harsha@ubuntu:~$ sqoop
sqoop: command not found
下面的命令非常好。
sqoop2-tool upgrade
sqoop2-tool verify
sqoop2-server start
sqoop2-server stop
sqoop2-shell
这是echo $ PATH
/home/harsha/bin:/home/harsha/.local/bin:/usr/local/sbin:/usr/local/bin:
/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:
/usr/lib/jvm/java-8-oracle/bin:/opt/hadoop-3.0.0/bin:
/opt/apache-flume-1.8.0-bin/bin:/opt/kafka_2.12-1.0.0/bin:
/opt/zookeeper-3.5.3-beta/bin:/usr/lib/sqoop-1.99.7-bin-hadoop200/bin:/usr/lib/sqoop-1.99.7-bin-hadoop200/conf:
目前正在运行的流程
harsha@ubuntu:~$ jps
6277 ResourceManager
5814 DataNode
90105 Jps
37418 SqoopShell
6395 NodeManager
5694 NameNode
〜/ .bashrc文件中的条目如下
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH=$PATH:$JAVA_HOME/bin
#HADOOP HOME
#export HADOOP_PREFIX=/opt/hadoop-3.0.0
export HADOOP_HOME=/opt/hadoop-3.0.0
export PATH=$PATH:$HADOOP_HOME/bin
#FLUME HOME
export FLUME_HOME=/opt/apache-flume-1.8.0-bin
export PATH=$PATH:$FLUME_HOME/bin
#HADOOP HOME
export KAFKA_HOME=/opt/kafka_2.12-1.0.0
export PATH=$PATH:$KAFKA_HOME/bin
#ZOOKEEPER HOME
export ZOOKEEPER_HOME=/opt/zookeeper-3.5.3-beta
export PATH=$PATH:$ZOOKEEPER_HOME/bin
#SQOOP HOME
export SQOOP_HOME=/usr/lib/sqoop-1.99.7-bin-hadoop200
export SQOOP_CONF_DIR=$SQOOP_HOME/conf
export SQOOP_CLASS_PATH=$SQOOP_HOME/server/lib
export PATH=$PATH:$SQOOP_HOME/bin:$SQOOP_CONF_DIR:$SQOOP_CLASSPATH
如果有人可以帮助我,那将是一个很大的帮助。感谢您的帮助。
答案 0 :(得分:0)
找到sqoop命令,然后将该命令的路径添加到$ PATH变量中。
locate sqoop