You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.7 KiB
2.7 KiB
靶机程序安装手册
VersionV0.1试行版
修订记录
| 日期 | 版本 | 说明 | 作者 |
|---|---|---|---|
| 2025年12月4日 | V0.1 | 首次编写 | 朱冠臣 |
1. 概述
本文档为安装手册,用于任何形式的轨道靶机,不限于地轨,空轨,竖轨等等。
靶机运行环境为如下
- 架构为AMD64
- 需要预装.net8 运行时
- 设备具备ch341或ch340驱动
靶机需提前配置好串口编号并测试串口信息输出
2. 安装系统环境
- Ubuntu20.04
- openssh-server
- net-tools
- git
- dotnet8
- 串口授权
默认安装环境已完成
更新apt
sudo apt update
2.1 安装git
sudo apt-get install git -y
2.2 安装dotnet8
# Get OS version info which adds the $ID and $VERSION_ID variables
source /etc/os-release
# Download Microsoft signing key and repository
wget https://packages.microsoft.com/config/$ID/$VERSION_ID/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
# Install Microsoft signing key and repository
sudo dpkg -i packages-microsoft-prod.deb
# Clean up
rm packages-microsoft-prod.deb
# Update packages
sudo apt update
安装dotnet
sudo apt-get install dotnet-sdk-8.0 -y
2.3 串口授权(如果用户名为其它则修改为u)
sudo usermod -aG dialout u
(可选)2.6 关闭防火墙&允许访问端口
检查防火墙状态
sudo ufw status
如果关闭
Status: inactive
如果开启,关闭防火墙
sudo ufw disable
或者开启对应端口
sudo ufw allow <port/service>
3. 编译安装软件
- 克隆项目(项目地址以实际地址为准)
- 打release包
- 注册程序为Systemctl 服务
3.1 克隆项目
git clone http://124.222.119.133:3000/petejk/TargetService
3.2 发布release包
cd TargetService
dotnet publish --configuration Release
3.3 注册程序为Systemctl 服务
# 切换到工程对应路径SystemCtl下
cd SystemCtl
# 启动install.sh脚本
sudo chmod 777 install.sh
./install.sh
3.4 开启或关闭服务
# 开启服务
sudo systemctl start Target.service
# 关闭服务
sudo systemctl stop Target.service
# 重启服务
sudo systemctl restart Target.service
# 查看运行状态
sudo systemctl status Target.service