How to Install Druid on Alpine Linux Latest
This tutorial will guide you through the process of installing Druid, an open-source distributed data store, on Alpine Linux Latest.
Prerequisites
Before starting the installation process, make sure the following prerequisites are met:
- A functioning instance of Alpine Linux Latest
- Sudo or root access
Step 1: Install Java
Druid requires Java to be installed on your system.
sudo apk add openjdk8
This command will install OpenJDK 8, which is the recommended version for Druid.
Step 2: Download and Extract Druid
- Visit http://druid.io/downloads.html to download the latest version of Druid.
- Extract the downloaded file to a desired location.
wget https://downloads.apache.org/druid/0.20.2/apache-druid-0.20.2-bin.tar.gz
sudo tar -zxvf apache-druid-0.20.2-bin.tar.gz -C /usr/local/
This command will download and extract Apache Druid version 0.20.2 to /usr/local/.
Step 3: Configure Druid
- Navigate to the Druid installation directory.
cd /usr/local/apache-druid-0.20.2/
- Configure the
druid-env.shfile.
sudo cp conf/druid/_common/conf/druid-env.sh conf/druid/_common/conf/druid-env.sh.orig
sudo sed -i 's|-Xmx256m|-Xmx512m|' conf/druid/_common/conf/druid-env.sh
sudo sed -i 's|JAVA_HOME=.*|JAVA_HOME=/usr/lib/jvm/default-jvm|' conf/druid/_common/conf/druid-env.sh
This command will configure the druid-env.sh file to:
- Increase the maximum heap size from
256mto512m. - Set the
JAVA_HOMEenvironment variable to the location of the installed Java.
Step 4: Start Druid
- Navigate to the Druid installation directory.
cd /usr/local/apache-druid-0.20.2/
- Start Druid.
sudo bin/start-micro-quickstart
This command will start Druid in a single-node configuration for testing.
Conclusion
You have successfully installed Druid on Alpine Linux Latest. You can now explore Druid's features and capabilities by connecting to the Druid console at http://localhost:8888/console.html. To stop Druid, simply run bin/stop-micro-quickstart in the Druid installation directory.