#!/bin/bash # Installation script for Linux System Tuning Suite set -euo pipefail INSTALL_DIR="/opt/linux-system-tuning" BIN_DIR="/usr/local/bin" SYSTEMD_DIR="/etc/systemd/system" echo "🚀 Installing Linux System Tuning Suite" echo "=======================================" # Check if running as root if [[ $EUID -ne 0 ]]; then echo "Please run this installer as root (use sudo)" exit 1 fi # Create installation directory echo "Creating installation directory..." mkdir -p "$INSTALL_DIR" cp -r * "$INSTALL_DIR/" # Create symlinks in PATH echo "Creating command symlinks..." ln -sf "$INSTALL_DIR/tune-system.sh" "$BIN_DIR/tune-system" ln -sf "$INSTALL_DIR/system-analyzer.sh" "$BIN_DIR/system-analyzer" ln -sf "$INSTALL_DIR/monitor.sh" "$BIN_DIR/system-monitor" # Create directories mkdir -p /var/lib/system-tuning/{backups,configs,logs} mkdir -p /tmp/tmpfs-cache echo "✅ Installation complete!" echo "" echo "Available commands:" echo " tune-system - Main tuning tool" echo " system-analyzer - System analysis" echo " system-monitor - Performance monitoring" echo "" echo "Quick start:" echo " sudo system-analyzer # Analyze your system" echo " sudo tune-system --auto # Apply optimizations" echo " system-monitor live # Monitor performance" echo "" echo "For more information, see: $INSTALL_DIR/README.md"