外观
📦 软件安装指南
📥 下载安装包
系统要求
- 仅支持64位操作系统
- 建议系统内存 ≥ 1GB
- 建议磁盘空间 ≥ 10GB
下载地址
shell
# Windows 64位下载地址
https://software.wueasy.com/gateway-go/latest/gateway_go_win_64.zipshell
# Linux系统(Intel/AMD处理器)
https://software.wueasy.com/gateway-go/latest/gateway_go_linux_amd64.tar.gz
# Linux系统(飞腾/鲲鹏等ARM处理器)
https://software.wueasy.com/gateway-go/latest/gateway_go_linux_arm64.tar.gzshell
# Mac系统(M1/M2/M3芯片)
https://software.wueasy.com/gateway-go/latest/gateway_go_mac_arm64.tar.gz
# Mac系统(Intel处理器)
https://software.wueasy.com/gateway-go/latest/gateway_go_mac_amd64.tar.gz如何选择正确的版本?
Windows系统:直接使用Windows 64位版本
AMD64架构(x86_64):
- Linux系统:使用 Linux AMD64版本
- Mac系统:使用 Mac AMD64版本
- 适用于:Intel或AMD处理器
ARM64架构(aarch64):
- Linux系统:使用 Linux ARM64版本(飞腾/鲲鹏等)
- Mac系统:使用 Mac ARM64版本(M1/M2/M3芯片)
可以通过以下命令查看系统架构:
bash
# Linux/Mac系统
uname -m
# 输出说明:
# x86_64: 选择AMD64版本
# aarch64/arm64: 选择ARM64版本🚀 安装步骤
第一步:解压安装包
下载完成后,解压安装包到指定目录:
bash
# 解压安装包
tar -zxvf gateway_go_linux_amd64.tar.gz
cd gateway_go_linux_amd64
# 赋予执行权限
chmod +x gateway_linux_amd64cmd
# 解压安装包到指定目录
# 进入解压后的目录
cd gateway_go_win_64第二步:执行安装命令
重要提醒
必须先执行 install 命令安装软件到系统,才能使用启动、停止等服务管理命令!
bash
# 安装软件到系统(必须先执行此步骤)
sudo ./gateway_linux_amd64 install
# 安装成功后会显示:
# 安装服务成功cmd
# 以管理员身份运行命令提示符,然后执行:
gateway_win_64.exe install
# 安装成功后会显示:
# 安装服务成功注意事项
- Linux系统需要使用
sudo权限执行安装命令 - Windows系统需要以管理员身份运行命令提示符
- 安装完成后,软件会注册为系统服务
第三步:启动服务
安装完成后,可以使用以下命令启动服务:
bash
# 启动服务
sudo ./gateway_linux_amd64 start
# 查看服务状态
sudo ./gateway_linux_amd64 statusbash
# 启动服务
sudo systemctl start gateway.service
# 查看服务状态
sudo systemctl status gateway.service
# 设置开机自启动
sudo systemctl enable gateway.servicecmd
# 启动服务
gateway_win_64.exe start
# 查看服务状态
gateway_win_64.exe status第四步:验证安装
服务启动后,可以通过以下方式验证安装是否成功:
bash
# 检查服务端口是否监听(默认端口8080)
netstat -an | grep 8080
# 或者使用telnet测试
telnet 127.0.0.1 8080🛠️ 命令参考
软件管理命令
执行顺序
- 必须先执行
install命令安装软件 - 然后才能执行
start、stop、restart等服务管理命令
| 命令 | 说明 | 适用系统 | 执行顺序 |
|---|---|---|---|
./gateway_linux_amd64 install | 安装软件到系统(必须首先执行) | Linux | ① |
./gateway_linux_amd64 start | 启动服务 | Linux | ② |
./gateway_linux_amd64 stop | 停止服务 | Linux | - |
./gateway_linux_amd64 restart | 重启服务 | Linux | - |
./gateway_linux_amd64 status | 查看服务状态 | Linux | - |
./gateway_linux_amd64 uninstall | 从系统卸载软件 | Linux | - |
bash
# 1. 首先安装软件(必须步骤)
sudo ./gateway_linux_amd64 install
# 2. 启动服务
sudo ./gateway_linux_amd64 start
# 3. 查看状态
sudo ./gateway_linux_amd64 statuscmd
# 1. 首先安装软件(必须步骤)
gateway_win_64.exe install
# 2. 启动服务
gateway_win_64.exe start
# 3. 查看状态
gateway_win_64.exe status系统服务命令
仅在执行
install命令后可用,通过系统服务方式管理应用
| 命令 | 说明 | 前提条件 |
|---|---|---|
systemctl start gateway.service | 启动服务 | 已执行install命令 |
systemctl stop gateway.service | 停止服务 | 已执行install命令 |
systemctl restart gateway.service | 重启服务 | 已执行install命令 |
systemctl status gateway.service | 查看服务状态 | 已执行install命令 |
systemctl enable gateway.service | 设置开机自启动 | 已执行install命令 |
systemctl disable gateway.service | 关闭开机自启动 | 已执行install命令 |
注意
- 系统服务命令仅适用于 Linux 系统
- 必须先执行
install命令,系统服务才会生效 - 所有系统服务命令都需要
sudo权限
🔧 常见问题
Q: 为什么执行启动命令时提示"服务不存在"?
A: 请确保已经先执行了 install 命令安装软件到系统。安装命令会注册系统服务,只有安装后才能使用启动、停止等命令。
Q: 安装时提示权限不足怎么办?
A:
- Linux系统:请使用
sudo权限执行安装命令 - Windows系统:请以管理员身份运行命令提示符
Q: 如何卸载软件?
A: 使用 uninstall 命令:
bash
# Linux
sudo ./gateway_linux_amd64 uninstall
# Windows
gateway_win_64.exe uninstallQ: 后台命令启动服务失败?
使用
./gateway_linux_amd64 start启动命令失败,可以查看日志/var/log/messages
A: 通常是由于文件权限或SELinux上下文问题导致的
bash
# 设置正确的执行权限
sudo chmod +x /srv/gateway/gateway_linux_amd64
# 查看当前SELinux上下文
#ls -Z /srv/gateway/gateway_linux_amd64
# 设置正确的SELinux上下文
sudo chcon -R -t bin_t /srv/gateway/gateway_linux_amd64