unbelieve 发表于 2017-7-11 12:37:45

Cloudera安装sqoop2总结

出现的错误如下:上图是因为derby环境变量配置不正确。No suitable driver found for jdbc:derby:/var/lib/sqoop2/repository/db;create=true这个图就是本次需要处理的重点。上网查了很多资料,都是些零散的点。故此次配置成功后将所有要点一一记录。1. 下载db-derby-10.11.1.1-bin,解压。2. 配置环境变量vi /etc/profile 里面增加# derbyexportDERBY_HOME=/home/hadoop/db-derby-10.11.1.1-binexport PATH=$DERBY_HOME/bin:$PATHexport CLASSPATH=$DERBY_HOME/lib/derby.jar:$DERBY_HOME/lib/derbyclient.jar:$DERBY_HOME/lib/derbytools.jar:$DERBY_HOME/lib/derbynet.jar:$CLASSPATHps:此处添加全用户的环境变量是为了方便。配置完成后输入 sysinfo检测是否配置正确。   3.配置derbyjar包#文件进行复制   sudocp /home/hadoop/db-derby-10.11.1.1-bin/lib/derby.jar/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/jars#删除之前的软连接,配置新的cd/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/lib/sqoop2/webapps/sqoop/WEB-INF/libsudo rm derby-10.8.2.2.jarsudo ln -s ../../../../../../jars/derby.jarderby.jar#修改文件权限sudo chmod 777 derby.jar (这步是重点,要配置权限。此处改成777是为了方便,可根据实际需要进行配置)cd/opt/cloudera/parcels/CDH-5.4.7-1.cdh5.4.7.p0.3/jarssudo chmod 777 derby.jar#sqoop包下添加derby.jar (很多安装资料里都没写这步)sudo cp /home/hadoop/db-derby-10.11.1.1-bin/lib/derby.jar/var/lib/sqoop2sudo chmod 777 /var/lib/sqoop2/derby.jar
最后服务添加完成

hahaxixi 发表于 2017-7-12 11:47:12

nice~~~
页: [1]
查看完整版本: Cloudera安装sqoop2总结