JDK1.8
Python 2.4+
下载地址:
https://repo1.maven.org/maven2/com/facebook/presto/presto-server/0.216/
tar -zxvf presto-server-0.216.tar.gz -C /opt/module/
mv presto-server-0.216/ presto
编辑launcher
vim /opt/module/presto/bin/launcher
增加内容
export JAVA_HOME=/usr/java/jdk1.8.0_171
export PATH=$JAVA_HOME:$PATH
mkdir /opt/module/presto/data
mkdir /opt/module/presto/etc
以下操作在 etc 目录中进行
vim /opt/module/presto/etc/jvm.config
jvm.config
-server
-Xmx8G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
vim /opt/module/presto/etc/log.properties
log.properties
com.facebook.presto=INFO
mkdir /opt/module/presto/etc/catalog
cd /opt/module/presto/etc/catalog
vim hive.properties
# hive.properties
connector.name=hive-hadoop2
hive.metastore.uri=thrift://server3:9083
cd /opt/module
~/bin/jsync presto
vim /opt/module/presto/etc/node.properties
node.properties
node.environment=presto
node.id=presto-server3
node.data-dir=/opt/module/presto/data
注意:这里拷贝了需要将Presto所有节点的node.id修改为对应节点的ID。
# vim config.properties
coordinator=true
node-scheduler.include-coordinator=false
http-server.http.port=8881
query.max-memory=4GB
query.max-memory-per-node=1GB
discovery-server.enabled=true
discovery.uri=http://server3:8881
# vim config.properties
coordinator=false
http-server.http.port=8881
query.max-memory=4GB
query.max-memory-per-node=1GB
discovery.uri=http://server3:8881
# 前台启动
bin/launcher run
# 后台启动
bin/launcher start
1、下载客户端
https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.216/presto-cli-0.216-executable.jar
2、部署
cp presto-cli-0.216-executable.jar /opt/module/presto/presto-cli
3、添加执行权限
chmod +x presto-cli
4、启动客户端
./presto-cli --server server3:8881 --catalog hive --schema default