Druid is an open-source, distributed data store designed for easy aggregation and exploration of large-scale data sets. It provides fast querying, real-time data ingestion, and supports advanced analytics including machine learning. In this tutorial, we will guide you through the process of installing Druid on Ubuntu Server latest edition.
Before we proceed with the installation of Druid, we need to ensure that our Ubuntu Server is up-to-date with the latest software packages. Open the terminal and run the following command:
sudo apt-get update && sudo apt-get upgrade -y
Druid is written in Java, and therefore requires Java to be installed on our system. We will install OpenJDK 8, which is the latest stable version of Java.
Run the following command to install OpenJDK 8:
sudo apt-get install openjdk-8-jdk-headless
To download the latest version of Druid, go to the official Druid website (http://druid.io/) and click on the "Download" button. Alternatively, you can use the following command to download it:
wget https://downloads.apache.org/druid/0.22.1/apache-druid-0.22.1-bin.tar.gz
Once the download is complete, extract the downloaded file by running the following command:
tar -xzf apache-druid-0.22.1-bin.tar.gz
This will create a new directory with the name "apache-druid-0.22.1".
Druid requires some configuration before it can be run. We will start by configuring the ZooKeeper cluster, which is used by Druid to coordinate communication between its different nodes.
Create a new directory for ZooKeeper:
mkdir -p ~/zookeeper/data ~/zookeeper/logs
Create the ZooKeeper configuration file:
nano ~/zookeeper/zoo.cfg
Add the following lines to the file:
tickTime=2000
dataDir=/home/<username>/zookeeper/data/
dataLogDir=/home/<username>/zookeeper/logs/
clientPort=2181
initLimit=5
syncLimit=2
server.1=localhost:2888:3888
Note: Replace <username> with your system username.
Next, we need to configure the Druid cluster by editing the "common.runtime.properties" file:
nano apache-druid-0.22.1/conf/druid/_common/common.runtime.properties
Add the following lines to the file:
druid.zk.service.host=localhost:2181
druid.zk.paths.base=/druid
Save and close the file.
To start Druid, we need to run a set of scripts in the following order:
~/apache-druid-0.22.1/bin/start-micro-quickstart
~/apache-druid-0.22.1/bin/start-micro-quickstart coordinator
~/apache-druid-0.22.1/bin/start-micro-quickstart overlord
~/apache-druid-0.22.1/bin/start-micro-quickstart historical
~/apache-druid-0.22.1/bin/start-micro-quickstart broker
~/apache-druid-0.22.1/bin/start-micro-quickstart realtime
Wait for a few seconds for Druid to start up. You can check the status of Druid by visiting the following URL in your web browser:
http://localhost:8081/
Congratulations! You have successfully installed Druid on your Ubuntu Server. Now you can start exploring the advanced data analytics and querying capabilities of this powerful software!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!