Install HarperDB on Windows Subsystem for Linux (WSL 2) for Windows 10

Running HarperDB on WSL 2 for Windows 10 is a great way to test HarperDB and do development with HarperDB. We do not, though, recommend HarperDB on WSL 2 for production workloads. For this example, we will install the Ubuntu 18.04 distribution on WSL 2. You will need to make appropriate adjustments to these instructions if you are using a different Linux distribution.

Configure Windows Prerequisites

Install WSL 2, install Ubuntu 18.04, and install Windows Terminal with instructions provided by Microsoft:

Install HarperDB on WSL 2

Open a Windows Terminal session connected to Ubuntu on WSL 2, and perform the following:

Verify Python v3.5, v3.6, v3.7, or v3.8 is installed.

python3 --version

Install build-essential

sudo apt-get update && sudo apt-get install -y build-essential

Install Node Version Manager (nvm)

curl -o- | bash

Load nvm (or logout and then login)

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/" ] && \. "$NVM_DIR/"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

Install Node.js using nvm

nvm install 12.19.0

Install and Start HarperDB

npm install -g harperdb
harperdb install --TC_AGREEMENT "yes" --HDB_ROOT "/home/ubuntu/hdb" --HTTP_PORT "9925" --HTTPS_PORT "31283" --HDB_ADMIN_USERNAME "HDB_ADMIN" --HDB_ADMIN_PASSWORD "abc123!"
harperdb run