# 安装脚本使用说明 本目录包含 Go 环境的自动安装脚本。 ## 脚本列表 | 脚本 | 适用系统 | 说明 | |------|----------|------| | `install-go-windows.ps1` | Windows 10/11 | PowerShell 安装脚本 | | `install-go-linux.sh` | Linux/macOS | Bash 安装脚本 | ## 使用方法 ### Windows 1. **以管理员身份打开 PowerShell** 2. **执行安装脚本** ```powershell cd d:\fs_workspace\market-data-service\scripts .\install-go-windows.ps1 ``` 3. **等待安装完成** 脚本会自动: - 下载 Go 1.21.6 - 执行安装 - 配置环境变量 - 设置国内镜像 4. **重新打开 PowerShell**,验证安装 ```powershell go version ``` ### Linux / macOS 1. **打开终端** 2. **执行安装脚本** ```bash cd /path/to/market-data-service/scripts chmod +x install-go-linux.sh ./install-go-linux.sh ``` 3. **使环境变量生效** ```bash source ~/.bashrc # Linux Bash source ~/.zshrc # macOS Zsh ``` 4. **验证安装** ```bash go version ``` ## 注意事项 - 脚本需要管理员/Root 权限 - 安装过程中需要联网下载 - 安装完成后需要重新打开终端 ## 安装后步骤 安装完成后,返回项目目录启动服务: ```bash cd d:\fs_workspace\market-data-service go mod download go run ./cmd/server ``` 然后访问管理后台: ``` http://localhost:8080/admin ```