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.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- | 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 (read more about specific Node version requirements here)

nvm install 14.19.1

Install 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 will automatically start after installation. For more information visit the HarperDB Command Line Interface guide.