OLAP分析工具Presto安装使用教程

一、Presto Server安装

1)下载地址

https://repo1.maven.org/maven2/com/facebook/presto/presto-server/0.196/presto-server-0.196.tar.gz

2)将presto-server-0.196.tar.gz通过XFTP导入到hadoop102的/opt/software目录下,并解压到/opt/software目录

tar -zxvf presto-server-0.196.tar.gz -C /opt/module/

3)修改名称为presto

mv presto-server-0.196/ presto

4)进入到/opt/module/presto目录,并创建存储配置文件文件夹

mkdir data

5)进入到/opt/module/presto目录,并创建存储配置文件文件夹

mkdir etc

6)配置在/opt/module/presto/etc目录下添加jvm.config配置文件

vim jvm.config
-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError

7)Presto可以支持多个数据源,在Presto里面叫catalog,这里我们配置支持Hive的数据源,配置一个Hive的catalog

mkdir catalog
vim hive.properties

添加如下的内容:

connector.name=hive-hadoop2
hive.metastore.uri=thrift://hadoop102:9083

将hadoop102上的presto分发到hadoop103、hadoop104

xsync presto

9)解压之后,分别进入hadoop102、hadoop103、hadoop104三台主机的/opt/module/presto/etc的路径。配置node属性,node id每个节点都不一样。
node.id,结尾分别是 ff fe fd

[root@hadoop102 etc]$vim node.properties
node.environment=production
node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
node.data-dir=/opt/module/presto/data

[root@hadoop103 etc]$vim node.properties
node.environment=production
node.id=ffffffff-ffff-ffff-ffff-fffffffffffe
node.data-dir=/opt/module/presto/data

[root@hadoop104 etc]$vim node.properties
node.environment=production
node.id=ffffffff-ffff-ffff-ffff-fffffffffffd
node.data-dir=/opt/module/presto/data

10)Presto是由一个coordinator节点和多个worker节点组成。在hadoop102上配置成coordinator,在hadoop103、hadoop104上配置为worker。
(1)hadoop102上配置coordinator节点

[root@hadoop102 etc]$ vim config.properties

添加如下内容:

coordinator=true
node-scheduler.include-coordinator=false
http-server.http.port=8881
query.max-memory=50GB
discovery-server.enabled=true
discovery.uri=http://hadoop102:8881

(2)hadoop103、hadoop104上配置worker节点

[root@hadoop103 etc]$ vim config.properties

添加内容如下

coordinator=false
http-server.http.port=8881
query.max-memory=50GB
discovery.uri=http://hadoop102:8881
[root@hadoop104 etc]$ vim config.properties

添加如下内容:

coordinator=false
http-server.http.port=8881
query.max-memory=50GB
discovery.uri=http://hadoop102:8881

11)在/opt/module/hive目录下,启动Hive Metastore,用atguigu角色

nohup bin/hive --service metastore >/dev/null 2>&1 &

12)分别在hadoop102、hadoop103、hadoop104上启动presto server

(1)前台启动presto,控制台显示日志

[atguigu@hadoop102 presto]$ bin/launcher run
[atguigu@hadoop103 presto]$ bin/launcher run
[atguigu@hadoop104 presto]$ bin/launcher run

(2)后台启动presto

[atguigu@hadoop102 presto]$ bin/launcher start
[atguigu@hadoop103 presto]$ bin/launcher start
[atguigu@hadoop104 presto]$ bin/launcher start

二、Presto可视化Client安装

1)将yanagishima-18.0.zip上传到hadoop102的/opt/module目录
2)解压缩yanagishima

[root@hadoop102 module]$ unzip yanagishima-18.0.zip
cd yanagishima-18.0

3)进入到/opt/module/yanagishima-18.0/conf文件夹,编写yanagishima.properties配置

vim yanagishima.properties

添加如下内容

jetty.port=7080
presto.datasources=atiguigu-presto
presto.coordinator.server.atiguigu-presto=http://hadoop102:8881
catalog.atiguigu-presto=hive
schema.atiguigu-presto=default
sql.query.engines=presto

4)在/opt/module/yanagishima-18.0路径下启动yanagishima

[root@hadoop102 yanagishima-18.0]$
nohup bin/yanagishima-start.sh >y.log 2>&1 &

5)启动web页面
http://hadoop102:7080
看到界面,进行查询了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

梦里Coding

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值