Presto查询引擎安装部署

历史版本下载地址

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

文档

https://prestodb.io/docs/current/

https://prestodb.io/docs/current/installation/deployment.html
安装

[root@DM01 opt]# ls
jdk-8u261-linux-x64.tar_2.gz presto-jdbc-0.238.1.jar
presto-cli-0.238.1-executable.jar presto-server-0.238.1.tar.gz

1,安装jdk

[root@DM01 opt]# tar zxvf jdk-8u261-linux-x64.tar_2.gz -C /usr/local/

2./etc/profile设置java环境变量

export JAVA_HOME=/usr/local/jdk1.8.0_261
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

[root@DM01 ~]# java -version
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

扫描二维码关注公众号,回复: 11471605 查看本文章

3.安装Presto

[root@DM01 opt]# tar zxvf presto-server-0.238.1.tar.gz -C /usr/local/

[root@DM01 presto-server-0.238.1]# pwd
/usr/local/presto-server-0.238.1

创建etc目录

[root@DM01 presto-server-0.238.1]# mkdir etc

[root@DM01 presto-server-0.238.1]# ls
bin etc lib NOTICE plugin README.txt

创建配置文件及目录

[root@DM01 etc]# ll
total 16
drwxr-xr-x. 2 root root 51 Jul 29 14:17 catalog
-rw-r--r--. 1 root root 248 Jul 29 14:12 config.properties
-rw-r--r--. 1 root root 254 Jul 29 14:09 jvm.config
-rw-r--r--. 1 root root 25 Jul 29 13:59 log.properties
-rw-r--r--. 1 root root 115 Jul 29 14:06 node.properties

[root@DM01 etc]# cat jvm.config
-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
-XX:OnOutOfMemoryError=kill -9 %p
-XX:ReservedCodeCacheSize=150M

[root@DM01 etc]# cat node.properties
node.environment=production
#node.id=ffffffff-ffff-ffff-ffff-ffffffffffff
node.id=coordinator1
node.data-dir=/data

[root@DM01 etc]# cat log.properties
com.facebook.presto=INFO

[root@DM01 etc]# cat config.properties
coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=38080
query.max-memory=3GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB
discovery-server.enabled=true
discovery.uri=http://DM01:38080

[root@DM01 etc]# cd catalog/
[root@DM01 catalog]# ls
hive.properties jmx.properties
[root@DM01 catalog]# cat hive.properties
connector.name=hive-hadoop2
hive.metastore.uri=thrift://DM01:9083 #修改为 hive-metastore 服务所在的主机名称
hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop/conf/hdfs-site.xml

[root@DM01 catalog]# cat jmx.properties
connector.name=jmx

配置Presto环境变量

[root@DM01 ~]# cat .bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export PRESTO_HOME=/usr/local/presto-server-0.238.1
export PATH=$PRESTO_HOME/bin:$PATH

[root@DM01 ~]# launcher start
Started as 14007
[root@DM01 ~]# jps
14067 Jps
14007 PrestoServer

http://blog.51yip.com/hadoop/2224.html

https://blog.csdn.net/OldDirverHelpMe/article/details/100169573

https://www.jianshu.com/p/1936d345abac?from=singlemessage

https://prestodb.io/docs/current/installation/jdbc.html

猜你喜欢

转载自www.cnblogs.com/songyuejie/p/13402675.html