Environment Setup β
This guide will help you set up the development environment for the Gin-Vue-Admin project from scratch. If you already have the relevant environment, you can skip the corresponding sections.
π Quick Checklist β
Before starting, please ensure your system meets the following requirements:
π Environment Requirements
- Git: For code version management
- Node.js: >= 18.16.2 (recommended to use LTS version)
- Go: >= 1.22 (recommended to use latest stable version)
- MySQL: >= 8.0, storage engine must be InnoDB
- Redis: >= 6.0 (optional, for caching)
π¦ Node.js Environment Installation β
1. Download and Install Node.js β
Visit the Node.js official website to download and install the LTS version.
Recommended version: Node.js 18.x or higher
2. Verify Installation β
Open terminal or command prompt and run the following commands to verify installation:
# Check Node.js version
node -v
# Output example: v18.17.0
# Check npm version
npm -v
# Output example: 9.6.73. Configure npm Mirror Source (Optional) β
To improve download speed in China, it's recommended to configure Taobao mirror source:
# Set Taobao mirror source
npm config set registry https://registry.npmmirror.com
# Verify configuration
npm config get registry4. Recommended Development Tools β
- VS Code: Download Link
- WebStorm: Download Link
π§ Go Environment Installation β
1. Download and Install Go β
Choose the download link based on your network environment:
- International Users: https://golang.org/dl/
- Domestic Users: https://golang.google.cn/dl/
Recommended version: Go 1.22 or higher
2. Verify Installation β
# Check Go version
go version
# Output example: go version go1.22.0 darwin/amd64
# View Go environment information
go env3. Configure Go Module Proxy (Recommended) β
To improve module download speed, it is recommended to configure the Go module proxy:
# Enable Go Modules
go env -w GO111MODULE=on
# Configure module proxy
go env -w GOPROXY=https://goproxy.cn,direct
# Configure private module exclusion from proxy
go env -w GOPRIVATE=*.corp.example.com4. Recommended Development Tools β
- GoLand: Download Link (Recommended)
- VS Code + Go Plugin: Free alternative
ποΈ Database Environment β
MySQL Installation β
macOS β
# Install using Homebrew
brew install mysql
# Start MySQL service
brew services start mysqlUbuntu/Debian β
# Update package list
sudo apt update
# Install MySQL
sudo apt install mysql-server
# Start MySQL service
sudo systemctl start mysql
sudo systemctl enable mysqlWindows β
Visit MySQL Official Website to download the installer.
Redis Installation (Optional) β
macOS β
brew install redis
brew services start redisUbuntu/Debian β
sudo apt install redis-server
sudo systemctl start redis-server
sudo systemctl enable redis-serverπ οΈ Development Tool Configuration β
Recommended VS Code Plugins β
{
"recommendations": [
"golang.go",
"vue.volar",
"bradlc.vscode-tailwindcss",
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-next",
"formulahendry.auto-rename-tag",
"christian-kohler.path-intellisense"
]
}GoLand Configuration Suggestions β
- Go Modules: Ensure Go Modules support is enabled
- Code Formatting: Configure
gofmtandgoimports - Code Inspection: Enable
golintandgo vet
π Branch Version Description β
| Branch | Status | Description | Recommended |
|---|---|---|---|
| main | π’ Actively Maintained | Main branch, recommended for production environments | β Recommended |
| i18n-dev-new | π‘ Updating | Composition API multilingual version | π In Development |
| v2.4.x | π΄ No Longer Maintained | Declarative API version | β Not Recommended |
| i18n-dev | π΄ No Longer Maintained | Declarative API multilingual version | β Not Recommended |
β Environment Verification β
After completing the environment installation, run the following commands to verify if the environment is correctly configured:
# Check Git
git --version
# Check Node.js and npm
node -v && npm -v
# Check Go
go version
# Check MySQL (ensure the service is started)
mysql --version
# Check Redis (if installed)
redis-cli --versionIf all commands output version information correctly, the environment setup is successful!


