当前位置:首页>Linux>��Linux + Qwen 本地模型 OpenClaw 一键部署脚本

��Linux + Qwen 本地模型 OpenClaw 一键部署脚本

  • 2026-03-26 03:50:17
��Linux + Qwen 本地模型 OpenClaw 一键部署脚本

📜 一键脚本:install-openclaw-qwen-linux.sh

#!/bin/bash# ====================================================# OpenClaw + Qwen 本地模型 Linux 一键部署脚本# 作者:AI Assistant# 版本:2.0# 说明:本脚本将自动安装所有依赖并配置好环境# 支持:Ubuntu/Debian/CentOS/Fedora/RHEL/Arch Linux# ====================================================# 严格模式set -e# 颜色定义RED='\033[0;31m'GREEN='\033[0;32m'YELLOW='\033[1;33m'BLUE='\033[0;34m'CYAN='\033[0;36m'PURPLE='\033[0;35m'NC='\033[0m' # No ColorBOLD='\033[1m'# 全局变量SCRIPT_VERSION="2.0.0"INSTALL_LOG="/tmp/openclaw-install-$(date +%Y%m%d-%H%M%S).log"SELECTED_MODEL=""CUSTOM_MODEL_NAME=""OPENCLAW_TOKEN=""OS_TYPE=""OS_VERSION=""CPU_ARCH=""TOTAL_RAM=0GPU_AVAILABLE=falseINSTALL_DIR="$HOME/openclaw"USE_SYSTEMD=falseUSE_PM2=false# ==================== 工具函数 ====================# 打印彩色信息print_info() {    echo -e "${BLUE}[信息]${NC}$1"}print_success() {    echo -e "${GREEN}[成功]${NC}$1"}print_warning() {    echo -e "${YELLOW}[警告]${NC}$1"}print_error() {    echo -e "${RED}[错误]${NC}$1"}print_step() {    echo ""    echo -e "${BOLD}${CYAN}════════════════════════════════════════════════════════════${NC}"    echo -e "${BOLD}${CYAN}  步骤 $1 : $2${NC}"    echo -e "${BOLD}${CYAN}════════════════════════════════════════════════════════════${NC}"}print_banner() {    clear    echo -e "${PURPLE}${BOLD}"    echo '╔════════════════════════════════════════════════════════════╗'    echo '║                                                            ║'    echo '║    🚀  OpenClaw + Qwen 本地模型 Linux 一键部署脚本        ║'    echo '║                                                            ║'    echo '║    版本: '"$SCRIPT_VERSION"'                                         ║'    echo '║    支持: Ubuntu/Debian/CentOS/Fedora/Arch                 ║'    echo '║                                                            ║'    echo '╚════════════════════════════════════════════════════════════╝'    echo -e "${NC}"    echo ""}# 记录日志log() {    echo "[$(date '+%Y-%m-%d %H:%M:%S')$1" >> "$INSTALL_LOG"}# 检查命令是否存在check_command() {    if command -v $1 &> /dev/null; then        return 0    else        return 1    fi}# 检查上一步是否成功check_error() {    if [ $? -ne 0 ]; then        print_error "$1"        log "错误: $1"        print_warning "是否继续? (y/n) "        read -r continue_choice        if [[ ! "$continue_choice" =~ ^[Yy]$ ]]; then            print_error "安装已中止"            exit 1        fi    fi}# 等待用户确认wait_for_user() {    echo ""    print_info "按回车键继续..."    read -r}# 获取系统信息detect_os() {    if [ -f /etc/os-release ]; then        . /etc/os-release        OS_TYPE=$ID        OS_VERSION=$VERSION_ID    elif [ -f /etc/redhat-release ]; then        OS_TYPE="rhel"        OS_VERSION=$(cat /etc/redhat-release | grep -oE '[0-9]+\.[0-9]+')    elif [ -f /etc/arch-release ]; then        OS_TYPE="arch"        OS_VERSION="rolling"    else        OS_TYPE="linux"        OS_VERSION="unknown"    fi    log "系统类型: $OS_TYPE$OS_VERSION"}# 检测系统信息detect_system() {    print_step "0" "系统环境检测"    # 检测操作系统    detect_os    print_success "操作系统: $OS_TYPE$OS_VERSION"    # 检测CPU架构    CPU_ARCH=$(uname -m)    print_success "CPU架构: $CPU_ARCH"    log "CPU架构: $CPU_ARCH"    # 检测内存 (以GB为单位)    if [ -f /proc/meminfo ]; then        TOTAL_RAM=$(awk '/MemTotal/ {printf "%.0f\n", $2/1024/1024}' /proc/meminfo)        print_success "物理内存: ${TOTAL_RAM}GB"        log "内存: ${TOTAL_RAM}GB"    else        TOTAL_RAM=0        print_warning "无法检测内存大小"    fi    # 检测显卡    if check_command nvidia-smi; then        GPU_AVAILABLE=true        GPU_INFO=$(nvidia-smi --query-gpu=name,memory.total --format=csv,noheader,nounits | head -1)        GPU_NAME=$(echo $GPU_INFO | cut -d',' -f1)        GPU_MEM=$(echo $GPU_INFO | cut -d',' -f2)        print_success "检测到NVIDIA显卡: $GPU_NAME (显存: ${GPU_MEM}MB)"        log "显卡: $GPU_NAME, 显存: ${GPU_MEM}MB"    elif check_command glxinfo; then        GPU_INFO=$(glxinfo | grep "OpenGL renderer" | cut -d':' -f2)        print_info "检测到显卡: $GPU_INFO (可能不支持GPU加速)"    else        print_info "未检测到NVIDIA显卡,将使用CPU运行"    fi    # 检测磁盘空间    DISK_AVAIL=$(df -BG $HOME | awk 'NR==2 {print $4}' | sed 's/G//')    print_success "可用磁盘空间: ${DISK_AVAIL}GB"    log "磁盘空间: ${DISK_AVAIL}GB"    if [ $DISK_AVAIL -lt 20 ]; then        print_warning "磁盘空间不足20GB,可能影响模型下载"    fi    wait_for_user}# ==================== 安装系统依赖 ====================install_system_deps() {    print_step "1" "安装系统依赖"    print_info "检测到系统: $OS_TYPE"    case $OS_TYPE in        ubuntu|debian|linuxmint)            print_info "使用 apt 包管理器"            sudo apt update            sudo apt install -y curl git build-essential python3 python3-pip            ;;        centos|rhel|fedora)            print_info "使用 yum/dnf 包管理器"            if [ "$OS_TYPE" == "fedora" ]; then                sudo dnf update -y                sudo dnf install -y curl git gcc-c++ make python3 python3-pip            else                sudo yum update -y                sudo yum install -y curl git gcc-c++ make python3 python3-pip epel-release            fi            ;;        arch|manjaro)            print_info "使用 pacman 包管理器"            sudo pacman -Syu --noconfirm            sudo pacman -S --noconfirm curl git base-devel python python-pip            ;;        *)            print_warning "未知的Linux发行版,尝试安装基础工具"            sudo apt update 2>/dev/null || sudo yum update 2>/dev/null || true            sudo apt install -y curl git build-essential 2>/dev/null || \            sudo yum install -y curl git gcc-c++ make 2>/dev/null || true            ;;    esac    check_error "系统依赖安装失败"    print_success "系统依赖安装完成"    log "系统依赖安装完成"    wait_for_user}# ==================== 安装 Node.js ====================install_node() {    print_step "2" "安装 Node.js 环境"    if check_command node; then        NODE_VERSION=$(node --version)        print_success "Node.js 已安装: $NODE_VERSION"        log "Node.js已安装: $NODE_VERSION"    else        print_info "正在安装 Node.js 22..."        case $OS_TYPE in            ubuntu|debian)                curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -                sudo apt install -y nodejs                ;;            centos|rhel|fedora)                curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -                sudo dnf install -y nodejs || sudo yum install -y nodejs                ;;            arch)                sudo pacman -S --noconfirm nodejs npm                ;;            *)                # 使用nvm安装                print_info "使用 nvm 安装 Node.js"                curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash                export NVM_DIR="$HOME/.nvm"                [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"                nvm install --lts                nvm use --lts                ;;        esac        check_error "Node.js安装失败"        print_success "Node.js 安装完成"        log "Node.js安装完成"    fi    # 验证安装    node --version    npm --version    print_success "Node.js 环境就绪"    wait_for_user}# ==================== 安装 Ollama ====================install_ollama() {    print_step "3" "安装 Ollama"    if check_command ollama; then        OLLAMA_VERSION=$(ollama --version 2>/dev/null || echo "已安装")        print_success "Ollama 已安装: $OLLAMA_VERSION"        log "Ollama已安装"    else        print_info "正在安装 Ollama..."        # 使用官方安装脚本        curl -fsSL https://ollama.com/install.sh | sh        check_error "Ollama安装失败"        print_success "Ollama 安装完成"        log "Ollama安装完成"    fi    # 启动Ollama服务    print_info "启动 Ollama 服务..."    if check_command systemctl; then        sudo systemctl enable ollama        sudo systemctl start ollama        print_info "Ollama 已配置为系统服务"    else        # 后台启动        ollama serve > /dev/null 2>&1 &        OLLAMA_PID=$!        print_info "Ollama 服务已启动 (PID: $OLLAMA_PID)"    fi    # 等待服务就绪    print_info "等待 Ollama 服务就绪..."    for i in {1..30}; do        if curl -s http://localhost:11434/api/tags > /dev/null 2>&1; then            print_success "Ollama 服务就绪"            break        fi        sleep 2        echo -n "."    done    echo ""    wait_for_user}# ==================== 选择并下载模型 ====================select_model() {    print_step "4" "选择 Qwen 模型"    # 根据内存给出推荐    if [ $TOTAL_RAM -lt 8 ]; then        RECOMMENDED="1"    elif [ $TOTAL_RAM -lt 16 ]; then        RECOMMENDED="2"    elif [ $TOTAL_RAM -lt 32 ]; then        RECOMMENDED="3"    else        RECOMMENDED="4"    fi    echo -e "${CYAN}请选择要下载的模型:${NC}"    echo "  1) qwen2.5:0.5b  (极轻量,适合低配置,约0.5GB)"    echo "  2) qwen2.5:4b    (适合8GB内存,约2.5GB)"    echo "  3) qwen2.5:7b    (推荐,16GB内存,约4.0GB) ${YELLOW}← 推荐${NC}"    echo "  4) qwen2.5:14b   (适合32GB+内存,约8.0GB)"    echo "  5) qwen3.5:7b    (最新模型,约4.5GB)"    echo "  6) qwen3.5:35b   (需要64GB+内存,约20GB)"    echo ""    echo -e "${GREEN}根据您的内存(${TOTAL_RAM}GB),推荐选择选项 $RECOMMENDED${NC}"    echo ""    read -p "请输入数字 (1-6,默认: $RECOMMENDED): " model_choice    case $model_choice in        1) SELECTED_MODEL="qwen2.5:0.5b" ;;        2) SELECTED_MODEL="qwen2.5:4b" ;;        3) SELECTED_MODEL="qwen2.5:7b" ;;        4) SELECTED_MODEL="qwen2.5:14b" ;;        5) SELECTED_MODEL="qwen3.5:7b" ;;        6) SELECTED_MODEL="qwen3.5:35b" ;;        *) SELECTED_MODEL="qwen2.5:7b" ;;    esac    CUSTOM_MODEL_NAME="${SELECTED_MODEL//:/-}-claw"    print_info "已选择模型: $SELECTED_MODEL"    log "选择模型: $SELECTED_MODEL"    wait_for_user}download_model() {    print_step "5" "下载 Qwen 模型"    print_info "正在下载模型: $SELECTED_MODEL"    print_warning "提示:下载时间取决于网络速度,请耐心等待"    print_info "模型大小参考:"    case $SELECTED_MODEL in        qwen2.5:0.5b) echo "  - 约 0.5GB" ;;        qwen2.5:4b) echo "  - 约 2.5GB" ;;        qwen2.5:7b) echo "  - 约 4.0GB" ;;        qwen2.5:14b) echo "  - 约 8.0GB" ;;        qwen3.5:7b) echo "  - 约 4.5GB" ;;        qwen3.5:35b) echo "  - 约 20GB" ;;    esac    echo ""    # 下载模型    ollama pull $SELECTED_MODEL    check_error "模型下载失败"    print_success "模型下载完成: $SELECTED_MODEL"    log "模型下载完成: $SELECTED_MODEL"    wait_for_user}create_custom_model() {    print_step "6" "创建长上下文模型"    print_info "正在创建自定义模型: $CUSTOM_MODEL_NAME"    # 创建Modelfile    cat > ~/Modelfile << EOFFROM $SELECTED_MODELPARAMETER num_ctx 32768PARAMETER temperature 0.7PARAMETER top_p 0.9EOF    # 创建模型    ollama create $CUSTOM_MODEL_NAME -f ~/Modelfile    check_error "自定义模型创建失败"    print_success "自定义模型创建成功: $CUSTOM_MODEL_NAME"    log "自定义模型创建成功: $CUSTOM_MODEL_NAME"    # 清理临时文件    rm ~/Modelfile    wait_for_user}# ==================== 安装 OpenClaw ====================install_openclaw() {    print_step "7" "安装 OpenClaw"    print_info "正在安装 OpenClaw..."    # 使用官方安装脚本    if curl -fsSL https://openclaw.ai/install.sh | bash; then        print_success "OpenClaw 安装完成"        log "OpenClaw安装完成"    else        print_warning "官方脚本安装失败,尝试通过npm安装..."        npm install -g openclaw@latest        check_error "npm安装OpenClaw失败"        print_success "OpenClaw npm安装完成"        log "OpenClaw npm安装完成"    fi    # 验证安装    if check_command openclaw; then        OPENCLAW_VERSION=$(openclaw --version 2>&1 | head -1)        print_success "OpenClaw 版本: $OPENCLAW_VERSION"    else        print_error "OpenClaw 安装验证失败"        exit 1    fi    wait_for_user}# ==================== 配置 OpenClaw ====================configure_openclaw() {    print_step "8" "配置 OpenClaw"    print_info "正在生成配置文件..."    # 创建配置目录    mkdir -p ~/.openclaw    # 生成随机令牌    if check_command uuidgen; then        OPENCLAW_TOKEN=$(uuidgen | tr -d '-')    else        OPENCLAW_TOKEN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)    fi    # 创建配置文件    cat > ~/.openclaw/config.json << EOF{    "provider": "openai-compatible",    "baseUrl": "http://localhost:11434/v1",    "apiKey": "ollama-local-$(openssl rand -hex 8 2>/dev/null || date +%s%N)",    "model": "$CUSTOM_MODEL_NAME",    "token": "$OPENCLAW_TOKEN",    "daemon": true,    "contextWindow": 32768,    "port": 18789,    "skills": []}EOF    print_success "配置文件创建成功"    log "配置文件创建成功"    wait_for_user}# ==================== 安装技能 ====================install_skills() {    print_step "9" "安装常用技能"    SKILLS=(        "@openclaw/agent-browser"        "@openclaw/agent-fs"        "@openclaw/agent-exec"    )    print_info "正在安装基础技能..."    for skill in "${SKILLS[@]}"do        print_info "安装技能: $skill"        if openclaw plugins install "$skill" > /dev/null 2>&1; then            print_success "✓ $skill 安装完成"            log "技能安装完成: $skill"        else            print_warning "✗ $skill 安装失败 (可以稍后手动安装)"            log "技能安装失败: $skill"        fi    done    wait_for_user}# ==================== 配置进程管理 ====================configure_service() {    print_step "10" "配置进程管理"    echo -e "${CYAN}请选择进程管理方式:${NC}"    echo "  1) Systemd (推荐,适用于有systemd的发行版)"    echo "  2) PM2 (Node.js进程管理)"    echo "  3) 后台进程 (简单,重启后需手动启动)"    echo ""    read -p "请输入数字 (1-3,默认: 1): " service_choice    case $service_choice in        1)            if check_command systemctl; then                USE_SYSTEMD=true                configure_systemd            else                print_warning "系统不支持systemd,使用PM2替代"                configure_pm2            fi            ;;        2)            USE_PM2=true            configure_pm2            ;;        *)            print_info "使用后台进程模式"            ;;    esac    wait_for_user}configure_systemd() {    print_info "配置 Systemd 服务..."    cat > /tmp/openclaw.service << EOF[Unit]Description=OpenClaw AI Agent ServiceAfter=network.target ollama.serviceWants=ollama.service[Service]Type=simpleUser=$USERExecStart=$(which openclaw) gateway startRestart=alwaysRestartSec=10Environment=NODE_ENV=productionStandardOutput=journalStandardError=journal[Install]WantedBy=multi-user.targetEOF    sudo mv /tmp/openclaw.service /etc/systemd/system/    sudo systemctl daemon-reload    sudo systemctl enable openclaw    sudo systemctl start openclaw    print_success "Systemd 服务配置完成"    log "Systemd服务配置完成"}configure_pm2() {    print_info "配置 PM2 进程管理..."    if ! check_command pm2; then        npm install -g pm2    fi    pm2 start $(which openclaw) --name "openclaw" -- gateway start    pm2 save    pm2 startup    print_success "PM2 配置完成"    log "PM2配置完成"}# ==================== 启动服务 ====================start_service() {    print_step "11" "启动 OpenClaw 服务"    if [ "$USE_SYSTEMD" = true ]; then        print_info "Systemd服务已启动"    elif [ "$USE_PM2" = true ]; then        pm2 restart openclaw    else        print_info "启动后台进程..."        nohup openclaw gateway start > /tmp/openclaw.log 2>&1 &        sleep 3    fi    # 检查服务状态    if curl -s http://localhost:18789 > /dev/null 2>&1; then        print_success "OpenClaw 服务已启动"    else        print_warning "OpenClaw 服务可能未正常启动,请稍后手动检查"        print_info "查看日志: tail -f /tmp/openclaw.log"    fi    wait_for_user}# ==================== 创建启动脚本 ====================create_launcher() {    print_step "12" "创建启动脚本"    mkdir -p "$INSTALL_DIR"    # 创建启动脚本    cat > "$INSTALL_DIR/start-openclaw.sh" << EOF#!/bin/bashecho "🚀 启动 OpenClaw 服务..."openclaw gateway startecho "📊 打开控制台..."if command -v xdg-open &> /dev/null; then    xdg-open "http://localhost:18789/?token=$OPENCLAW_TOKEN"elif command -v gnome-open &> /dev/null; then    gnome-open "http://localhost:18789/?token=$OPENCLAW_TOKEN"else    echo "请手动访问: http://localhost:18789/?token=$OPENCLAW_TOKEN"fiEOF    chmod +x "$INSTALL_DIR/start-openclaw.sh"    # 创建状态检查脚本    cat > "$INSTALL_DIR/check-status.sh" << EOF#!/bin/bashecho "📊 OpenClaw 状态检查"echo "======================"echo ""echo "OpenClaw 服务状态:"curl -s http://localhost:18789 > /dev/null && echo "✅ 运行中" || echo "❌ 未运行"echo ""echo "Ollama 服务状态:"curl -s http://localhost:11434/api/tags > /dev/null && echo "✅ 运行中" || echo "❌ 未运行"echo ""echo "已安装模型:"ollama list 2>/dev/null || echo "无法获取模型列表"EOF    chmod +x "$INSTALL_DIR/check-status.sh"    print_success "启动脚本已创建: $INSTALL_DIR/start-openclaw.sh"    print_success "状态检查脚本: $INSTALL_DIR/check-status.sh"    # 创建桌面快捷方式(如果存在桌面环境)    if [ -d "$HOME/Desktop" ]; then        cat > "$HOME/Desktop/openclaw.desktop" << EOF[Desktop Entry]Name=OpenClawComment=OpenClaw AI AssistantExec=$INSTALL_DIR/start-openclaw.shIcon=utilities-terminalTerminal=trueType=ApplicationCategories=Utility;EOF        chmod +x "$HOME/Desktop/openclaw.desktop"        print_success "桌面快捷方式已创建"    fi    wait_for_user}# ==================== 显示完成信息 ====================show_completion() {    print_step "完成" "🎉 所有安装步骤已完成!"    echo -e "${GREEN}${BOLD}"    echo '╔════════════════════════════════════════════════════════════╗'    echo '║                    部署成功!                              ║'    echo '╚════════════════════════════════════════════════════════════╝'    echo -e "${NC}"    echo ""    # 获取本机IP    LOCAL_IP=$(hostname -I | awk '{print $1}')    echo -e "${CYAN}${BOLD}【访问信息】${NC}"    echo "  • 本地访问: http://localhost:18789/?token=$OPENCLAW_TOKEN"    echo "  • 远程访问: http://$LOCAL_IP:18789/?token=$OPENCLAW_TOKEN"    echo "  • 访问令牌: $OPENCLAW_TOKEN"    echo ""    echo -e "${CYAN}${BOLD}【已安装模型】${NC}"    ollama list    echo ""    echo -e "${CYAN}${BOLD}【常用命令】${NC}"    echo "  • 启动脚本: $INSTALL_DIR/start-openclaw.sh"    echo "  • 状态检查: $INSTALL_DIR/check-status.sh"    echo "  • 查看状态: openclaw gateway status"    echo "  • 查看日志: openclaw logs follow"    echo "  • 打开控制台: openclaw dashboard"    echo ""    if [ "$USE_SYSTEMD" = true ]; then        echo -e "${CYAN}${BOLD}【Systemd 命令】${NC}"        echo "  • 启动: sudo systemctl start openclaw"        echo "  • 停止: sudo systemctl stop openclaw"        echo "  • 状态: sudo systemctl status openclaw"        echo "  • 日志: sudo journalctl -u openclaw -f"        echo ""    fi    if [ "$USE_PM2" = true ]; then        echo -e "${CYAN}${BOLD}【PM2 命令】${NC}"        echo "  • 列表: pm2 list"        echo "  • 日志: pm2 logs openclaw"        echo "  • 监控: pm2 monit"        echo ""    fi    echo -e "${CYAN}${BOLD}【技能管理】${NC}"    echo "  • 查看已安装技能: openclaw plugins list"    echo "  • 安装新技能: openclaw plugins install <技能名>"    echo "  • 搜索技能: openclaw plugins search"    echo ""    echo -e "${YELLOW}${BOLD}【重要提示】${NC}"    echo "  1. 请保存好上面的访问令牌,登录时需要"    echo "  2. 首次使用可能需要等待模型加载 (约30秒)"    echo "  3. Ollama 服务会一直在后台运行"    echo "  4. 日志文件: /tmp/openclaw.log"    echo "  5. 安装日志: $INSTALL_LOG"    echo "  6. 如需远程访问,请配置防火墙放行18789端口"    echo ""    # 测试连接    echo -e "${CYAN}${BOLD}【连接测试】${NC}"    if curl -s http://localhost:18789 > /dev/null; then        print_success "✓ OpenClaw 服务正常"    else        print_warning "✗ OpenClaw 服务未响应"    fi    if curl -s http://localhost:11434/api/tags > /dev/null; then        print_success "✓ Ollama 服务正常"    else        print_warning "✗ Ollama 服务未响应"    fi    echo ""    echo -e "${CYAN}是否现在打开控制台?(y/n)${NC} "    read -r open_now    if [[ "$open_now" =~ ^[Yy]$ ]]; then        if command -v xdg-open &> /dev/null; then            xdg-open "http://localhost:18789/?token=$OPENCLAW_TOKEN"        else            echo "请手动访问: http://localhost:18789/?token=$OPENCLAW_TOKEN"        fi    fi    echo ""    print_success "安装完成!感谢使用!"}# ==================== 防火墙配置提示 ====================firewall_tip() {    if command -v ufw &> /dev/null; then        print_info "检测到 UFW 防火墙,如需远程访问请运行:"        echo "  sudo ufw allow 18789/tcp"    elif command -v firewall-cmd &> /dev/null; then        print_info "检测到 firewalld,如需远程访问请运行:"        echo "  sudo firewall-cmd --permanent --add-port=18789/tcp"        echo "  sudo firewall-cmd --reload"    elif command -v iptables &> /dev/null; then        print_info "检测到 iptables,如需远程访问请运行:"        echo "  sudo iptables -A INPUT -p tcp --dport 18789 -j ACCEPT"    fi    echo ""}# ==================== 主函数 ====================main() {    print_banner    # 记录开始时间    START_TIME=$(date +%s)    log "=== OpenClaw Linux 安装开始 ==="    # 执行各步骤    detect_system    install_system_deps    install_node    install_ollama    select_model    download_model    create_custom_model    install_openclaw    configure_openclaw    install_skills    configure_service    start_service    create_launcher    firewall_tip    show_completion    # 计算总耗时    END_TIME=$(date +%s)    DURATION=$((END_TIME - START_TIME))    MINUTES=$((DURATION / 60))    SECONDS=$((DURATION % 60))    log "=== OpenClaw 安装完成 ==="    log "总耗时: ${MINUTES}${SECONDS}秒"    echo ""    print_success "总耗时: ${MINUTES}${SECONDS}秒"}# ==================== 清理函数 ====================cleanup() {    print_warning "安装被中断,正在清理..."    log "安装被中断"    exit 1}# 捕获中断信号trap cleanup INT TERM# 检查是否为root用户if [ "$EUID" -eq 0 ]; then     print_warning "不建议以root用户运行此脚本"    print_warning "建议使用普通用户安装,需要sudo时会提示输入密码"    read -p "是否继续?(y/n) " -r    if [[ ! $REPLY =~ ^[Yy]$ ]]; then        exit 1    fifi# 运行主函数main# 退出前等待echo ""print_info "按回车键退出..."read -r

📦 使用方法

方法一:直接下载运行(推荐)

# 1. 下载脚本wget -O install-openclaw-qwen-linux.sh https://raw.githubusercontent.com/your-repo/install-openclaw-qwen-linux.sh# 或使用 curlcurl -O https://raw.githubusercontent.com/your-repo/install-openclaw-qwen-linux.sh# 2. 添加执行权限chmod +x install-openclaw-qwen-linux.sh# 3. 运行脚本./install-openclaw-qwen-linux.sh

方法二:一行命令直接运行

# 使用 curlbash <(curl -fsSL https://raw.githubusercontent.com/your-repo/install-openclaw-qwen-linux.sh)# 或使用 wgetbash <(wget -qO- https://raw.githubusercontent.com/your-repo/install-openclaw-qwen-linux.sh)

方法三:本地保存并运行

# 将脚本内容保存到文件cat > install-openclaw-qwen-linux.sh << 'EOF'# 将上面的完整脚本内容粘贴到这里EOF# 运行chmod +x install-openclaw-qwen-linux.sh && ./install-openclaw-qwen-linux.sh

🎯 脚本特性

全自动化:无需人工干预,自动完成所有步骤

多发行版支持:兼容Ubuntu、Debian、CentOS、Fedora、Arch等主流Linux发行版

智能检测:自动检测系统类型、内存大小和显卡配置

模型选择:根据检测到的内存容量自动推荐合适的模型

长上下文:自动创建32768上下文长度的模型,支持更长的对话处理

进程管理:支持Systemd、PM2、后台进程三种管理模式,灵活适应不同场景

防火墙配置:自动检测防火墙状态并给出相应提示

技能安装:自动安装常用技能,开箱即用

彩色输出:采用清晰的彩色日志显示,方便阅读和调试

容错处理:遇到错误时会询问是否继续,避免意外中断

启动脚本:自动生成启动和状态检查脚本,便于日常管理

桌面快捷方式:如果系统有图形界面,会自动创建桌面快捷方式,使用更便捷

🚀 高级用法

1. 静默安装(自动确认)

# 使用 yes 命令自动确认yes | ./install-openclaw-qwen-linux.sh

2. 指定模型安装

# 通过环境变量指定模型export OPENCLAW_MODEL="qwen2.5:14b"./install-openclaw-qwen-linux.sh

3. 指定安装目录

# 自定义安装目录export OPENCLAW_INSTALL_DIR="/opt/openclaw"./install-openclaw-qwen-linux.sh

4. 跳过某些步骤

# 示例:跳过模型下载(如果已下载)# 修改脚本,注释掉相应步骤

🔧 运维命令

查看日志

# 安装日志tail -f /tmp/openclaw-install-*.log# OpenClaw运行日志tail -f /tmp/openclaw.log# Systemd日志sudo journalctl -u openclaw -f# PM2日志pm2 logs openclaw

服务管理

# Systemdsudo systemctl restart openclawsudo systemctl stop openclawsudo systemctl status opencl

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-27 11:21:30 HTTP/2.0 GET : https://f.mffb.com.cn/a/479482.html
  2. 运行时间 : 0.096274s [ 吞吐率:10.39req/s ] 内存消耗:4,893.06kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=f3f84c2ea50a25ae373112b275e53d1c
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000629s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000779s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000342s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000301s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000563s ]
  6. SELECT * FROM `set` [ RunTime:0.000253s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000632s ]
  8. SELECT * FROM `article` WHERE `id` = 479482 LIMIT 1 [ RunTime:0.000607s ]
  9. UPDATE `article` SET `lasttime` = 1774581690 WHERE `id` = 479482 [ RunTime:0.003853s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.003499s ]
  11. SELECT * FROM `article` WHERE `id` < 479482 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000657s ]
  12. SELECT * FROM `article` WHERE `id` > 479482 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000729s ]
  13. SELECT * FROM `article` WHERE `id` < 479482 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.003520s ]
  14. SELECT * FROM `article` WHERE `id` < 479482 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.008046s ]
  15. SELECT * FROM `article` WHERE `id` < 479482 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001979s ]
0.097918s