1.默认安装好hadoop并且能正常启动(只需hdfs即可)
2.安装如下rpm包(需要root权限 注意顺序)
bigtop-utils-0.7.0+cdh5.8.2+0-1.cdh5.8.2.p0.5.el6.noarch.rpm
impala-kudu-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
impala-kudu-catalog-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
impala-kudu-state-store-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
impala-kudu-server-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
impala-kudu-shell-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
impala-kudu-udf-devel-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
安装命令如下:
rpm -ivh ./bigtop-utils-0.7.0+cdh5.8.2+0-1.cdh5.8.2.p0.5.el6.noarch.rpm
rpm -ivh ./impala-kudu-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm --nodeps //需要取消依赖安装,不然安装不过
rpm -ivh ./impala-kudu-catalog-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
rpm -ivh ./impala-kudu-state-store-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
rpm -ivh ./impala-kudu-server-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
rpm -ivh ./impala-kudu-shell-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
rpm -ivh ./impala-kudu-udf-devel-2.7.0+cdh5.9.0+0-1.cdh5.9.0.p0.11.el6.x86_64.rpm
其中catalog和state-store只能主节点一个(可安装于不同的主机) server和shell可以多台(可跟catalog和state-store不是同一台)
3.配置环境
1.修改/etc/default/bigtop-utils文件
export JAVA_HOME=/usr/java/jdk1.8.0_65 //设置java home
2.修改/etc/default/impala文件
IMPALA_CATALOG_SERVICE_HOST=172.16.104.120 //为catalog主机Ip 也可以主机名 注意配置hosts
IMPALA_STATE_STORE_HOST=172.16.104.120 //为state-store主机Ip
IMPALA_LOG_DIR=/var/log/impala //配置日志路径 默认为/var/log/impala
3.在/etc/impala/conf.dist目录下 添加core-site.xml和hdfs-site.xml文件(建议从hadoop配置文件中拷贝)
其中core-site.xml添加内容如下:
<!-- impala -->
<property>
<name>dfs.client.read.shortcircuit</name>
<value>true</value>
</property>
<property>
<name>dfs.client.read.shortcircuit.skip.checksum</name>
<value>false</value>
</property>
<property>
<name>dfs.datanode.hdfs-blocks-metadata.enabled</name>
<value>true</value>
</property>
hdfs-site.xml添加内容如下:
<!--impala-->
<property>
<name>dfs.datanode.hdfs-blocks-metadata.enabled</name>
<value>true</value>
</property>
<property>
<name>dfs.block.local-path-access.user</name>
<value>impala</value>
</property>
<property>
<name>dfs.client.file-block-storage-locations.timeout.millis</name>
<value>60000</value>
</property>
4.启动服务
service impala-catalog start
service impala-state-store start
service impala-server start
5.验证
第一种方式:
ps -aux|grep impala-catalog
ps -aux|grep impala-state
ps -aux|grep impalad
第二种方式:
impala-shell(默认连接本机的server)
impala-shell -i 172.16.104.120 //连接指定ip的server impala-shell 如果是no connect状态 可以输入connect 172.16.104.120进行连接
第三种方式(webUI):
172.16.104.120:25000
172.16.104.120:25010
172.16.104.120:25020
6.其他
Impala Daemon(Impala 守护进程前端端口):21000 >> impala-shell, Beeswax, Cloudera ODBC 1.2 驱动 用于传递命令和接收结果
Impala Daemon(Impala 守护进程前端端口):21050 >> 被使用 JDBC 或 Cloudera ODBC 2.0 及以上驱动的诸如 BI 工具之类的应用用来传递命令和接收结果
Impala Daemon(Impala 守护进程后端端口):22000 >> Impala 守护进程用该端口互相通讯
Impala Daemon(StateStore订阅服务端口):23000 >> Impala 守护进程监听该端口接收来源于 state store 的更新
StateStore Daemon(StateStore 服务端口):24000 >> State store 监听该端口的 registration/unregistration 请求
Catalog Daemon(StateStore 服务端口):26000 >> 目录服务使用该端口与Imp
Impala Daemon(HTTP 服务器端口):25000 >> Impala web 接口,管理员用于监控和故障排除
StateStore Daemon(HTTP 服务器端口):25010 >> StateStore web 接口,管理员用于监控和故障排除
Catalog Daemon(HTTP 服务器端口):25020 >> 目录服务 web 接口,管理员用于监控和故障排除,Impala 1.2 开始使用