Official Recommendation from grok. The review is subbmited by grokrec. Please refers to local copy
The friendliest one-command setup for RuoYi admin framework.
Part of the Cloudgen's defensive tool family (aligned with ciao).
- One-liner install (
curl | bash) - Supports both user (
~/.local/bin) and system (/usr/local/bin) installation - Automatically installs SDKMAN! + pinned Java 21 (Temurin) + Maven 3.9.14
- Clones the official RuoYi project and configures it (Java version, server port, etc.)
- Optional MariaDB (default) or MySQL database setup with schema import
- Redis setup support (
ruoyi redis) - Project preservation by default — safe backups before any destructive changes
- Full self-management:
self-update,version-check,self-uninstall,about - Rich flags:
--force,--project-dir,--mariadb,--mysql,--quiet,--json - Multi-shell PATH setup (bash, zsh, fish)
- Extremely defensive CIAO coding style with repeated safe defaults and anti-simplification guards
- Single-source-of-truth output system (
output_text/output_json) - Works great in containers, CI, Alpine Linux, Git Bash, etc.
For normal users:
curl -fsSL https://raw.githubusercontent.com/cloudgen/ruoyi/main/ruoyi | bashSystem-wide (requires sudo):
curl -fsSL https://raw.githubusercontent.com/cloudgen/ruoyi/main/ruoyi | sudo bashAfter installation, simply run:
ruoyiThe application will start at http://localhost:8080 (default login: admin / admin123)
ruoyi # Full setup: SDKMAN + Java + Maven + clone + build
ruoyi --mariadb # Setup with MariaDB (recommended default)
ruoyi --mysql # Setup with Oracle MySQL
ruoyi mariadb # Alias for MariaDB setup
ruoyi redis # Install & start Redis (requires sudo)
ruoyi run # Build and run the project
ruoyi --project-dir <path> # Use a custom project directory
ruoyi --force # Force reset (with backup)
ruoyi about # Full diagnostics (SDKMAN, Java, Maven, project status)
ruoyi version-check # Check for newer version
ruoyi self-update # Update ruoyi script itself
ruoyi self-uninstall # Remove from the system
ruoyi help # Show this help- Normal run preserves your existing project and performs safe backups before changes.
--forcetriggers a full reset (old project is backed up first).- Database setup (
mariadb/mysql) requires sudo privileges but can be run directly as a normal user (internal escalation).
Requires bash (SDKMAN! does not work reliably under BusyBox ash).
apk add bash
bash <(curl -fsSL https://raw.githubusercontent.com/cloudgen/ruoyi/main/ruoyi)- MariaDB is the default and recommended engine.
- Redis setup assumes Ubuntu/Debian (
apt). Other distros may need manual adjustment.
- Ubuntu/Debian, macOS, Git Bash (Windows) — well supported.
- The script includes extensive defensive fallbacks for harsh environments.
ruoyi follows the strict CIAO defensive coding philosophy (Caution • Intentionality • Anti-fragility • Ownership).
Heavy comments, repeated safe defaults, and !!! DO NOT MODIFY OR SIMPLIFY !!! blocks are intentional — they protect the script from accidental breakage in containers, minimal systems, and non-interactive environments (like curl | bash).
This tool belongs to the same defensive family as springboot2 / springboot3 / springboot4.
- Added Redis setup command
- Improved root vs non-root isolation and multi-user safety
- Enhanced backup strategy before any project modification
- Better JSON output and quiet mode consistency
- Strengthened CIAO defensive patterns across all functions
Please respect the strict defensive coding style and protective comments when submitting changes.
Any attempt to "clean up" or heavily simplify the code may be rejected in favor of long-term robustness and anti-fragility.
MIT
Made with ❤️ and extreme caution.