How to Install Druid on NixOS Latest

Step 1: Install Java

Druid is built on Java, so we need to install it before we can proceed with the installation of Druid. We will use OpenJDK 8 for this tutorial. Install it with the following command:

sudo nix-env -i openjdk

Step 2: Download and Extract Druid

  1. Download the latest version of Druid from http://druid.io/downloads.html.

  2. Extract the downloaded files using the following command:

    tar -xvf <druid-version>.tar.gz
    

    Replace <druid-version> with the actual version number (e.g., druid-0.20.0).

  3. Move the extracted Druid directory to /opt/:

    sudo mv <druid-version> /opt/druid
    

Step 3: Configure Druid

  1. Edit the common.runtime.properties file located in the conf directory of the Druid installation:

    sudo nano /opt/druid/conf/druid/common.runtime.properties
    
  2. Scroll to the bottom of the file and add the following configuration:

    druid.host=<your hostname or IP address>
    

    Replace <your hostname or IP address> with the hostname or IP address of the machine where Druid is installed.

Step 4: Run Druid

  1. Start Druid by running the following command in the Druid directory:

    sudo /opt/druid/bin/start-micro-quickstart
    
  2. Verify that Druid is running by opening a browser and navigating to http://localhost:8888. You should see the Druid console.

Congratulations! You have successfully installed Druid on NixOS and verified that it is running. Now you can start using Druid to analyze your data.