Skip to content

Latest commit

 

History

History
204 lines (160 loc) · 5.53 KB

File metadata and controls

204 lines (160 loc) · 5.53 KB

DeNet Datakeeper Node Installation Guide for Linux

This guide provides simplified step-by-step instructions for installing and running a DeNet Datakeeper Node on Linux systems.

Table of Contents

  1. Quick Start Installation
  2. Configuring Node
  3. Run In Background
  4. Running Multiple Nodes
  5. Advanced: Systemd Service Setup (Optional)
  6. Reinstalling Your Node
  7. Useful Commands

Quick Start Installation

Method 1: Download via curl (Recommended)

# Download node executable
curl -LO https://github.com/DeNetPRO/Node/releases/download/v4.0.1-rc11/denode-linux-amd64

# Create directory for the node executable and copy it
mkdir -p ~/denet
cp denode-linux-amd64 ~/denet/denode
cd ~/denet

# Make executable
chmod +x denode

# Run the node (this will prompt for configuration)
./denode

Method 2: Download from GitHub Website

  1. Visit https://github.com/DeNetPRO/Node/releases
  2. Download the appropriate binary for your system:
    • For AMD64 architecture: denode-linux-amd64
    • For ARM64 architecture: denode-linux-arm64
  3. Move the downloaded file to your desired location:
    mkdir -p ~/denet
    mv /path/to/downloaded/denode-linux-amd64 ~/denet/denode
    cd ~/denet
    chmod +x denode
    ./denode

Configuring Node

After the node is installed, you can proceed with the configuration

  • Instructions are here

Run In Background

To run in background:

DENODE_PASSWORD=your_password nohup ./denode --address you_datakeeper_address --license your_license_number > denode.log 2>&1 &

Output:

$ nohup ./denode > denode.log 2>&1 &
[1] 12345
$ ps aux | grep denode
user     12345  0.1  0.2  123456  7890 pts/0    S    10:30   0:00 ./denode

Running Multiple Nodes

When running multiple DeNet Datakeeper Nodes on the same machine, each node needs its own configuration directory and unique parameters to avoid conflicts:

  1. Create separate directories for each node:

    # Create directories for different nodes
    mkdir -p ~/denet-node1 ~/denet-node2
    cp ~/denet/denode ~/denet-node1/
    cp ~/denet/denode ~/denet-node2/
  2. Configure each node separately:

    # Configure first node
    cd ~/denet-node1
    ./denode  # This will prompt for configuration
    
    # Configure second node  
    cd ~/denet-node2
    ./denode  # This will prompt for configuration
  3. Run each node with unique parameters:

    # Run first node in background
    cd ~/denet-node1
    DENODE_PASSWORD=your_password nohup ./denode --address your_address_1 --license license_1 > denode.log 2>&1 &
    
    # Run second node in background
    cd ~/denet-node2
    DENODE_PASSWORD=your_password nohup ./denode --address your_address_2 --license license_2 > denode.log 2>&1 &
  4. Monitor processes:

    # List all denode processes
    ps aux | grep denode
    
    # View logs for each node
    tail -f ~/denet-node1/denode.log
    tail -f ~/denet-node2/denode.log
    
    # Kill specific node by PID
    kill -9 <PID>
    
    # Kill all denode processes
    pkill denode

Important: Each node requires its own unique license id. When configuring each node, make sure to use a different license number for each instance.

Advanced: Systemd Service Setup (Optional)

For automatic startup on boot:

  1. Create a dedicated user (recommended):

    sudo adduser denet
  2. Create service file:

    sudo nano /etc/systemd/system/denode.service
  3. Add this content (replace username with your actual username):

    [Unit]
    Description=DeNode Service
    After=network.target
    
    [Service]
    User=username
    Group=username
    Type=simple
    ExecStart=/home/username/denet/denode
    Restart=always
    RestartSec=5
    
    [Install]
    WantedBy=multi-user.target
  4. Enable and start:

    sudo systemctl daemon-reload
    sudo systemctl enable denode.service
    sudo systemctl start denode.service

Reinstalling Your Node

If you need to reinstall your DeNet Datakeeper Node, follow these steps:

  1. Stop the current node process:

    pkill denode
  2. Remove the existing installation directory:

    rm -rf ~/denet
  3. (Optional) Remove systemd service (if previously configured):

    sudo systemctl stop denode.service
    sudo systemctl disable denode.service
    sudo rm /etc/systemd/system/denode.service
    sudo systemctl daemon-reload
  4. Follow the Quick Start Installation steps from the beginning to install the node again

Useful Commands

  • View logs: tail -f ~/denet/denode.log
  • Check status: ps aux | grep denode
  • Stop node: pkill denode

Output Example:

$ tail -f ~/denet/denode.log
[2023-01-01 10:30:00] INFO: Node started successfully
[2023-01-01 10:30:05] INFO: Connected to network
[2023-01-01 10:30:10] INFO: Serving data request

$ ps aux | grep denode
user     12345  0.1  0.2  123456  7890 pts/0    S    10:30   0:00 ./denode
user     12347  0.0  0.1  123456  3456 pts/0    S    10:30   0:00 grep denode

$ pkill denode
$ ps aux | grep denode
user     12347  0.0  0.1  123456  3456 pts/0    S    10:30   0:00 grep denode