Skip to main content

Environment Setup

The AIDBQuery is a full stack NextJs application, which required NodeJs and npm install on your machine. We will show how to install NodeJs and npm on your machine.

Prerequisites

  • Linux VPS (Virtual Private Server) LTS

Guides

  • Login VPS with Password
  • Login VPS with ssh key/pem key

Login VPS

Login your vps first with the following instructions

Login vps with Password

Open your favorite terminal and run the following command:

ssh username@ip_address

The system will prompt you to enter the password.

Login with ssh key/pem key

Open your favorite terminal and run the following command:

ssh -i /path/to/your/pemfile.pem username@ip_address

Install NodeJs

    1. Install necessary packages:

At first update the package list with the following command:

sudo apt update

Upgrade the installed packages with the following command:

sudo apt upgrade
    1. Install NVM(node version manager):

Install nodejs through nvm very easy and flexible. Run the following command to install nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

# or

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

Then run the following command:

source ~/.bashrc

Check the version of nvm:

nvm -v

Output:

0.39.3
danger

The above Output is required for nvm install confirmation.

    1. Install Node.js and npm:

The command below will install the latest LTS(Long Term Stability) version of NodeJs and npm:

nvm install --lts

Or, switch to the LTS version of NodeJs:

nvm use --lts
    1. Check the version of Node.js and npm:
node -v
npm -v

Output:

v20.11.0 # NodeJs Version LTS
10.5.0 # npm Version

Well done, you have successfully installed NodeJs and npm on your machine. Now you are ready fro next steps.