【hadoop出口计算】trino(presto+clickhouse

安装jdk11

wget https://cdn.azul.com/zulu/bin/zulu11.48.21-ca-jdk11.0.11-linux_x64.tar.gz

tar xf zulu11.48.21-ca-jdk11.0.11-linux_x64.tar.gz 

mv zulu11.48.21-ca-jdk11.0.11-linux_x64 /usr/local/jdk11

export JAVA_HOME=/usr/local/jdk11
export JRE_HOME=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib/rt.jar

java -version

安装trino

wget https://repo1.maven.org/maven2/io/trino/trino-server/359/trino-server-359.tar.gz

tar xf trino-server-359.tar.gz

mv trino-server-359 /export/servers/trino-server

vim etc/config.properties

coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8080
query.max-memory=5GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB
discovery-server.enabled=true
discovery.uri=http://192.168.34.15:8080

vim etc/config.properties

coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8080
query.max-memory=5GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB
discovery-server.enabled=true
discovery.uri=http://192.168.34.15:8080

vim etc/node.properties

node.environment=test_bob
node.id=bigata_test1
node.data-dir=/export/servers/presto-server/data

mkdir etc/catalog

vim etc/catalog/myclickhouse.properties

connector.name=clickhouse
connection-url=jdbc:clickhouse://127.0.0.1:8123/default
connection-user=default
connection-password=123456

# 前台启动

./bin/launcher run

安装clickhouse

yum install yum-utils

rpm –import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG

yum-config-manager –add-repo https://repo.clickhouse.tech/rpm/stable/x86_64

yum install clickhouse-server clickhouse-client

/etc/init.d/clickhouse-server start

# 加密码

echo -n 123456 | openssl dgst -sha256

vim /etc/clickhouse-server/users.xml

<password>123456</password>

systemctl restart clickhouse-server

clickhouse client –user default –password 123456

验证

bin/trino –server localhost:8080 –catalog mysqlclickhouse

更多操作查看官网

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注