Skip to content

Instantly share code, notes, and snippets.

@sbmaggarwal
Created September 25, 2018 05:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbmaggarwal/e60117b62989b1c42b12207879cf03b3 to your computer and use it in GitHub Desktop.
Save sbmaggarwal/e60117b62989b1c42b12207879cf03b3 to your computer and use it in GitHub Desktop.
PrestoDB v0.198 installation script for Ubuntu
# Install Java 8
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
# Install Python 2.7
sudo apt-get install python
# Install UUID utility to create unique UUID for each node
apt install uuid
# Donwload PrestoDB v0.198 and create directories & files
wget https://repo1.maven.org/maven2/com/facebook/presto/presto-server/0.198/presto-server-0.198.tar.gz
tar -xvzf presto-server-0.198.tar.gz
rm -rf presto-server-0.198.tar.gz
cd presto-server-0.198/
mkdir etc
cd etc/
mkdir catalog
touch config.properties
touch jvm.config
touch log.properties
touch node.properties
touch catalog/mongodb.properties
cd ..
# Download Presto JAR for command-line access
wget https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.198/presto-cli-0.198-executable.jar
chmod 700 presto-cli-0.198-executable.jar
mv presto-cli-0.198-executable.jar presto
cd /opt/
# Make PrestoDB data and logs directory
mkdir prestodata
# History file will make sure that PrestoDB remenber commands you execute on its shell, like SQL Queries
touch /root/.presto_history
chmod 700 /root/.presto_history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment