Build from source and install


#1

Hello everyone!
I am trying to build and install loraserver from sources by this instruction:
https://docs.loraserver.io/loraserver/community/source/
I installed Go and protobuf successfully.
During loraserver installation make requirements, make test and make build steps are also passed successfully. So I am able to run loraserver following way:

cd packaging/deb
set -a
source default
../../build/loraserver

Now I want to install loraserver to run that as service. Should I package it?
When I call packaging/package.sh
I get error:
Unknown target
as GOARCH="amd64"

How to fix that and what is the next steps to be able to run loraserver as service using following command:
sudo systemctl start loraserver
Can’t clearly understand that. Explain me please.

P.S.
Eventually I installed it in following way:

cd $GOPATH/src/github.com/
mkcdir brocaar
cd brocaar
git clone https://github.com/brocaar/loraserver.git
cd loraserver
make requirements
export TEST_POSTGRES_DSN="postgres://loraserver_ns:1@localhost/loraserver_ns?sslmode=disable"
make test
make build

openssl rand -base64 32 # remember result of this command
nano packaging/deb/default
# set GW_SERVER_JWT_SECRET to result of 'openssl command's result'
# set POSTGRES_DSN=postgres://loraserver_ns:1@localhost/loraserver_ns?sslmode=disable

cd $GOPATH/src/github.com/brocaar/loraserver
GOOS=linux GOARCH=amd64 make package
sudo apt-get install ruby-dev
sudo apt-get install build-essential
sudo gem install fpm
cd packaging
GOOS=linux GOARCH=amd64 TARGET=deb NAME=loraserver ./package.sh
cd ../dist/deb
sudo dpkg -i loraserver_0.23.3-4-g2f34de7_amd64.deb

sudo systemctl status loraserver
sudo systemctl start loraserver
journalctl -u loraserver -f -n 50

#2

Please see Compiling the LoRa Server source-code


#3