当前位置:首页>Linux>Linux DNS + Keepalived 高可用部署手册

Linux DNS + Keepalived 高可用部署手册

  • 2026-04-21 07:32:52
Linux DNS + Keepalived 高可用部署手册

项目中使用的服务与技术分享

一、技术原理

1.1 DNS 服务原理

┌─────────────────────────────────────────────────────────────────┐│                      DNS 解析流程                                 │├─────────────────────────────────────────────────────────────────┤│   客户端                    DNS 服务器                   目标      ││     │                         │                          │      ││     │  ① A 记录查询?          │                          │      ││     │────────────────────────>│                          │      ││     │                         │  ② 查询本地 Zone 文件     │      ││     │                         │──────────┐               │      ││     │                         │<─────────┘               │      ││     │  ③ 返回 IP 地址          │                          │      ││     │<────────────────────────│                          │      ││     │  ④ 发起连接              │                          │      ││     │───────────────────────────────────────────────────>│      │└─────────────────────────────────────────────────────────────────┘
DNS 核心概念:
术语说明示例
Zone (区域)DNS 命名空间的连续部分example.com
Record (记录)域名与 IP 的映射关系A、CNAME、MX
Primary (主)主 DNS 服务器,可写ns1.example.com
Secondary (从)从 DNS 服务器,只读同步ns2.example.com
TTL记录缓存时间300 秒

1.2 Keepalived 原理

┌─────────────────────────────────────────────────────────────────┐│                  Keepalived VRRP 工作原理                        │├─────────────────────────────────────────────────────────────────┤│                        虚拟 IP (VIP)                             ││                      192.168.1.100                              ││                           ▲                                     ││              ┌────────────┴────────────┐                        ││              ▼                         ▼                        ││     ┌─────────────────┐       ┌─────────────────┐               ││     │    Master 节点   │       │    Backup 节点   │              ││     │   192.168.1.10  │       │   192.168.1.11  │               ││     │   Priority: 100 │       │   Priority: 90  │               ││     │  ★ 持有 VIP     │        │  ○ 监听 VRRP    │              ││     │  ● 发送通告       │──────>│  ● 接收通告      │              ││     │    (1 秒/次)     │       │                 │               ││     └─────────────────┘       └─────────────────┘               ││                                                                 ││  【故障切换流程】                                                 ││  Master 故障 → Backup 未收到通告 (3 秒) → 接管 VIP → 切换完成      ││                                                                 ││  ★ 总切换时间:3-5 秒 (满足秒级切换要求)                           │└─────────────────────────────────────────────────────────────────┘
VRRP 协议要点:
参数说明默认值
Priority节点优先级,高者为主100
Advert_IntervalVRRP 通告间隔1 秒
Master_Down_Interval判定 Master 下线时间3×Advert_Interval



1.3 健康检查机制

┌─────────────────────────────────────────────────────────────────┐│              Keepalived 健康检查流程                              │├─────────────────────────────────────────────────────────────────┤│   Keepalived 进程                                                ││         │                                                       ││         ▼                                                       ││   ┌─────────────────┐                                           ││   │  vrrp_script    │                                           ││   │  check_dns.sh   │                                           ││   └────────┬────────┘                                           ││            │                                                    ││            ▼                                                    ││   ┌─────────────────┐                                           ││   │  检查 DNS 服务     │  dig @localhost                         ││   └────────┬────────┘                                           ││            │                                                    ││     ┌──────┴──────┐                                             ││     ▼             ▼                                             ││  成功 ✓        失败 ✗                                           ││     │             │                                             ││     │             ▼                                             ││     │        ┌─────────────────┐                                ││     │        │  priority -20   │  降低优先级                     ││     │        └────────┬────────┘                                ││     │                 ▼                                         ││     │          ┌─────────────────┐                              ││     │          │  Backup 接管 VIP │                             ││     │          └─────────────────┘                              ││     ▼                                                           ││  保持 Master 状态                                                │└─────────────────────────────────────────────────────────────────┘



二、架构设计

2.1 高可用架构拓扑

┌────────────────────────────────────────────────────────────────┐│                    DNS 高可用架构                               │├────────────────────────────────────────────────────────────────┤│                         客户端请求                              ││                             │                                  ││                             ▼                                  ││                    ┌─────────────────┐                         ││                    │   虚拟 IP (VIP)  │                        ││                    │  10.0.1.100     │                         ││                    │    :53/UDP      │                         ││                    └────────┬────────┘                         ││                             │                                  ││              ┌──────────────┴──────────────┐                   ││              ▼                             ▼                   ││     ┌───────────────────┐         ┌───────────────────┐        ││     │   Master 节点      │         │   Backup 节点      │       ││     │  10.0.1.10        │         │  10.0.1.11        │        ││     │  Priority: 100    │         │  Priority: 90     │        ││     │  ┌─────────────┐  │         │  ┌─────────────┐  │        ││     │  │  BIND/named │  │         │  │  BIND/named │  │        ││     │  │   (Active)  │  │         │  │   (Standby) │  │        ││     │  └─────────────┘  │         │  └─────────────┘  │        ││     │  ┌─────────────┐  │         │  ┌─────────────┐  │        ││     │  │ Keepalived  │  │<───────>│  │ Keepalived  │  │        ││     │  │             │  │  VRRP   │  │             │  │        ││     │  └─────────────┘  │         │  └─────────────┘  │        ││     │  ┌─────────────┐  │         │  ┌─────────────┐  │        ││     │  │ 健康检查脚本 │  │         │  │ 健康检查脚本  │  │        ││     │  └─────────────┘  │         │  └─────────────┘  │        ││     └───────────────────┘         └───────────────────┘        ││              │                             │                   ││              └──────────────┬──────────────┘                   ││                             │                                  ││                             ▼                                  ││                    ┌─────────────────┐                         ││                    │   Zone 同步      │                        ││                    │  (AXFR/RSYNC)   │                         ││                    └─────────────────┘                         │└────────────────────────────────────────────────────────────────┘

2.2 网络规划

角色主机名管理 IPVIP优先级
Masterdns-master10.0.1.1010.0.1.100100
Backupdns-backup10.0.1.1110.0.1.10090

三、环境准备

3.1 系统要求

项目要求
操作系统CentOS 7+/Rocky 8+/Ubuntu 20.04+
内存≥2GB
磁盘≥20GB
网络双机同一网段,二层可达
防火墙开放 53(UDP/TCP), 112(VRRP)

3.2 主机配置

# 在两台主机上分别执行# 1. 配置主机名# Master 节点hostnamectl set-hostname dns-master# Backup 节点hostnamectl set-hostname dns-backup# 2. 配置 hosts 解析cat >> /etc/hosts << 'EOF'10.0.1.10   dns-master10.0.1.11   dns-backup10.0.1.100  dns-vipEOF# 3. 关闭防火墙(或配置规则)systemctl stop firewalldsystemctl disable firewalld# 或开放必要端口firewall-cmd --permanent --add-service=dnsfirewall-cmd --permanent --add-service=vrrpfirewall-cmd --reload# 4. 关闭 SELinuxsetenforce 0sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config# 5. 配置 NTP 时间同步yum install -y chronysystemctl enable --now chronyd

3.3 内核参数优化

cat >> /etc/sysctl.conf << 'EOF'# 允许 IP 转发net.ipv4.ip_forward = 1# 允许非本地地址绑定(Keepalived VIP 需要)net.ipv4.ip_nonlocal_bind = 1# 增加 ARP 缓存net.ipv4.neigh.default.gc_thresh1 = 1024net.ipv4.neigh.default.gc_thresh2 = 2048net.ipv4.neigh.default.gc_thresh3 = 4096EOFsysctl -p



四、DNS 服务部署

4.1 安装 BIND

# 在两台主机上执行# CentOS/RHELyum install -y bind bind-utils bind-libs# Ubuntu/Debianapt-get install -y bind9 bind9utils bind9-doc# 验证安装named -v

4.2 主节点配置

# Master 节点配置cat > /etc/named.conf << 'EOF'options {    listen-on port 53 { any; };    listen-on-v6 port 53 { any; };    directory       "/var/named";    allow-query     { any; };    recursion       yes;    dnssec-validation auto;    forwarders {        114.114.114.114;        8.8.8.8;    };    logging {        channel default_log {            file "/var/log/named/named.log" versions 5 size 10M;            severity info;            print-time yes;            print-severity yes;            print-category yes;        };        category default { default_log; };    };};// 主区域声明zone "example.com" IN {    type master;    file "example.com.zone";    allow-transfer { 10.0.1.11; };    also-notify { 10.0.1.11; };};zone "." IN {    type hint;    file "named.ca";};include "/etc/named.rfc1912.zones";include "/etc/named.root.key";EOF

4.3 从节点配置

# Backup 节点配置cat > /etc/named.conf << 'EOF'options {    listen-on port 53 { any; };    listen-on-v6 port 53 { any; };    directory       "/var/named";    allow-query     { any; };    recursion       yes;    dnssec-validation auto;    forwarders {        114.114.114.114;        8.8.8.8;    };    logging {        channel default_log {            file "/var/log/named/named.log" versions 5 size 10M;            severity info;            print-time yes;        };        category default { default_log; };    };};// 从区域声明zone "example.com" IN {    type slave;    file "slaves/example.com.zone";    masters { 10.0.1.10; };};zone "." IN {    type hint;    file "named.ca";};include "/etc/named.rfc1912.zones";include "/etc/named.root.key";EOF

4.4 区域数据文件

# Master 节点 - 正向解析区域cat > /var/named/example.com.zone << 'EOF'$TTL 300@       IN      SOA     ns1.example.com. admin.example.com. (                        2024032301      ; Serial                        3600            ; Refresh                        1800            ; Retry                        604800          ; Expire                        300 )           ; Minimum TTL@       IN      NS      ns1.example.com.@       IN      NS      ns2.example.com.@       IN      MX  10  mail.example.com.ns1     IN      A       10.0.1.10ns2     IN      A       10.0.1.11dns-vip IN      A       10.0.1.100www     IN      A       10.0.1.20mail    IN      A       10.0.1.30api     IN      A       10.0.1.40web     IN      CNAME   www.example.com.ftp     IN      CNAME   www.example.com.EOF

4.5 权限与启动

# 在两台主机上执行# 设置文件权限chown -R named:named /var/namedchmod 640 /var/named/*.zone# 创建日志目录mkdir -p /var/log/namedchown named:named /var/log/named# 验证配置named-checkconfnamed-checkzone example.com /var/named/example.com.zone# 启动服务systemctl enable --now namedsystemctl status named

4.6 DNS 服务测试

# 本地测试dig @localhost example.comdig @localhost www.example.com# 从节点测试区域同步dig @10.0.1.11 example.com# 检查区域传输dig @10.0.1.10 example.com AXFR



五、Keepalived 部署

5.1 安装 Keepalived

# 在两台主机上执行# CentOS/RHELyum install -y keepalived# Ubuntu/Debianapt-get install -y keepalived# 验证安装keepalived -v

5.2 Master 节点配置

cat > /etc/keepalived/keepalived.conf << 'EOF'Configuration File for keepalivedglobal_defs {    notification_email {        admin@example.com    }    notification_email_from {        keepalived@example.com    }    smtp_server 127.0.0.1    smtp_connect_timeout 30    router_id DNS_MASTER    vrrp_mcast_group4 224.0.0.18}vrrp_script check_dns {    script "/etc/keepalived/check_dns.sh"    interval 2    weight -20    fall 3    rise 2}vrrp_instance VI_DNS {    state MASTER    interface eth0    virtual_router_id 51    priority 100    advert_int 1    authentication {        auth_type PASS        auth_pass DNS_HA_2024    }    virtual_ipaddress {        10.0.1.100/24 dev eth0 label eth0:vip    }    track_script {        check_dns    }    notify_master "/etc/keepalived/notify.sh master"    notify_backup "/etc/keepalived/notify.sh backup"    notify_fault "/etc/keepalived/notify.sh fault"    notify_stop "/etc/keepalived/notify.sh stop"}EOF

5.3 Backup 节点配置

cat > /etc/keepalived/keepalived.conf << 'EOF'Configuration File for keepalivedglobal_defs {    notification_email {        admin@example.com    }    notification_email_from {        keepalived@example.com    }    smtp_server 127.0.0.1    smtp_connect_timeout 30    router_id DNS_BACKUP    vrrp_mcast_group4 224.0.0.18}vrrp_script check_dns {    script "/etc/keepalived/check_dns.sh"    interval 2    weight -20    fall 3    rise 2}vrrp_instance VI_DNS {    state BACKUP    interface eth0    virtual_router_id 51    priority 90    advert_int 1    authentication {        auth_type PASS        auth_pass DNS_HA_2024    }    virtual_ipaddress {        10.0.1.100/24 dev eth0 label eth0:vip    }    track_script {        check_dns    }    notify_master "/etc/keepalived/notify.sh master"    notify_backup "/etc/keepalived/notify.sh backup"    notify_fault "/etc/keepalived/notify.sh fault"    notify_stop "/etc/keepalived/notify.sh stop"}EOF

5.4 健康检查脚本

cat > /etc/keepalived/check_dns.sh << 'EOF'#!/bin/bashLOG_FILE="/var/log/keepalived/check_dns.log"DNS_VIP="10.0.1.100"TEST_DOMAIN="www.example.com"log() {    echo "[$(date '+%Y-%m-%d%H:%M:%S')] $1" >> $LOG_FILE}# 检查 named 进程是否存在if ! pgrep -x "named" > /dev/null; then    log "ERROR: named 进程未运行"    exit 1fi# 检查 DNS 端口是否监听if ! netstat -tuln | grep -q ":53 "; then    log "ERROR: DNS 端口 53 未监听"    exit 1fi# 执行 DNS 查询测试RESULT=$(dig @127.0.0.1 ${TEST_DOMAIN} +short +time=2 2>/dev/null)if [ "$RESULT" == "10.0.1.20" ]; then    log "OK: DNS 解析正常"    exit 0else    log "ERROR: DNS 解析失败"    exit 1fiEOFchmod +x /etc/keepalived/check_dns.shmkdir -p /var/log/keepalived

5.5 状态通知脚本

cat > /etc/keepalived/notify.sh << 'EOF'#!/bin/bashLOG_FILE="/var/log/keepalived/notify.log"WEBHOOK_URL=""  # 钉钉/企业微信 Webhook(可选)log() {    echo "[$(date '+%Y-%m-%d %H:%M:%S')$1" >> $LOG_FILE}send_alert() {    local message="$1"    log "ALERT: $message"    if [ -n "$WEBHOOK_URL" ]; then        curl -s -X POST "$WEBHOOK_URL" \            -H 'Content-Type: application/json' \            -d "{\"msgtype\": \"text\", \"text\": {\"content\": \"DNS HA 切换通知:$message\"}}"    fi}case "$1" in    master)        log "本机已成为 MASTER,持有 VIP"        send_alert "$(hostname) 已成为 DNS MASTER 节点"        ;;    backup)        log "本机已成为 BACKUP,进入待命状态"        send_alert "$(hostname) 已切换为 DNS BACKUP 节点"        ;;    fault)        log "本机进入 FAULT 状态"        send_alert "警告:$(hostname) DNS HA 进入 FAULT 状态"        ;;    stop)        log "Keepalived 已停止"        send_alert "$(hostname) Keepalived 服务已停止"        ;;esacEOFchmod +x /etc/keepalived/notify.sh

5.6 启动 Keepalived

# 在两台主机上执行# 验证配置keepalived --config-test# 启动服务systemctl enable --now keepalivedsystemctl status keepalived# 查看日志journalctl -u keepalived -f




六、故障切换测试

6.1 验证 VIP 状态

# 检查 VIP 绑定(Master 节点)ip addr show eth0 | grep 10.0.1.100# 检查 VRRP 状态ip vrrpcat /tmp/keepalived.data# 查看 Keepalived 状态systemctl status keepalived

6.2 切换测试场景

┌─────────────────────────────────────────────────────────────────┐│                    故障切换测试场景                               │├─────────────────────────────────────────────────────────────────┤│  场景 A: 模拟 Master 主机掉电                                     ││  1. 记录当前 Master 状态                                         ││  2. 直接断电或 shutdown -h now                                   ││  3. 观察 Backup 接管 VIP(3-5 秒)                               ││  4. 验证 DNS 服务正常                                            ││  5. 恢复 Master,观察是否抢占                                     ││                                                                 ││  场景 B: 模拟 DNS 服务故障                                        ││  1. 在 Master 上停止 named 服务                                  ││  2. 健康检查检测到失败                                            ││  3. Priority 降低,Backup 接管                                   ││  4. 恢复 named 服务,观察状态恢复                                  ││                                                                 ││  场景 C: 模拟网络中断                                             ││  1. 在 Master 上禁用网卡                                          ││  2. VRRP 通告中断,Backup 接管                                    ││  3. 恢复网卡,观察状态                                            │└─────────────────────────────────────────────────────────────────┘

6.3 测试脚本

#!/bin/bash# ha_test.sh - DNS 高可用切换测试脚本VIP="10.0.1.100"TEST_DOMAIN="www.example.com"log() {    echo "[$(date '+%H:%M:%S')$1"}check_vip() {    local host=$1    ssh $host "ip addr show eth0 | grep -q '$VIP' && echo 'HAS_VIP' || echo 'NO_VIP'"}check_dns() {    local host=$1    RESULT=$(dig @$host $TEST_DOMAIN +short +time=2 2>/dev/null)    [ "$RESULT" == "10.0.1.20" ] && echo "OK" || echo "FAIL"}log "=========================================="log "DNS 高可用切换测试开始"log "=========================================="# 初始状态检查log "[1] 初始状态检查"MASTER_VIP=$(check_vip 10.0.1.10)BACKUP_VIP=$(check_vip 10.0.1.11)log "  Master VIP 状态:$MASTER_VIP"log "  Backup VIP 状态:$BACKUP_VIP"# DNS 服务测试log "[2] DNS 服务测试"MASTER_DNS=$(check_dns 10.0.1.10)BACKUP_DNS=$(check_dns 10.0.1.11)log "  Master DNS: $MASTER_DNS"log "  Backup DNS: $BACKUP_DNS"log "=========================================="log "测试完成"log "=========================================="



七、监控与告警

7.1 监控指标

指标阈值告警级别
VIP 漂移发生切换WARNING
DNS 响应时间>100msWARNING
DNS 查询失败率>5%CRITICAL
named 进程停止CRITICAL
Keepalived 进程停止CRITICAL

7.2 监控脚本

#!/bin/bash# dns_monitor.sh - DNS 服务监控脚本VIP="10.0.1.100"LOG_FILE="/var/log/dns_monitor.log"WEBHOOK=""check() {    local timestamp=$(date '+%Y-%m-%d %H:%M:%S')    # 检查 VIP    if ! ip addr show eth0 | grep -q "$VIP"then        echo "[$timestamp] CRITICAL: VIP $VIP not found" >> $LOG_FILE        send_alert "CRITICAL: VIP $VIP 不在本机"        return 1    fi    # 检查 DNS 服务    RESULT=$(dig @localhost www.example.com +short +time=2 2>/dev/null)    if [ "$RESULT" != "10.0.1.20" ]; then        echo "[$timestamp] WARNING: DNS resolution failed" >> $LOG_FILE        send_alert "WARNING: DNS 解析失败"        return 1    fi    echo "[$timestamp] OK" >> $LOG_FILE    return 0}send_alert() {    if [ -n "$WEBHOOK" ]; then        curl -s -X POST "$WEBHOOK" \            -H 'Content-Type: application/json' \            -d "{\"msgtype\": \"text\", \"text\": {\"content\": \"$1\"}}"    fi}check

7.3 配置定时任务

# 添加到 crontabcat >> /etc/cron.d/dns_monitor << 'EOF'*/1 * * * * root /usr/local/bin/dns_monitor.shEOF



八、常见问题处理

8.1 Keepalived 问题

问题原因解决方案
VIP 无法绑定ip_nonlocal_bind 未启用设置 net.ipv4.ip_nonlocal_bind=1
VRRP 通告失败防火墙阻止开放 VRRP 协议 (112)
双 Mastervirtual_router_id 冲突检查配置确保唯一
频繁切换健康检查过于敏感调整 fall/rise 参数

8.2 DNS 问题

问题原因解决方案
区域传输失败allow-transfer 未配置添加从服务器 IP
解析超时forwarders 不可达更换 DNS 转发器
缓存污染TTL 设置过长调整 TTL 值
权限拒绝文件权限错误chown named:named

8.3 排查命令速查

# Keepalived 状态systemctl status keepalivedjournalctl -u keepalived -fcat /tmp/keepalived.data# VIP 状态ip addr show eth0ip vrrp# DNS 服务systemctl status nameddig @localhost example.comnamed-checkconfnamed-checkzone example.com /var/named/example.com.zone# 网络连通性ping 10.0.1.11tcpdump -i eth0 -n vrrp




附录:配置备份脚本

#!/bin/bash# backup_config.sh - 配置备份脚本BACKUP_DIR="/backup/dns_ha"DATE=$(date +%Y%m%d_%H%M%S)mkdir -p $BACKUP_DIR# 备份 DNS 配置cp -r /etc/named.conf $BACKUP_DIR/named.conf.$DATEcp -r /var/named/*.zone $BACKUP_DIR/# 备份 Keepalived 配置cp /etc/keepalived/keepalived.conf $BACKUP_DIR/keepalived.conf.$DATEcp /etc/keepalived/*.sh $BACKUP_DIR/# 压缩备份tar -czf $BACKUP_DIR/dns_ha_backup_$DATE.tar.gz -C $BACKUP_DIR .# 保留最近 7 天备份find $BACKUP_DIR -name "*.tar.gz" -mtime +7 -deleteecho "备份完成:$BACKUP_DIR/dns_ha_backup_$DATE.tar.gz"
                                            **个人理解,欢迎评论**

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-21 10:15:26 HTTP/2.0 GET : https://f.mffb.com.cn/a/484391.html
  2. 运行时间 : 0.087628s [ 吞吐率:11.41req/s ] 内存消耗:4,609.83kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=161ccd5e95fb845b4db1a68eeac8ad03
  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.000578s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000854s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000350s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000260s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000524s ]
  6. SELECT * FROM `set` [ RunTime:0.000209s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000575s ]
  8. SELECT * FROM `article` WHERE `id` = 484391 LIMIT 1 [ RunTime:0.000520s ]
  9. UPDATE `article` SET `lasttime` = 1776737726 WHERE `id` = 484391 [ RunTime:0.009546s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000333s ]
  11. SELECT * FROM `article` WHERE `id` < 484391 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000637s ]
  12. SELECT * FROM `article` WHERE `id` > 484391 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000441s ]
  13. SELECT * FROM `article` WHERE `id` < 484391 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001959s ]
  14. SELECT * FROM `article` WHERE `id` < 484391 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000598s ]
  15. SELECT * FROM `article` WHERE `id` < 484391 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001062s ]
0.089292s