Presto 0.232配置

准备:

Presto官网中下载最新版本

【因在官网下载较慢,这里附上微云下载地址:Presto 0.232

CentOS 7

MySQL 5.7


下载Presto

wget https://repo1.maven.org/maven2/com/facebook/presto/presto-server/0.232/presto-server-0.232.tar.gz
tar -zxvf presto-server-0.232.tar.gz
cd presto-server-0.232

配置Presto

#创建配置文件目录
mkdir etc

cd etc


vim node.properties
node.environment=production
node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
node.data-dir=/var/presto/data


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

vim config.properties
coordinator=true
node-scheduler.include-coordinator=false
http-server.http.port=8020
query.max-memory=50GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB
discovery-server.enabled=true
discovery.uri=http://example.net:8020

vim log.properties
com.facebook.presto=INFO

创建数据源配置文件目录

mkdir catalog

cd catalog

vim mysql.properties
connector.name=mysql
connection-url=jdbc:mysql://example.net:3306
connection-user=root
connection-password=secret

回到目录,启动Presto

cd ../../

./bin/launcher start
#输出此数据为启动成功
Started as 38017

#Presto关闭
./bin/launcher start


设置Presto-CLI

#下载presto-cli-0.232-executable.jar
wget https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.232/presto-cli-0.232-executable.jar

mv presto-cli-0.232-executable.jar presto

#给Presto-CLI可执行权限
chmod +x presto

./presto --server 127.0.0.1:8020 --catalog mysql
#输出结果
presto> use wu_han


末尾:

到此,Presto基本配置完成

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值