Trino SQL: Installation on Ubuntu.

Trino, a query engine that runs at ludicrous speed used by Facebook.

Sonu Singh
3 min readJan 27, 2021

In this story, I am going to explain how we can install Trino-Server in any environment:

  1. Download Trino-Server.

a. Please visit https://trino.io/download.html and copy Trino-Server link.

b. open putty and create a folder name — “trino” and download Trino-Server using below link:

path - /home/ : mkdir trino

path - /home/trino/ : wget 'https://repo1.maven.org/maven2/io/trino/trino-server/351/trino-server-351.tar.gz'

c. please UN-TAR the Trino-Server file.

path - /home/trino/ : tar xzvf trino-server-351.tar.gz

d. rename trino-server-351' to ‘trino-server’

path - /home/trino/ : mv 'trino-server-351' 'trino-server'

2. Configuration Setup for Trino-Server.
a. Create a data directory outside the installation directory, which will be used for storing logs, metadata, etc. so that it is to be easily preserved when upgrading Presto. It is defined using the following code −

path - /home/trino/ : mkdir trino-data

b. create “etc” folder under trino-server.

path - /home/trino/trino-server : mkdir etc

c. Add “node.properties” file under an etc folder and below sample configuration:

path - /home/trino/trino-server/etc/ : vi node.properties

node.environment = production

node.id = 52a97245-c1a0-40fd-a79c-d85aafe5f18c

node.data-dir = /home/trino/trino-data

command to generate node.id - "uuidgen" and node.data-dir path will based on Trino Installtion folder.

d. Add “jvm.config” file under an etc folder with below sample configuration:

path - /home/trino/trino-server/etc/ : vi jvm.config

-server

-Xmx16G

-XX:-UseBiasedLocking

-XX:+UseG1GC

-XX:G1HeapRegionSize=32M

-XX:+ExplicitGCInvokesConcurrent

-XX:+ExitOnOutOfMemoryError

-XX:+HeapDumpOnOutOfMemoryError

-XX:ReservedCodeCacheSize=512M

-XX:PerMethodRecompilationCutoff=10000

-XX:PerBytecodeRecompilationCutoff=10000

-Djdk.attach.allowAttachSelf=true

-Djdk.nio.maxCachedBufferSize=2000000

e. Add “config.properties” file under an etc folder with below sample configuration:

path - /home/trino/trino-server/etc/ : vi config.properties

coordinator=true

node-scheduler.include-coordinator=true

http-server.http.port=7070

query.max-memory=50GB

query.max-memory-per-node=2GB

query.max-total-memory-per-node=4GB

discovery-server.enabled=true

discovery.uri=http://demo:7070

Note: discovery.uri will be based on Trino Installtion.

f. Add “log.properties” file under an etc folder with below sample configuration:

path - /home/trino/trino-server/etc/ : vi log.properties

3. Now, we can start/stop Trino Server by using below command:

path - /home/trino/trino-server/bin/ : ./launcher start

path - /home/trino/trino-server/bin/ : ./launcher stop

Trino UI URL — http://hostname:7070/ui/#

Thank you for reading this article.

Please find below the link helpful for Trino SQL Installation:

--

--

Sonu Singh
Sonu Singh

No responses yet