On Linux
If you wish to install locally or already have a configured server, see the basic Installation Guide
The following is a recommended way to configure Linux and install HarperDB. These instructions should work reasonably well for any public cloud or on-premises Linux instance.
These instructions assume that the following has already been completed:
Linux is installed
Basic networking is configured
A non-root user account dedicated to HarperDB with sudo privileges exists
An additional volume for storing HarperDB files is attached to the Linux instance
Traffic to ports 9925 (HarperDB Operations API,) 9926 (HarperDB Custom Functions,) and 9932 (HarperDB Clustering) is permitted
For this example, we will use an AWS Ubuntu Server 22.04 LTS m5.large EC2 Instance with an additional General Purpose SSD EBS volume and the default “ubuntu” user account.
(Optional) LVM Configuration
Logical Volume Manager (LVM) can be used to stripe multiple disks together to form a single logical volume. If striping disks together is not a requirement, skip these steps.
Find disk that already has a partition
Create array of free disks
Get quantity of free disks
Construct pvcreate command
Initialize disks for use by LVM
Create volume group
Create logical volume
Configure Data Volume
Run lsblk
and note the device name of the additional volume
Create an ext4 filesystem on the volume (The below commands assume the device name is nvme1n1. If you used LVM to create logical volume, replace /dev/nvme1n1 with /dev/hdb_vg/hdb_lv)
Mount the file system and set the correct permissions for the directory
Create a fstab entry to mount the filesystem on boot
Configure Linux and Install Prerequisites
If a swap file or partition does not already exist, create and enable a 2GB swap file
Increase the open file limits for the ubuntu user
Install Node Version Manager (nvm)
Load nvm (or logout and then login)
Install Node.js using nvm (read more about specific Node version requirements)
Install and Start HarperDB
Here is an example of installing HarperDB with minimal configuration.
Here is an example of installing HarperDB with commonly used additional configuration.
HarperDB will automatically start after installation. If you wish HarperDB to start when the OS boots, you have two options
You can set up a crontab:
Or you can create a systemd script at /etc/systemd/system/harperdb.service
Pasting the following contents into the file:
And then running the following:
For more information visit the HarperDB Command Line Interface guide and the HarperDB Configuration File guide.
Last updated