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: https://docs.microsoft.com/en-us/windows/wsl/install-win10

Install HarperDB on WSL 2

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

Verify Python v3.6, v3.7, v3.8, or v3.9 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- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

Load nvm (or logout and then login)

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

Install Node.js using nvm

nvm install 12.22.1

Install and Start HarperDB

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