Ubuntu how to compile: Step-by-step

PeerZero
edited March 2021 in Command-line Client

Tested on Ubuntu 20.04 (LTS) x64.

  • Housekeeping! Update Linux stuff:
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
apt-get autoremove -y
apt-get autoclean -y
  • Install Go (compiler)
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go
  • Download git repository
git clone https://github.com/PeernetOfficial/Cmd
  • Compile!
go build
mv ./Cmd ../Peernet

Use

Then you can simply run it as "./Peernet"!

Peernet Cmd 0.1
------------------------------
Please enter a command:
help               Show this help
net list           Lists all network adapters and their IPs
status             Get current status
chat               Send text to all peers
peer list          List current peers
debug key create   Create Public-Private Key pair
debug key self     List current Public-Private Key pair

On the first run it will create the file Settings.yaml which contains the newly generate Private Key. By default it will listen on all IPs. On servers, it is a good idea to edit the "Listen" field. Note that IPv6 addresses need to be put in brackets. Example:

LogFile: Log.txt
Listen: ["1.2.3.4:112","[2a03:1234::5678]:112"]
ListenWorkers: 4
...

To run in the background:

nohup ./Peernet &

To find the process and then terminate it:

ps -ef
kill [pid]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!