Installing SGE

Hardware Requirements

  • Minimal

    • 1 GB RAM

    • 25 GB SSD

    • 1.4 GHz CPU

  • Recommended

    • 2 GB RAM

    • 100 GB SSD

    • 2.0 GHz x2 CPU

Operating System

  • Linux/Windows/macOS(x86)

  • Recommended

    • Linux(x86_64)

Prerequisites

Go 1.19

sudo snap install --channel=1.19/stable --classic go

Git

sudo apt install -y git gcc make

Set environment variables

sudo nano $HOME/.profile
# Add the following two lines at the end of the file
GOPATH=$HOME/go
PATH=$GOPATH/bin:$PATH
# Save the file and exit the editor
source $HOME/.profile

# Now you should be able to see your variables like this:
echo $GOPATH
/home/[your_username]/go
echo $PATH
/home/[your_username]/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Increase 'number of open files' limit

sudo nano /etc/security/limits.conf
# Before the end of the file, add:
[your_username] soft nofile 4096
# Then reboot the instance for it to take effect and check with:
ulimit -Sn

Installing from Release

Get the latest release binary from here. Move the binary to an executable path. Check the installation with sged version from the terminal.

Installation from Source

Clone the Repo

git clone git@github.com:sge-network/sge.git

Checkout release tag

git fetch --tags
git checkout [vX.X.X]

Install the binary

cd sge
go mod tidy
make install

Install system.d service file

nano /etc/systemd/system/sged.service

Please following contents (the working dir may be changed as needed)

[Unit]
Description=Sge Network node
After=network.target

[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu
ExecStart=/usr/local/sbin/sged start
Restart=on-failure
RestartSec=10
LimitNOFILE=40960

[Install]
WantedBy=multi-user.target

Reload unit files in systemd

sudo systemctl daemon-reload

Last updated