sqoop2安装启动-创新互联
(1)安装环境
创新互联建站主营泾川网站建设的网络公司,主营网站建设方案,重庆APP软件开发,泾川h5成都小程序开发搭建,泾川网站营销推广欢迎泾川等地区企业咨询操作系统:Linux(centos6.5)
JDK版本:1.7.0_45
Hadoop版本:hadoop2.6.0
Sqoop2版本:sqoop-1.99.4-bin-hadoop200
hadoop安装目录:/usr/local/hadoop/hadoop-2.2.0
Sqoop2安装目录:/usr/local/sqoop/sqoop-1.99.4-bin-hadoop200
Hadoop和Sqoop都是同一个用户hadoop下面,hadoop用户的的家目录:/home/hadoop
(2)修改Sqoop2的配置文件
1、首先修改配置文件/home/hadoop/sqoop-1.99.4-bin-hadoop200/server/conf/sqoop.properties指定hadoop的配置文件所属路径。
将原来的如下配置:
# Hadoop configuration directory
org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/etc/hadoop/conf/
修改为:
# Hadoop configuration directory
org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/usr/local/hadoop/hadoop-2.6.0/etc/hadoop/
2、修改配置文件/home/hadoop/sqoop-1.99.4-bin-hadoop200/server/conf/catalina.properties。
这里即时把/home/hadoop/hadoop-2.2.0/share/hadoop下全部的*.jar包加入到sqoop2的类路径中去。
将原来的如下配置:
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/../lib/*.jar,/usr/lib/hadoop/*.jar,/usr/lib/hadoop/lib/*.jar,/usr/lib/hadoop-hdfs/*.jar,/usr/lib/hadoop-hdfs/lib/*.jar,/usr/lib/hadoop-mapreduce/*.jar,/usr/lib/hadoop-mapreduce/lib/*.jar,/usr/lib/hadoop-yarn/*.jar,/usr/lib/hadoop-yarn/lib/*.jar
修改为:
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/../lib/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/common/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/common/lib/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/hdfs/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/hdfs/lib/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/mapreduce/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/mapreduce/lib/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/tools/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/tools/lib/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/yarn/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/yarn/lib/*.jar,/usr/local/hadoop/hadoop-2.6.0/share/hadoop/httpfs/tomcat/lib/*.jar
(3)修改环境变量
直接修改~/.bashrc在文件末尾追加如下内容即可:
export SQOOP_HOME=/usr/local/sqoop/sqoop-1.99.4-bin-hadoop200
export PATH=$SQOOP_HOME/bin:$PATH
export CATALINA_HOME=$SQOOP_HOME/server
export LOGDIR=$SQOOP_HOME/logs
当然完成上述修改后需要在hadoop用户下执行命令来让配置即可生效:
启停sqoop-server:
$SQOOP2_HOME/bin/sqoop.sh server start $SQOOP2_HOME/bin/sqoop.sh server stop 或者 $SQOOP2_HOME/bin/sqoop2-server start $SQOOP2_HOME/bin/sqoop2-server stop
验证是否启动成功:
方式一:jps查看进程: Bootstrap
方式二:http://hadoop000:12000/sqoop/version
方式三:wget -qO - hadoop000:12000/sqoop/version
启动sqoop客户端:
$SQOOP2_HOME/bin/sqoop.sh client 或者 $SQOOP2_HOME/bin/sqoop2-shell
为客户端配置服务器:
sqoop:000> set server --host hadoop000 --port 12000 --webapp sqoop
查看服务器端信息:
sqoop:000> show server --all
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
新闻标题:sqoop2安装启动-创新互联
转载来于:http://hbruida.cn/article/coppsh.html