Linux:ArozOS 安裝與建立開機自啟動服務

可以建立LXC 建議 4c 2G 8G以上

首先安裝 Golang:

wget https://golang.org/dl/go1.17.3.linux-amd64.tar.gz
tar -C /usr/local -xvf go1.17.3.linux-amd64.tar.gz

指定系統變數:

nano ~/.profile
export PATH=$PATH:/usr/local/go/bin

更新系統變數:

source ~/.profile

檢查版本:

go version

安裝git:

apt install git

安裝 arozos 服務:

cd /usr/local/bin/
git clone https://github.com/tobychui/arozos
cd ./arozos/src/
go build
./arozos

建立 systemctl 服務:

nano /etc/systemd/system/arozos.service
[Unit]
Description=arozos
Wants=network-online.target
After=network-online.target

[Service]
User=root
Type=simple
Restart=always
RestartSec=5s
ExecStart=/usr/local/bin/arozos/src/arozos
WorkingDirectory=/usr/local/bin/arozos/src/
[Install]
WantedBy=multi-user.target

啟動服務:

systemctl daemon-reload
service arozos start
service arozos status
systemctl enable arozos
阅读剩余
THE END