Repository navigation
MaxThom edited this page Feb 21, 2025
·
1 revision
# Git
sudo apt install git
# Go
wget https://go.dev/dl/go1.23.3.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.23.3.linux-arm64.tar.gz
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.profile
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
export PATH=$PATH:$HOME/go/bin
export PATH=$PATH:/usr/local/go/bin# Setup ssh pub key in github ssh settings
ssh-keygen -t ed25519 -C "maxthomassin@hotmail.com"
eval "$(ssh-agent -s)"
cat ~/.ssh/id_ed25519.pub
# Setup private git
go env -w GOPRIVATE=github.com/maxthom/mir/*
# In ~/.gitconfig
[url "ssh://git@github.com/"]
insteadOf = https://github.com# Bring Mir binary over
just install-scp mir@<ip>
# On the rpi
mir tools install
mir tools generate device-template github.com/<usr|org>/<repo>/<name>ssh-keygen -t rsa -b 4096
ssh-copy-id mir@<ip> # find ip with nmap 192.168.3.0/24
zed ssh://mir@<ip>/path/to/folderTo install binary so it run on startup:
create file /etc/systemd/system/mir-dev.service:
[Unit]
Description=Mir Device
After=network.target
[Service]
ExecStart=/home/mir/code/demo/bin/device
User=mir
Restart=always
[Install]
WantedBy=multi-user.targetEdit user and path accordinly
# Start the server automaticly on boot
sudo systemctl enable mir-dev.service
sudo systemctl disable mir-dev.service
# Start the service now
sudo systemctl start mir-dev.service
sudo systemctl stop mir-dev.service
# Status/Logs
sudo systemctl status mir-dev.service
journalctl -u mir-dev.service # -f (follow) -b (since boot)