Installation Guide
10/30/24About 1 min
Installation Guide
This section will help you complete the environment preparation and basic configuration needed to run QiLuo, without using Docker.
Environment Requirements
- Operating System: macOS / Linux / Windows (WSL2 recommended)
- Rust: stable (install via rustup)
- Node.js: ≥ 18 (pnpm recommended)
- Database: PostgreSQL or MySQL (examples use PostgreSQL)
- Redis (optional): Cache / Distributed Locks / Queues
- Build Dependencies: pkg-config, OpenSSL (on Linux: libssl-dev)
Install Tools
Install RustInstall MySQLInstall Redis
Get the Source Code
Backend Repository
GitHub https://github.com/chelunfu/qiluo_admin.git
git clone https://github.com/chelunfu/qiluo_admin.git
cd qiluo_adminGitCode https://gitcode.com/will_csdn_go/qiluo_admin.git
git clone https://gitcode.com/will_csdn_go/qiluo_admin.git
cd qiluo_adminGitee https://gitee.com/chenlunfu/qiluo_admin.git
git clone https://gitee.com/chenlunfu/qiluo_admin.git
cd qiluo_adminFrontend Repository
GitHub https://github.com/chelunfu/qiluo_vue.git
git clone https://github.com/chelunfu/qiluo_vue.git
cd qiluo_vueGitCode https://gitcode.com/will_csdn_go/qiluo_vue.git
git clone https://gitcode.com/will_csdn_go/qiluo_vue.git
cd qiluo_vueGitee https://gitee.com/chenlunfu/qiluo_vue.git
git clone https://gitee.com/chenlunfu/qiluo_vue.git
cd qiluo_vueBackend Configuration
Create config/default.toml and fill in the necessary parameters:
# Web server configuration
server:
domainname: http://localhost:5001
port: 5001
host: 0.0.0.0
static_dir: data/static
web_dir: data/web
upload_dir: data/upload
ssl:
enable: false
key: data/ssl/key.pem
cert: data/ssl/cert.pem
middlewares:
etag:
enable: true
limit_payload:
enable: true
body_limit: 5mb
logger:
enable: true
catch_panic:
enable: true
timeout_request:
enable: false
timeout: 5000
cors:
enable: true
allow_origins:
- http://localhost:4000
max_age: 3600
# Worker Configuration
workers:
qeueu:
- default
num_workers: 1
# Database Configuration
database:
uri: {{get_env(name="DATABASE_URL",default="mysql://qiluo:Qiluo123@127.0.0.1:3306/qiluoopen")}}
enable_logging: false
connect_timeout: 5000
idle_timeout: 500
min_connections: 1
max_connections: 1
auto_migrate: true
dangerously_truncate: false
dangerously_recreate: false
# Application logging configuration
logger:
enable: true
pretty_backtrace: true
level: trace
format: compact
log_file_cache: true
log_dir: data/log
file_name: app_log
cache:
cache_type: redis
namespace: qiluo
pool_size: 12
url: {{ get_env(name="REDIS_URL", default="redis://127.0.0.1") }}
# Mailer Configuration
mailer:
smtp:
enable: false
host: smtp.163.com
port: 465
secure: true
auth:
user: xxx@163.com
password: xxx
# Authentication Configuration
auth:
jwt:
secret: arxWd8PStcwb0jyRBENMQVE4Mn6T89Sl
expiration: 604800 # 7 days
# genid
snowgenera:
machine_id: 1001
node_id: 1
system:
super_role:
- 1Database Migration
# Method 1: Using sea-orm-cli
cargo install sea-orm-cli
sea-orm-cli migrate up
# Method 2: If the project has a migration sub-package
cargo run -p migrationStart Backend
cargo runStart Frontend
# Install dependencies
pnpm i
# Configure development environment: .env.development
# VITE_API_BASE_URL="http://127.0.0.1:8080"
# Start
pnpm run dev
# Open http://127.0.0.1:5173Common Issues
- Missing OpenSSL (Linux): sudo apt-get install -y pkg-config libssl-dev
- Database connection failure: Check connection string, database creation, and user permissions
- Port conflicts: Adjust app.addr (backend) or Vite port (frontend)
- Windows compilation errors: Prefer WSL2 or install MSVC build tools