Initial commit: Server Management Toolkit v2.0
- Complete security menu restructure (3-mode: Analysis/Actions/Live) - Intelligent cPHulk enablement with CSF whitelist import - Live network security monitoring dashboard - Multi-source threat detection and classification - 50+ organized security tools across 4-level menu hierarchy - System health diagnostics with cPanel/WHM integration - Reference database for cross-module intelligence sharing
This commit is contained in:
+379
@@ -0,0 +1,379 @@
|
||||
# 🚀 Server Management Toolkit - Setup Guide
|
||||
|
||||
## ✅ What You Have Now
|
||||
|
||||
A **modular, scalable server management system** with:
|
||||
|
||||
✨ **Professional Menu System**
|
||||
- Clean, organized category-based menus
|
||||
- Color-coded interface
|
||||
- Easy navigation
|
||||
|
||||
📦 **Modular Architecture**
|
||||
- 7 main categories (80+ potential modules)
|
||||
- Easy to add new modules
|
||||
- Organized by function
|
||||
|
||||
☁️ **Nextcloud Integration**
|
||||
- Download modules on-demand
|
||||
- Easy updates
|
||||
- Share across multiple servers
|
||||
|
||||
🎯 **First Module Ready**
|
||||
- `bot-analyzer.sh` - Enhanced v3.0
|
||||
- All improvements we made today
|
||||
- Ready to use immediately
|
||||
|
||||
---
|
||||
|
||||
## 📋 Directory Structure
|
||||
|
||||
```
|
||||
/root/server-toolkit/
|
||||
├── launcher.sh ← Main menu (run this!)
|
||||
├── install.sh ← Quick installer
|
||||
├── README.md ← Full documentation
|
||||
├── manifest.txt.example ← Template for Nextcloud
|
||||
│
|
||||
├── modules/
|
||||
│ ├── security/
|
||||
│ │ └── bot-analyzer.sh ✅ READY (v3.0 Enhanced)
|
||||
│ ├── wordpress/ (empty - add modules here)
|
||||
│ ├── performance/ (empty - add modules here)
|
||||
│ ├── backup/ (empty - add modules here)
|
||||
│ ├── monitoring/ (empty - add modules here)
|
||||
│ ├── troubleshooting/ (empty - add modules here)
|
||||
│ └── reporting/ (empty - add modules here)
|
||||
│
|
||||
├── lib/ (common functions - future)
|
||||
├── config/ (created on first run)
|
||||
└── logs/ (created on first run)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Quick Start (3 Steps)
|
||||
|
||||
### Step 1: Run the Installer
|
||||
|
||||
```bash
|
||||
cd /root/server-toolkit
|
||||
chmod +x install.sh
|
||||
./install.sh
|
||||
```
|
||||
|
||||
**What it does:**
|
||||
- Creates directory structure
|
||||
- Sets permissions
|
||||
- Offers to create `/usr/local/bin/server-toolkit` symlink
|
||||
|
||||
### Step 2: Launch & Configure
|
||||
|
||||
```bash
|
||||
# Option A: Direct
|
||||
/root/server-toolkit/launcher.sh
|
||||
|
||||
# Option B: If symlink created
|
||||
server-toolkit
|
||||
```
|
||||
|
||||
**First time:**
|
||||
1. Select `9` (Configuration)
|
||||
2. Set your Nextcloud URL (optional, for module downloads)
|
||||
3. Review other settings
|
||||
4. Save and exit
|
||||
|
||||
### Step 3: Test the Bot Analyzer
|
||||
|
||||
From the launcher:
|
||||
1. Select `1` (Security & Threat Analysis)
|
||||
2. Select `1` (Full Bot Analysis)
|
||||
3. Watch it run!
|
||||
|
||||
---
|
||||
|
||||
## ☁️ Nextcloud Setup (Optional but Recommended)
|
||||
|
||||
### Why Use Nextcloud?
|
||||
|
||||
✅ Store all modules in one place
|
||||
✅ Easy updates across multiple servers
|
||||
✅ No need to manually copy files
|
||||
✅ Version control your modules
|
||||
|
||||
### Setup Process
|
||||
|
||||
**1. Upload to Nextcloud**
|
||||
|
||||
```
|
||||
your-nextcloud/
|
||||
└── server-toolkit/
|
||||
├── manifest.txt ← Copy from manifest.txt.example
|
||||
└── modules/
|
||||
├── security/
|
||||
│ ├── bot-analyzer.sh
|
||||
│ ├── live-monitor.sh
|
||||
│ └── ...
|
||||
├── wordpress/
|
||||
│ ├── wp-cron-status.sh
|
||||
│ └── ...
|
||||
└── ...
|
||||
```
|
||||
|
||||
**2. Share the Folder**
|
||||
- Right-click folder → Share
|
||||
- Create public link
|
||||
- Enable "Allow download"
|
||||
- Copy the share link
|
||||
|
||||
**3. Convert Link to Download URL**
|
||||
|
||||
Original link:
|
||||
```
|
||||
https://nextcloud.example.com/s/AbC123DeF
|
||||
```
|
||||
|
||||
Convert to:
|
||||
```
|
||||
https://nextcloud.example.com/s/AbC123DeF/download?path=/
|
||||
```
|
||||
|
||||
**4. Configure**
|
||||
|
||||
```bash
|
||||
nano /root/server-toolkit/config/settings.conf
|
||||
```
|
||||
|
||||
Set:
|
||||
```bash
|
||||
NEXTCLOUD_BASE_URL="https://nextcloud.example.com/s/AbC123DeF/download?path=/"
|
||||
```
|
||||
|
||||
**5. Update Modules**
|
||||
|
||||
From launcher: Select `8` (Update All Modules)
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Adding New Modules
|
||||
|
||||
### Method 1: Create Locally
|
||||
|
||||
```bash
|
||||
# Create new module
|
||||
nano /root/server-toolkit/modules/wordpress/wp-cron-status.sh
|
||||
|
||||
# Make executable
|
||||
chmod +x /root/server-toolkit/modules/wordpress/wp-cron-status.sh
|
||||
|
||||
# Test it
|
||||
/root/server-toolkit/modules/wordpress/wp-cron-status.sh
|
||||
|
||||
# It's now available in the launcher menu!
|
||||
```
|
||||
|
||||
### Method 2: Download from Nextcloud
|
||||
|
||||
1. Upload to Nextcloud: `modules/wordpress/wp-cron-status.sh`
|
||||
2. Add to `manifest.txt`: `wordpress:wp-cron-status.sh`
|
||||
3. From launcher: Select `8` (Update All Modules)
|
||||
|
||||
---
|
||||
|
||||
## 📊 Current Features
|
||||
|
||||
### ✅ Working Now
|
||||
|
||||
| Feature | Status |
|
||||
|---------|--------|
|
||||
| Modular architecture | ✅ Complete |
|
||||
| Category-based menus | ✅ Complete |
|
||||
| Bot analyzer v3.0 | ✅ Working |
|
||||
| Server IP detection | ✅ Working |
|
||||
| Threat scoring | ✅ Working |
|
||||
| Nextcloud integration | ✅ Working |
|
||||
| Configuration system | ✅ Working |
|
||||
| Auto-updates | ✅ Working |
|
||||
|
||||
### 🔜 Coming Soon (As You Build Them)
|
||||
|
||||
| Module | Priority | Category |
|
||||
|--------|----------|----------|
|
||||
| wp-cron-status.sh | High | WordPress |
|
||||
| wp-cron-mass-fix.sh | High | WordPress |
|
||||
| oom-killer-plotter.sh | Medium | Troubleshooting |
|
||||
| resource-monitor.sh | Medium | Performance |
|
||||
| disk-usage-report.sh | Medium | Performance |
|
||||
|
||||
---
|
||||
|
||||
## 🎓 Example Workflows
|
||||
|
||||
### Daily Security Check
|
||||
|
||||
```bash
|
||||
server-toolkit
|
||||
→ 1 (Security)
|
||||
→ 2 (Quick Scan - 1 hour)
|
||||
→ Review threats
|
||||
→ 5 (Auto-Block if needed)
|
||||
```
|
||||
|
||||
### WordPress Maintenance
|
||||
|
||||
```bash
|
||||
server-toolkit
|
||||
→ 2 (WordPress)
|
||||
→ 2 (Check WP-Cron status)
|
||||
→ 3 (Fix if broken)
|
||||
→ 7 (Optimize databases)
|
||||
```
|
||||
|
||||
### Performance Investigation
|
||||
|
||||
```bash
|
||||
server-toolkit
|
||||
→ 3 (Performance)
|
||||
→ 1 (Resource Monitor)
|
||||
→ 2 (Top Processes)
|
||||
→ Identify issues
|
||||
```
|
||||
|
||||
### Troubleshoot Out-of-Memory
|
||||
|
||||
```bash
|
||||
server-toolkit
|
||||
→ 6 (Troubleshooting)
|
||||
→ 1 (OOM Killer Plotter)
|
||||
→ Review memory spikes
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔐 Security Best Practices
|
||||
|
||||
### Before Running
|
||||
|
||||
✅ Always backup first
|
||||
✅ Test on staging if possible
|
||||
✅ Review whitelist before blocking
|
||||
✅ Check false positives
|
||||
|
||||
### Regular Maintenance
|
||||
|
||||
📅 **Daily**: Quick security scan
|
||||
📅 **Weekly**: Full bot analysis
|
||||
📅 **Monthly**: Update all modules
|
||||
📅 **Quarterly**: Review all whitelists
|
||||
|
||||
---
|
||||
|
||||
## 🆘 Troubleshooting
|
||||
|
||||
### Launcher Won't Start
|
||||
|
||||
```bash
|
||||
chmod +x /root/server-toolkit/launcher.sh
|
||||
bash /root/server-toolkit/launcher.sh
|
||||
```
|
||||
|
||||
### Module Not Found
|
||||
|
||||
```bash
|
||||
# Check if it exists
|
||||
ls -la /root/server-toolkit/modules/security/bot-analyzer.sh
|
||||
|
||||
# Redownload from Nextcloud
|
||||
server-toolkit → 8 (Update)
|
||||
```
|
||||
|
||||
### Config Issues
|
||||
|
||||
```bash
|
||||
# Recreate config
|
||||
rm /root/server-toolkit/config/settings.conf
|
||||
server-toolkit → 9 (Configuration)
|
||||
```
|
||||
|
||||
### Nextcloud Download Fails
|
||||
|
||||
1. Check NEXTCLOUD_BASE_URL format
|
||||
2. Ensure Nextcloud folder is shared publicly
|
||||
3. Test URL in browser first
|
||||
4. Check manifest.txt format
|
||||
|
||||
---
|
||||
|
||||
## 📞 Next Steps
|
||||
|
||||
### Immediate
|
||||
|
||||
1. ✅ Run installer
|
||||
2. ✅ Test bot analyzer
|
||||
3. ✅ Configure settings
|
||||
|
||||
### Short Term
|
||||
|
||||
1. 📝 Create wp-cron-status.sh module
|
||||
2. 📝 Create wp-cron-mass-fix.sh module
|
||||
3. ☁️ Setup Nextcloud distribution
|
||||
|
||||
### Long Term
|
||||
|
||||
1. 📦 Build remaining modules
|
||||
2. 🔄 Setup automated updates
|
||||
3. 📧 Configure email alerts
|
||||
4. 📊 Create custom dashboards
|
||||
|
||||
---
|
||||
|
||||
## 💡 Pro Tips
|
||||
|
||||
### Performance
|
||||
|
||||
- Bot analyzer runs in < 1 second for small logs
|
||||
- Use `-H 1` for quick scans
|
||||
- Schedule daily cron for security checks
|
||||
|
||||
### Organization
|
||||
|
||||
- Keep modules organized by category
|
||||
- Use descriptive names
|
||||
- Add comments in scripts
|
||||
- Update manifest when adding modules
|
||||
|
||||
### Distribution
|
||||
|
||||
- Use Nextcloud for easy sharing
|
||||
- Keep manifest.txt updated
|
||||
- Version your modules
|
||||
- Test before distributing
|
||||
|
||||
---
|
||||
|
||||
## 📚 Documentation
|
||||
|
||||
- `README.md` - Full documentation
|
||||
- `launcher.sh` - Built-in help menus
|
||||
- Each module - Individual usage info
|
||||
|
||||
---
|
||||
|
||||
## ✅ Installation Checklist
|
||||
|
||||
- [ ] Ran `/root/server-toolkit/install.sh`
|
||||
- [ ] Launcher runs successfully
|
||||
- [ ] Created symlink (optional)
|
||||
- [ ] Configured settings
|
||||
- [ ] Tested bot analyzer
|
||||
- [ ] Setup Nextcloud (optional)
|
||||
- [ ] Updated modules (if using Nextcloud)
|
||||
|
||||
---
|
||||
|
||||
**You now have a professional, scalable server management system!** 🎉
|
||||
|
||||
Add modules as you need them, share via Nextcloud, and manage your entire infrastructure from one clean interface.
|
||||
|
||||
**Version**: 2.0.0
|
||||
**Date**: 2025-10-30
|
||||
Reference in New Issue
Block a user