当前位置:首页>Linux>别让服务器裸奔!这份Linux安全加固指南请收好

别让服务器裸奔!这份Linux安全加固指南请收好

  • 2026-04-16 20:25:19
别让服务器裸奔!这份Linux安全加固指南请收好

一、安全理念与方法论

1.1 安全原则

原则描述
最小权限原则用户和程序只拥有完成工作所需的最小权限
纵深防御多层安全措施,单一防线被突破时仍有其他保护
默认拒绝一切访问默认拒绝,只开放必要的
安全设计安全是系统设计的一部分,不是事后添加的
持续改进安全是持续的过程,不是一次性的项目

1.2 安全加固流程

规划 → 评估 → 实施 → 测试 → 监控 → 优化
  ↓      ↓      ↓      ↓      ↓      ↓
需求分析 风险评估 配置加固 渗透测试 安全监控 持续改进

二、系统初始化安全

2.1 系统更新与补丁管理

# 更新软件源
apt update && apt upgrade -y

# 仅安装安全更新
apt install unattended-upgrades -y
dpkg-reconfigure -plow unattended-upgrades

# 配置自动安全更新
cat > /etc/apt/apt.conf.d/50unattended-upgrades << 'EOF'
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
};
Unattended-Upgrade::AutoFixInterruptedDpkg "true";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "false";
EOF

2.2 主机名与网络配置

# 设置主机名
hostnamectl set-hostname prod-web-01

# 配置 /etc/hosts
cat > /etc/hosts << 'EOF'
127.0.0.1   localhost
127.0.1.1   prod-web-01
::1         localhost ip6-localhost ip6-loopback
ff02::1     ip6-allnodes
ff02::2     ip6-allrouters
EOF

# 禁用不必要的网络协议
echo 'install dccp /bin/true' >> /etc/modprobe.d/CIS.conf
echo 'install sctp /bin/true' >> /etc/modprobe.d/CIS.conf
echo 'install rds /bin/true' >> /etc/modprobe.d/CIS.conf
echo 'install tipc /bin/true' >> /etc/modprobe.d/CIS.conf

2.3 内核参数调优

# 配置内核安全参数
cat > /etc/sysctl.d/99-security.conf << 'EOF'
# 防止 IP 欺骗
net.ipv4.conf.all.rp_filter =1
net.ipv4.conf.default.rp_filter =1

# 防止 ICMP 重定向
net.ipv4.conf.all.accept_redirects =0
net.ipv4.conf.default.accept_redirects =0
net.ipv4.conf.all.secure_redirects =0
net.ipv4.conf.default.secure_redirects =0

# 禁用 IP 源路由
net.ipv4.conf.all.accept_source_route =0
net.ipv4.conf.default.accept_source_route =0

# 启用 SYN 洪水保护
net.ipv4.tcp_syncookies =1

# 禁用 IPv6(如不需要)
net.ipv6.conf.all.disable_ipv6 =1
net.ipv6.conf.default.disable_ipv6 =1

# 减少缓冲区溢出风险
kernel.randomize_va_space =2

# 限制 core dump
fs.suid_dumpable =0

# 保护 procfs
kernel.kptr_restrict =2
kernel.yama.ptrace_scope =1
EOF

# 应用内核参数
sysctl -p /etc/sysctl.d/99-security.conf

三、用户认证与授权安全

3.1 用户管理

# 创建专用管理员账户
useradd -m-s /bin/bash security_admin
usermod -aGsudo security_admin

# 配置 sudoers
cat > /etc/sudoers.d/security_admin << 'EOF'
security_admin ALL=(ALL) ALL
EOF
chmod0440 /etc/sudoers.d/security_admin

# 禁用 root 账户
passwd -l root

# 检查并删除不必要的账户
awk-F'($3 < 1000) {print $1}' /etc/passwd
# 手动审核系统账户,删除不需要的账户

3.2 密码策略

# 安装密码质量检查模块
apt install libpam-pwquality -y

# 配置密码策略
cat > /etc/pam.d/common-password << 'EOF'
password    requisite    pam_pwquality.so retry=3minlen=14difok=4ucredit=-1lcredit=-1dcredit=-1ocredit=-1maxrepeat=3 reject_username
password    [success=1default=ignore] pam_unix.so obscure use_authtok try_first_pass sha512
password    requisite    pam_deny.so
password    required    pam_permit.so
EOF

# 配置密码过期策略
cat > /etc/login.defs << 'EOF'
PASS_MAX_DAYS 90
PASS_MIN_DAYS 7
PASS_WARN_AGE 14
LOGIN_RETRIES 5
LOGIN_TIMEOUT 60
EOF

# 为现有用户设置密码过期
chage -M90-m7-W14 security_admin

3.3 PAM 安全配置

# 配置账户锁定
cat > /etc/pam.d/common-auth << 'EOF'
auth    required    pam_tally2.so onerr=fail deny=5unlock_time=1800 even_deny_root
auth    [success=1default=ignore] pam_unix.so nullok_secure
auth    requisite    pam_deny.so
auth    required    pam_permit.so
EOF

# 配置会话超时
cat > /etc/profile.d/autologout.sh << 'EOF'
TMOUT=300
readonly TMOUT
export TMOUT
EOF
chmod755 /etc/profile.d/autologout.sh

四、SSH 安全加固(企业级)

4.1 SSH 服务配置

# 备份原始配置
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak.$(date +%Y%m%d)

# 企业级 SSH 配置
cat > /etc/ssh/sshd_config << 'EOF'
# 基础配置
Protocol 2
Port 2222
AddressFamily inet
ListenAddress 0.0.0.0

# 身份认证
PermitRootLogin no
PubkeyAuthentication yes
PasswordAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no

# 用户访问控制
AllowUsers security_admin
AllowGroups sudo

# 会话安全
ClientAliveInterval 300
ClientAliveCountMax 2
LoginGraceTime 60
MaxAuthTries 3
MaxSessions 5

# 转发配置
X11Forwarding no
AllowTcpForwarding no
AllowAgentForwarding no
PermitTunnel no
GatewayPorts no

# 其他安全设置
UseDNS no
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
StrictModes yes
MaxStartups 10:30:60

# 加密算法(现代安全算法)
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com
EOF

# 生成现代 SSH 密钥(Ed25519)
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N""
ssh-keygen -t rsa -b4096-f /etc/ssh/ssh_host_rsa_key -N""

# 设置正确的权限
chmod 600 /etc/ssh/sshd_config
chmod 600 /etc/ssh/ssh_host_*_key
chmod 644 /etc/ssh/ssh_host_*.pub

# 重启 SSH 服务
sshd -t# 测试配置
systemctl restart sshd
systemctl enable sshd

4.2 客户端 SSH 密钥配置

在客户端执行(不在服务器上):

# 生成 Ed25519 密钥对(推荐)
ssh-keygen -t ed25519 -C"security_admin@prod-web-01"-f ~/.ssh/id_ed25519_prod

# 复制公钥到服务器
ssh-copy-id -i ~/.ssh/id_ed25519_prod.pub -p2222 security_admin@server-ip

# 配置 SSH 客户端
cat >> ~/.ssh/config << 'EOF'
Host prod-web-01
    HostName server-ip
    Port 2222
    User security_admin
    IdentityFile ~/.ssh/id_ed25519_prod
    IdentitiesOnly yes
    ServerAliveInterval 60
    ServerAliveCountMax 3
EOF

五、防火墙与网络安全

5.1 UFW 防火墙配置

# 安装 UFW
apt install ufw -y

# 设置默认策略
ufw default deny incoming
ufw default allow outgoing

# 允许必要的服务
ufw allow 2222/tcp comment "SSH"
ufw allow 80/tcp comment "HTTP"
ufw allow 443/tcp comment "HTTPS"

# 限制访问频率(防暴力破解)
ufw limit 2222/tcp comment "SSH with rate limit"

# 启用 UFW
ufw enable
ufw status verbose

# 查看规则
ufw show added

5.2 iptables 高级配置(可选)

对于需要更精细控制的环境:

# 安装 iptables-persistent
apt install iptables-persistent -y

# 企业级 iptables 规则
cat > /etc/iptables/rules.v4 << 'EOF'
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:SSH - [0:0]

# 允许本地回环
-A INPUT -i lo -j ACCEPT
-A OUTPUT -o lo -j ACCEPT

# 允许已建立的连接
-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

# SSH 防护(使用自定义链)
-A INPUT -p tcp --dport2222-m conntrack --ctstate NEW -j SSH
-A SSH -m recent --set--name SSH
-A SSH -m recent --update--seconds60--hitcount4--name SSH -j DROP
-A SSH -j ACCEPT

# 允许 HTTP/HTTPS
-A INPUT -p tcp --dport80-j ACCEPT
-A INPUT -p tcp --dport443-j ACCEPT

# 记录并拒绝其他流量
-A INPUT -m limit --limit5/min -j LOG --log-prefix"iptables denied: "--log-level7
-A INPUT -j DROP

COMMIT
EOF

# 应用规则
netfilter-persistent reload

六、服务与应用安全

6.1 最小化服务

# 查看所有运行的服务
systemctl list-units --type=service--state=running

# 查看所有监听端口
ss -tuln

# 停止并禁用不必要的服务
systemctl stop rpcbind
systemctl disable rpcbind
systemctl stop avahi-daemon
systemctl disable avahi-daemon
systemctl stop cups
systemctl disable cups

6.2 Web 服务器安全(Nginx 示例)

# 安装 Nginx
apt install nginx -y

# 安全配置
cat > /etc/nginx/conf.d/security.conf << 'EOF'
# 隐藏 Nginx 版本
server_tokens off;

# 安全头
add_header X-Frame-Options "DENY" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self';" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;

# 限制请求大小
client_max_body_size 10M;

# 超时设置
client_body_timeout 10s;
client_header_timeout 10s;
keepalive_timeout 55;
send_timeout 10s;
EOF

# 测试并重启 Nginx
nginx -t
systemctl restart nginx
systemctl enable nginx

6.3 数据库安全(MySQL/MariaDB 示例)

# 安装 MariaDB
apt install mariadb-server -y

# 运行安全加固脚本
mysql_secure_installation

# 创建专用数据库用户
mysql -u root -p << 'EOF'
CREATE USER 'app_user'@'localhost' IDENTIFIED BY 'StrongPassword123!';
CREATE DATABASE app_db;
GRANT SELECT, INSERT, UPDATE, DELETE ON app_db.* TO 'app_user'@'localhost';
FLUSH PRIVILEGES;
EOF

# 配置 MySQL 安全
cat > /etc/mysql/mariadb.conf.d/50-server.cnf << 'EOF'
[mysqld]
bind-address =127.0.0.1
skip-name-resolve
max_connections =100
max_connect_errors =5
default_authentication_plugin = mysql_native_password
local-infile =0
symbolic-links =0
secure-file-priv = /var/lib/mysql-files
EOF

# 重启 MySQL
systemctl restart mariadb
systemctl enable mariadb

七、入侵检测与防护

7.1 Fail2Ban 配置

# 安装 Fail2Ban
apt install fail2ban -y

# 复制配置文件
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

# 配置 Fail2Ban
cat > /etc/fail2ban/jail.local << 'EOF'
[DEFAULT]
bantime =3600
findtime =600
maxretry =3
destemail = security@company.com
sender = fail2ban@server-01
action = %(action_mwl)s

[sshd]
enabled =true
port =2222
logpath = %(sshd_log)s
maxretry =3
bantime =86400

[nginx-http-auth]
enabled =true
port = http,https
logpath = %(nginx_error_log)s

[nginx-botsearch]
enabled =true
port = http,https
logpath = %(nginx_access_log)s
maxretry =2
EOF

# 启用并启动 Fail2Ban
systemctl enable fail2ban
systemctl start fail2ban

# 查看状态
fail2ban-client status
fail2ban-client status sshd

7.2 OSSEC 入侵检测(可选)

# 安装依赖
apt install build-essential makegcc-y

# 下载并安装 OSSEC
wget https://github.com/ossec/ossec-hids/archive/3.7.0.tar.gz
tar -xzf3.7.0.tar.gz
cd ossec-hids-3.7.0
./install.sh

八、文件系统安全

8.1 文件权限加固

# 创建权限检查脚本
cat > /usr/local/bin/check_permissions.sh << 'EOF'
#!/bin/bash
echo"检查关键文件权限..."

# 检查 /etc/passwd
if [ "$(stat -c %a /etc/passwd)" !="644" ]; then
echo"警告: /etc/passwd 权限不正确,修复中..."
chmod644 /etc/passwd
fi

# 检查 /etc/shadow
if [ "$(stat -c %a /etc/shadow)" !="600" ]; then
echo"警告: /etc/shadow 权限不正确,修复中..."
chmod600 /etc/shadow
fi

# 检查 /etc/sudoers
if [ "$(stat -c %a /etc/sudoers)" !="440" ]; then
echo"警告: /etc/sudoers 权限不正确,修复中..."
chmod440 /etc/sudoers
fi

echo"权限检查完成"
EOF

chmod+x /usr/local/bin/check_permissions.sh

8.2 查找 SUID/SGID 文件

# 查找 SUID 文件
echo"SUID 文件:"
find / -type f -perm-40002>/dev/null | grep-v'^/proc'

# 查找 SGID 文件
echo"SGID 文件:"
find / -type f -perm-20002>/dev/null | grep-v'^/proc'

8.3 挂载点安全

# 编辑 /etc/fstab
cat > /etc/fstab << 'EOF'
UUID=xxx / ext4 errors=remount-ro 01
UUID=yyy /boot ext4 defaults 02
tmpfs /tmp tmpfs defaults,nodev,nosuid,noexec 00
tmpfs /var/tmp tmpfs defaults,nodev,nosuid,noexec 00
tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 00
EOF

# 重新挂载
mount -o remount /tmp
mount -o remount /var/tmp
mount -o remount /dev/shm

九、日志与审计

9.1 系统日志配置

# 配置 rsyslog
cat > /etc/rsyslog.d/50-security.conf << 'EOF'
# 认证日志
auth,authpriv.* /var/log/auth.log

# 内核日志
kern.* /var/log/kern.log

# 系统日志
*.=info;*.=notice;*.=warn;\
    auth,authpriv.none;\
    cron,daemon.none;\
    mail,news.none -/var/log/messages

# 所有紧急消息
*.emerg :omusrmsg:*
EOF

# 重启 rsyslog
systemctl restart rsyslog

9.2 Auditd 审计

# 安装 auditd
apt install auditd -y

# 配置审计规则
cat > /etc/audit/rules.d/security.rules << 'EOF'
# 文件系统审计
-w /etc/passwd -p wa -k identity
-w /etc/group -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/gshadow -p wa -k identity
-w /etc/sudoers -p wa -k actions
-w /etc/sudoers.d/ -p wa -k actions

# 系统调用审计
-a always,exit -Farch=b64 -S execve -k executions
-a always,exit -Farch=b32 -S execve -k executions
-a always,exit -Farch=b64 -S connect -k network
-a always,exit -Farch=b32 -S connect -k network

# 权限变更审计
-a always,exit -Farch=b64 -Schmod-S fchmod -S fchmodat -k perm_mod
-a always,exit -Farch=b32 -Schmod-S fchmod -S fchmodat -k perm_mod
-a always,exit -Farch=b64 -Schown-S fchown -S fchownat -S lchown -k perm_mod
-a always,exit -Farch=b32 -Schown-S fchown -S fchownat -S lchown -k perm_mod

# 配置审计
-w /etc/audit/ -p wa -k config_changes
-w /etc/sysctl.conf -p wa -k sysctl
EOF

# 重启 auditd
systemctl restart auditd
systemctl enable auditd

十、备份与恢复

10.1 系统配置备份

# 创建配置备份脚本
cat > /usr/local/bin/backup-configs.sh << 'EOF'
#!/bin/bash
BACKUP_DIR="/backup/configs/$(date +%Y%m%d_%H%M%S)"
mkdir-p"$BACKUP_DIR"

# 备份重要目录
tar -czf"$BACKUP_DIR/etc.tar.gz" /etc
tar -czf"$BACKUP_DIR/home-security_admin.tar.gz" /home/security_admin
tar -czf"$BACKUP_DIR/var-spool-cron.tar.gz" /var/spool/cron

# 备份磁盘分区表
sfdisk -d /dev/sda > "$BACKUP_DIR/partition_table.txt"

# 备份已安装包列表
dpkg --get-selections > "$BACKUP_DIR/packages.list"

# 保留最近 30 天的备份
find /backup/configs -type d -mtime+30-execrm-rf {} \;
find /backup/configs -type f -name"*.tar.gz"-mtime+30-delete

echo"配置备份完成: $BACKUP_DIR"
EOF

chmod+x /usr/local/bin/backup-configs.sh

# 添加到 crontab,每天凌晨 1 点执行
(crontab -l2>/dev/null; echo"0 1 * * * /usr/local/bin/backup-configs.sh") | crontab -

10.2 数据备份

# 创建数据备份脚本(以 MySQL 为例)
cat > /usr/local/bin/backup-mysql.sh << 'EOF'
#!/bin/bash
BACKUP_DIR="/backup/mysql/$(date +%Y%m%d_%H%M%S)"
mkdir-p"$BACKUP_DIR"

# 备份所有数据库
mysqldump --all-databases--single-transaction--quick--lock-tables=false \
--master-data=2--flush-logs \
    | gzip > "$BACKUP_DIR/all-databases.sql.gz"

# 保留最近 7 天的备份
find /backup/mysql -type d -mtime+7-execrm-rf {} \;
find /backup/mysql -type f -name"*.sql.gz"-mtime+7-delete

echo"MySQL 备份完成: $BACKUP_DIR"
EOF

chmod+x /usr/local/bin/backup-mysql.sh
(crontab -l2>/dev/null; echo"30 1 * * * /usr/local/bin/backup-mysql.sh") | crontab -

十一、持续安全实践

11.1 安全检查清单

创建每日安全检查脚本:

cat > /usr/local/bin/daily-security-check.sh << 'EOF'
#!/bin/bash
REPORT="/tmp/security-report-$(date +%Y%m%d).txt"

echo"=== 每日安全检查报告 - $(date) ===" > "$REPORT"
echo"" >> "$REPORT"

echo"1. 系统更新检查:" >> "$REPORT"
apt list --upgradable2>/dev/null | head -20 >> "$REPORT"
echo"" >> "$REPORT"

echo"2. SSH 登录检查:" >> "$REPORT"
grep"Accepted" /var/log/auth.log | tail -20 >> "$REPORT"
echo"" >> "$REPORT"

echo"3. 失败的登录尝试:" >> "$REPORT"
grep"Failed password" /var/log/auth.log | tail -20 >> "$REPORT"
echo"" >> "$REPORT"

echo"4. Fail2Ban 状态:" >> "$REPORT"
fail2ban-client status >> "$REPORT"
echo"" >> "$REPORT"

echo"5. 磁盘使用情况:" >> "$REPORT"
df -h >> "$REPORT"
echo"" >> "$REPORT"

echo"6. 监听端口:" >> "$REPORT"
ss -tuln >> "$REPORT"
echo"" >> "$REPORT"

echo"7. 系统负载:" >> "$REPORT"
uptime >> "$REPORT"
echo"" >> "$REPORT"

echo"8. 最近修改的关键文件:" >> "$REPORT"
find /etc -type f -mtime-12>/dev/null | head -20 >> "$REPORT"
echo"" >> "$REPORT"

echo"安全检查完成,报告已保存到: $REPORT"
EOF

chmod+x /usr/local/bin/daily-security-check.sh
(crontab -l2>/dev/null; echo"0 8 * * * /usr/local/bin/daily-security-check.sh | mail -s '每日安全检查报告' security@company.com") | crontab -

11.2 定期安全审计

# 安装安全审计工具
apt install lynis -y
apt install rkhunter -y

# 运行 Lynis 审计
lynis audit system

# 运行 Rootkit Hunter
rkhunter --update
rkhunter --check

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-17 08:05:53 HTTP/2.0 GET : https://f.mffb.com.cn/a/485408.html
  2. 运行时间 : 0.099556s [ 吞吐率:10.04req/s ] 内存消耗:4,754.90kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=540dfe40fc54ce0e247f2cf8eba72cd8
  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.000592s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000787s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000341s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000273s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000487s ]
  6. SELECT * FROM `set` [ RunTime:0.000207s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000515s ]
  8. SELECT * FROM `article` WHERE `id` = 485408 LIMIT 1 [ RunTime:0.000463s ]
  9. UPDATE `article` SET `lasttime` = 1776384353 WHERE `id` = 485408 [ RunTime:0.019634s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000292s ]
  11. SELECT * FROM `article` WHERE `id` < 485408 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000461s ]
  12. SELECT * FROM `article` WHERE `id` > 485408 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000381s ]
  13. SELECT * FROM `article` WHERE `id` < 485408 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000809s ]
  14. SELECT * FROM `article` WHERE `id` < 485408 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002054s ]
  15. SELECT * FROM `article` WHERE `id` < 485408 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.003388s ]
0.101086s