当前位置:首页>Linux>Linux Shell脚本入门到实战详解

Linux Shell脚本入门到实战详解

  • 2026-01-20 18:46:46
Linux Shell脚本入门到实战详解

一、shell 入门简介

1.1 什么是 shell

shell 脚本简介

什么是shell

网上有很多 shell 的概念介绍,其实都很官方化,如果你对 linux 命令很熟悉,那么编写 shell 就不是一个难事,shell 本质上是 linux 命令,一条一条命令组合在一起,实现某一个目的,就变成了 shell 脚本。它从一定程度上 减轻了工作量,提高了工作效率。

官方化的shell 介绍

Shell 通过提示您输入,向操作系统解释该输入,然后处理来自操作系统的任何结果输出,简单来说Shell就是一个用户跟操作系统之间的一个命令解释器。

常见的 shell 有哪些

  • Bourne Shell(/usr/bin/sh或/bin/sh)

  • Bourne Again Shell(/bin/bash)

  • C Shell(/usr/bin/csh)

  • K Shell(/usr/bin/ksh)

  • Shell for Root(/sbin/sh)

最常用的shell是Bash,也就是Bourne Again Shell。Bash由于易用和免费,在日常工作中被广泛使用,也是大多数Linux操作系统默认的Shell环境。

1.2 shell 编程注意事项

  • shell 编程有哪些注意事项

  • shell 命名:Shell 脚本名称命名一般为英文、大写、小写,后缀以. sh 结尾

  • 不能使用特殊符号、空格

  • 见闻之意,名称要写的一眼可以看出功能

  • shell 编程 首行需要 #!/bin/bash 开头

  • shell 脚本 变量 不能以 数字、特殊符号开头,可以使用下划线—, 但不能 用破折号 -

1.3 第一个 shell 脚本 hello world

创建一个伟大编程项目 — Hello World

# 创建一个Helloword.sh 文件
[root@aly_server01~]# touch Helloword.sh

# 编辑Helloword.sh 文件
[root@aly_server01~]# vim Helloword.sh
[root@aly_server01~]# cat Helloword.sh 
#!/bin/bash
# This is ower first shell
# by author rivers 2021.09
echo"hello world"
[root@aly_server01~]
[root@aly_server01~]# ll Helloword.sh 
-rw-r--r-- 1 root root 85 Sep 20 22:26 Helloword.sh

# 赋予执行权限
[root@aly_server01~]# chmod o+x Helloword.sh 

# 运行helloword.sh 脚本
[root@aly_server01~]# ./Helloword.sh 
hello world

二、shell 环境变量讲解

2.1 shell 变量详解

环境变量介绍

什么是变量

很多人可能会说,可以变化的量就是变量。但是发现很多汉语意思很强大,你看的懂的字,却不一定可以理解它的意思。这里你可以理解为 a = 1,同时还可以 a =2、a = 3 ,不同的值都可以复制给同一个 变量 a 。

常见的3种变量

Shell编程中变量分为三种,分别是系统变量、环境变量和用户变量,Shell变量名在定义时,首个字符必须为字母(a-z,A-Z),不能以数字开头,中间不能有空格,可以使用下划线(_),不能使用(-),也不能使用标点符号等。

简单的变量介绍

[root@keeplived_server~]# a=18
[root@keeplived_server~]# echo $a
18

2.2 shell 系统变量 介绍

系统变量

# Shell常见的变量之一系统变量,主要是用于对参数判断和命令返回值判断时使用,系统变量详解如下:

$
0   当前脚本的名称;
$n   当前脚本的第n个参数,n=1,2,…9;
$*   当前脚本的所有参数(不包括程序本身);
$#   当前脚本的参数个数(不包括程序本身);
$?   令或程序执行完后的状态,返回0表示执行成功;
$$   程序本身的PID号。

2.3 shell 环境变量 介绍

2.3.1 常见的系统环境变量

环境变量介绍

#Shell常见的变量之二环境变量,主要是在程序运行时需要设置,环境变量详解如下:

PATH    命令所示路径,以冒号为分割;
HOME    打印用户家目录;
SHELL   显示当前Shell类型;
USER    打印当前用户名;
ID      打印当前用户id信息;
PWD     显示当前所在路径;
TERM    打印当前终端类型;
HOSTNAME    显示当前主机名;
PS1         定义主机命令提示符的;
HISTSIZE    历史命令大小,可通过 HISTTIMEFORMAT 变量设置命令执行时间;
RANDOM      随机生成一个 0 至 32767 的整数;
HOSTNAME    主机名

2.4 shell 用户环境变量 介绍

2.4.1 自定义 shell 环境变量

用户自定义变量

# 常见的变量之三用户变量,用户变量又称为局部变量,主要用在Shell脚本内部或者临时局部使用,系统变量详解如下:
a=rivers                       自定义变量A;
Httpd_sort=httpd-2.4.6-97.tar  自定义变量N_SOFT;
BACK_DIR=/data/backup/         自定义变量BACK_DIR;
IPaddress=10.0.0.1             自定义变量IP1;

2.4.2 echo 打印菜单栏

使用 echo 打印菜单栏,显示 http-2.4 安装过程

# echo 打印httpd-2.4安装步骤
[root@web-server01~]# touch httpd_2.4_install.sh

# 赋予执行权限
[root@web-server01~]# chmod o+x httpd_2.4_install.sh
[root@web-server01~]# ./httpd_2.4_install.sh

2.4.3 shell 中彩色输出 helloworld

echo -e 扩展

#!/bin/bash
# This is echo color shell
# by author rivers 2021.09-23
# 字体颜色
for i in {31..37}; do
echo -e "\033[$i;40mHello world!\033[0m"
done
# 背景颜色
for i in {41..47}; do
echo -e "\033[47;${i}mHello world!\033[0m"
done
# 显示方式
for i in {1..8}; do
echo -e "\033[$i;31;40mHello world!\033[0m"
done

三、shell 编程流程控制语句

3.1 if 条件语句介绍

3.1.1 常用的单 / 双分支

if 条件语句

# If条件判断语句,通常以if开头,fi结尾。也可加入else或者elif进行多条件的判断

# 单分支语句 ---比较大小
if (条件表达式);then
  语句1
fi

# 双分支if 语句
if (表达式)
  语句1
else
  语句2
fi

# 多支条件语句 ---判断成绩
if (表达式)
  语句1
elif
  语句2
elif
  语句2
fi

3.1.2 if 常见判断逻辑运算符详解

常见逻辑判断运算符

-f   判断文件是否存在 eg: if [ -f filename ];
-d   判断目录是否存在 eg: if [ -d dir     ];
-eq  等于,应用于整型比较 equal;
-ne  不等于,应用于整型比较 not equal;
-lt  小于,应用于整型比较 letter;
-gt  大于,应用于整型比较 greater;
-le  小于或等于,应用于整型比较;
-ge  大于或等于,应用于整型比较;
-a  双方都成立(and) 逻辑表达式 –a 逻辑表达式;
-o  单方成立(or) 逻辑表达式 –o 逻辑表达式;
-z  空字符串;
-x      是否具有可执行权限
||      单方成立;
&&      双方都成立表达式。

3.1.3 使用单分支语句判断 crond 进程是否在运行—案例

判断 crond 服务是否运行

#!/bin/bash
# this is check crond
# by author rivers on 2021-9.23

# 定义一个变量名
name=crond
num=$(ps -ef|grep $name|grep -vc grep)
if [ $num -eq 1 ];then
echo"$num running!"
else
echo"$num is not running!"
fi

3.1.4 判断系统目录是否存在 —案例

判断系统目录是否存在

#!/bin/bash
# this is check directory 
# by author rivers on 2021-9.27 
if  [  !  -d  /data/rivers  -a  !  -d  /tmp/rivers  ];then
 mkdir  -p  /data/rivers  f
 i

3.1.5 多个条件判断学生分数等级 — 案例

判断学生成绩等级

# if 语句可以直接对命令状态进行判断,就省去了获取$?这一步!
# 如果第一个条件符合就不再向下匹配
#!/bin/bash
# this check grade shell
# by author rivers on 2021-09-27

  grade=$1
if [ $grade -gt 90 ];then
echo"Is's very good!"
elif [ $grade -gt 70 ];then
echo"Is's is good!"

elif [ $grade -ge 60 ];then
echo"pass"

else
echo"no pass"
fi
3.2 for 循环语句介绍

for 循环语句

#格式:forname [ [ in [ word ... ] ] ; ] do list ; done
for 变量名 in 取值列表; do
    语句 1
  done

3.2.1 检查同一局域网 多台主机是否存活

检查多台主机存活情况

#!/bin/bash
# check hosts is on/Off
# by rivers on 20219-23

Network=$1
for Host in $(seq 1 254)
do
ping -c 1 $Network.$Host > /dev/null && result=0 || result=1

if [ "$result" == 0 ];then
echo -e "\033[32;1m$Network.$Host is up \033[0m"
echo"$Network.$Host" >> /tmp/up.txt

else
echo -e "\033[;31m$Network.$Host is down \033[0m"
echo"$Network.$Host" >> /tmp/down.txt
fi
done

3.3 while 循环语句介绍

while 循环语句

# While循环语句与for循环功能类似,主要用于对某个数据域进行循环读取、对文件进行遍历,通常用于需要循环某个文件或者列表,满足循环条件会一直循环,不满足则退出循环,其语法格式以whiledo开头,done结尾与 
#while 关联的还有一个 until 语句,它与 while 不同之处在于,是当条件表达式为 false 时才循环,实际使用中比较少,这里不再讲解。

while  (表达式)
do
  语句1
done

break 和 continue 语句

# break 和 continue 语句
break 是终止循环。
continue 是跳出当前循环。
#示例 1:在死循环中,满足条件终止循环
whiletruedo
let N++
if [ $N -eq 5 ]; then
break
fi
echo$N
done
输出:1 2 3 4

#示例 2:举例子说明 continue 用法
N=0
while [ $N -lt 5 ]; do
let N++
if [ $N -eq 3 ]; then
continue
fi
echo$N
done

输出:1 2 4

# 打印 1-100 数字
i=0
while ((i<=100))
do
echo$i
        i=`expr $i + 1`
done

3.3.1 While 循环求 1-100 的总和 —案例

求 1-100 的总和

#!/bin/bash
# by author rivers on 2021-9-27
j=0
i=1
while ((i<=100))
do
     j=`expr $i + $j`
     ((i++))
done
echo$j

3.3.2 每 10 秒循环判断一次 hbs 用户是否登录系统 —案例

每 10 秒 循环判断系统登录

[root@web-server01~/script]# vim login.sh 
#!/bin/bash
#Check File to change. 
#By author rivers 2021-9-27
USERS="hbs"
whiletrue
do
echo"The Time is `date +%F-%T`"
        sleep 10
        NUM=`who|grep "$USERS"|wc -l`
if [[ $NUM -ge 1 ]];then
echo"The $USERS is login in system."
fi
done

3.4 case 选择语句介绍

case 选择语句

#Case选择语句,主要用于对多个选择条件进行匹配输出,与ifelif语句结构类似,通常用于脚本传递输入参数,打印出输出结果及内容,其语法格式以Case…in开头,esac结尾。语法格式如下:
case 模式名  in
  模式 1)
    命令
    ;;
  模式 2)
    命令
    ;;
*)
不符合以上模式执行的命令
esac
# 每个模式必须以右括号结束,命令结尾以双分号结束。

3.4.1 使用 case 编写一个 httpd 服务启动脚本

编写 http 服务启动脚本

[root@web-server01~/script]# vim httpd_start.sh 
# check http server start|stop|starus
# by author rivers on 2021-9-27
whiletrue
do
echo -e "
    \033[31m start \033[0m
    \033[32m stop \033[0m 
    \033[33m status \033[0m
    \033[34m quit \033[0m 
"

read -p "请输入你的选择start|stop|quit:" char
case$charin
start)
    systemctl start httpd && echo"httpd服务已经开启" || echo"开启失败"
;;
stop)
    systemctl stop httpd && echo"httpd服务已经关闭" || echo"关闭失败"
;;
restart)
    systemctl restart httpd && echo"httpd服务已经重启" || echo"重启失败
"

;;
status)
    systemctl status httpd && echo -e "
        httpd 的服务状态

;;
quit)

3.5 select 选择语句介绍

select 选择语句

#select 是一个类似于 for 循环的语句
#Select语句一般用于选择,常用于选择菜单的创建,可以配合PS3来做打印菜单的输出信息,其语法格式以select…in do开头,done结尾:

select i in (表达式) 
do
语句
done

# 选择mysql 版本
#!/bin/bash
# by author rivers on 2021-9-27
PS3="Select a number: "
whiletruedo
select mysql_version in 5.1 5.6 quit;
do
case$mysql_versionin
  5.1)
echo"mysql 5.1"
break
      ;;
  5.6)
echo"mysql 5.6"
break
       ;;
  quit)
exit
    ;;
  *)
echo"Input error, Please enter again!"
break
esac
done
done

3.5.1 使用 select 打印 lnmp 菜单栏 —案例

打印 lnmp 选择菜单

#!/bin/bash
#by author rivers on 2021-9-27
PS3="Please enter you select install menu:"
select i in http php mysql quit
do
case$iin
        http)
echo -e "
                \033[31m Test Httpd \033[0m"

        ;;
        php)
echo  -e "\033[32m Test PHP\033[0m"
        ;;
        mysql)
echo -e "\033[33m Test MySQL.\033[0m"
        ;;
        quit)
echo -e "\033[32m The System exit.\033[0m"
exit
esac
done

3.6 shell 函数、数组 编程 实战

函数

# Shell允许将一组命令集或语句形成一个可用块,这些块称为Shell函数,Shell函数的用于在于只需定义一次,后期随时使用即可,无需在Shell脚本中添加重复的语句块,其语法格式以function name(){开头,以}结尾。

# Shell编程函数默认不能将参数传入()内部,Shell函数参数传递在调用函数名称传递,例如name args1 args2。

# 函数语法
func() {
command1
command1
……
}
fun  # 直接调用函数名
# Shell 函数很简单,函数名后跟双括号,再跟双大括号。通过函数名直接调用,不加小括号。
#!/bin/bash
func() {
VAR=$((1+1))
return$VAR
echo"This is a function."
}
func
echo $?
# bash test.sh 
2

数组

# 数组是相同类型的元素按一定顺序排列的集合。
格式:array=(元素 1 元素 2 元素 3 ...)
用小括号初始化数组,元素之间用空格分隔。
 定义方法 1:初始化数组 array=(a b c)
 定义方法 2:新建数组并添加元素 array[下标]=元素
 定义方法 3:将命令输出作为数组元素array=($(command))

3.6.1 定义一个 httpd 安装的函数 —案例

创建 apache 软件安装函数

[root@web-server01~/script]# vim xx.sh 
#!/bin/bash
#auto install apache
#By author rivers 2021-09-27 
#Httpd define path variable
FILES=httpd-2.2.31.tar.bz2
LES_DIR=httpd-2.2.31
URL=http://mirrors.cnnic.cn/apache/httpd/
PREFIX=/usr/local/apache2/
functionApache_install ()
{
#Install httpd web server 
if [[ "$1" -eq "1" ]];then
        wget -c $URL/$FILES &&  tar -jxvf $FILES && cd$FILES_DIR &&./configure
if [ $? -eq 0 ];then
                make && make install
echo -e "\n\033[32m--------------------------------------------
                echo -e "
\033[32mThe $FILES_DIR Server Install Success !\033[0m
else
echo -e "\033[32mThe $FILES_DIR Make or Make install ERROR,Plea
                exit 0
        fi
fi
}
Apache_install 1
# 调用函数,传参为1

3.6.2 遍历数组元素 — 案例

遍历数组元素

#方法 1:
#!/bin/bash
IP=(10.0.0.1 10.0.0.2 10.0.0.3)
for ((i=0;i<${#IP[*]};i++)); do
echo${IP[$i]}
done
# bash test.sh
10.0.0.1
10.0.0.2
10.0.0.3

#方法 2:
#!/bin/bash
IP=(10.0.0.1 10.0.0.2 10.0.0.3)
for   IP   in${IP[*]}do
echo$IP
done

四、shell 编程实战 案例

4.1 shell 脚本实战之 系统备份脚本 —案例

Tar 工具全备、增量备份网站,Shell 脚本实现自动打包备份

#!/bin/bash
#Auto Backup Linux System Files
#by author rivers on 2021-09-28

SOURCE_DIR=(
    $*
)
TARGET_DIR=/data/backup/
YEAR=`date +%Y`
MONTH=`date +%m`
DAY=`date +%d`
WEEK=`date +%u`
A_NAME=`date +%H%M`
FILES=system_backup.tgz
CODE=$?
if
    [ -z "$*" ];then
echo -e "\033[32mUsage:\nPlease Enter Your Backup Files or Directories\n--------------------------------------------\n\nUsage: { $0 /boot /etc}\033[0m"
exit
fi
#Determine Whether the Target Directory Exists
if
    [ ! -d $TARGET_DIR/$YEAR/$MONTH/$DAY ];then
    mkdir -p $TARGET_DIR/$YEAR/$MONTH/$DAY
echo -e "\033[32mThe $TARGET_DIR Created Successfully !\033[0m"
fi
#EXEC Full_Backup Function Command
Full_Backup()
{
if
    [ "$WEEK" -eq "7" ];then
    rm -rf $TARGET_DIR/snapshot
cd$TARGET_DIR/$YEAR/$MONTH/$DAY ;tar -g $TARGET_DIR/snapshot -czvf $FILES${SOURCE_DIR[@]}
    [ "$CODE" == "0" ]&&echo -e  "--------------------------------------------\n\033[32mThese Full_Backup System Files Backup Successfully !\033[0m"
fi
}
#Perform incremental BACKUP Function Command
Add_Backup()
{
if
        [ $WEEK -ne "7" ];then
cd$TARGET_DIR/$YEAR/$MONTH/$DAY ;tar -g $TARGET_DIR/snapshot -czvf $A_NAME$FILES${SOURCE_DIR[@]}
        [ "$CODE" == "0" ]&&echo -e  "-----------------------------------------\n\033[32mThese Add_Backup System Files $TARGET_DIR/$YEAR/$MONTH/$DAY/${YEAR}_$A_NAME$FILES Backup Successfully !\033[0m"
fi
}
sleep 3 
Full_Backup;Add_Backup

4.2 shell 脚本 实战 之收集系统信息 —案例

Shell 脚本实现服务器信息自动收集

cat <<EOF
++++++++++++++++++++++++++++++++++++++++++++++
++++++++Welcome to use system Collect+++++++++
++++++++++++++++++++++++++++++++++++++++++++++
EOF
ip_info=`ifconfig |grep "Bcast"|tail -1 |awk '{print $2}'|cut -d: -f 2`
cpu_info1=`cat /proc/cpuinfo |grep 'model name'|tail -1 |awk -F: '{print $2}'|sed 's/^ //g'|awk '{print $1,$3,$4,$NF}'`
cpu_info2=`cat /proc/cpuinfo |grep "physical id"|sort |uniq -c|wc -l`
serv_info=`hostname |tail -1`
disk_info=`fdisk -l|grep "Disk"|grep -v "identifier"|awk '{print $2,$3,$4}'|sed 's/,//g'`
mem_info=`free -m |grep "Mem"|awk '{print "Total",$1,$2"M"}'`
load_info=`uptime |awk '{print "Current Load: "$(NF-2)}'|sed 's/\,//g'`
mark_info='BeiJing_IDC'
echo -e "\033[32m-------------------------------------------\033[1m"
echo IPADDR:${ip_info}
echo HOSTNAME:$serv_info
echo CPU_INFO:${cpu_info1} X${cpu_info2}
echo DISK_INFO:$disk_info
echo MEM_INFO:$mem_info
echo LOAD_INFO:$load_info
echo -e "\033[32m-------------------------------------------\033[0m"
echo -e -n "\033[36mYou want to write the data to the databases? \033[1m" ;read ensure

if      [ "$ensure" == "yes" -o "$ensure" == "y" -o "$ensure" == "Y" ];then
echo"--------------------------------------------"
echo -e  '\033[31mmysql -uaudit -p123456 -D audit -e '''"insert into audit_system values('','${ip_info}','$serv_info','${
cpu_info1} X${cpu_info2}','$disk_info','$mem_info','$load_info','$mark_info')"
''' \033[0m '
        mysql -uroot -p123456 -D test -e "insert into audit_system values('','${ip_info}','$serv_info','${cpu_info1} X${cpu_info2}
','$disk_info','$mem_info','$load_info','$mark_info')"

else
echo"Please wait,exit......"
exit
fi

4.3 shell 脚本实战 之 一键部署 lnmp 架构 — 案例

批量部署 lnmp 架构

[root@web-server01~/script]# vim lnmp.sh 
#!/bin/bash
#install lnmp
#by author rivers on 2021-9-28

# nginx 环境准备
Nginx_url=https://nginx.org/download/nginx-1.20.1.tar.gz
Nginx_prefix=/usr/local/nginx

# mysql 环境准备
Mysql_version=mysql-5.5.20.tar.gz
Mysql_dir=mysql-5.5.20
Mysql_url=https://downloads.mysql.com/archives/get/p/23/file/mysql-5.5.20.tar.gz
Mysql_prefix=/usr/local/mysql/

# php 环境准备
Php_version=php-7.2.10.tar.gz
Php_prefix=/usr/local/php-7.2.10/


functionnginx_install(){

if [[ "$1" -eq "1" ]];then
if [ $? -eq 0 ];then
                make && make install
fi

fi
}



functionmysql_install(){
if [[ "$1" -eq "2" ]];then
-DMYSQL_UNIX_ADDR=/tmp/mysql.sock \
-DMYSQL_DATADIR=/data/mysql \
-DSYSCONFDIR=/etc \
-DMYSQL_USER=mysql \
-DMYSQL_TCP_PORT=3306 \
-DWITH_XTRADB_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_EXTRA_CHARSETS=1 \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DEXTRA_CHARSETS=all \
echo -e "\033[32mThe $Mysql_dir Server Install Success !\033[0m"
else
echo -e "\033[32mThe $Mysql_dir Make or Make install ERROR,Please Check......"
exit 0
fi
/bin/cp support-files/my-small.cnf  /etc/my.cnf
/bin/cp support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
fi
}


functionphp_install(){
if [[ "$1" -eq "3" ]];then
if [ $? -eq 0 ];then
                make ZEND_EXTRA_LIBS='-liconv' && make install
if [[ "$1" -eq "3" ]];then
 wget $Php_url && tar xf $Php_version && cd$Php_dir && yum install   bxml2* bzip2* libcurl*  libjpeg* libpng* freetype* gmp* libm
crypt* readline* libxslt* -y && ./configure --prefix=$Php_prefix --disable-fileinfo --enable-fpm --with-config-file-path=/etc --wi
  -config-file-scan-dir=/etc/php.d --with-openssl --with-zlib --with-curl --enable-ftp --with-gd --with-xmlrpc --with-jpeg-dir --w
ith-png-dir --with-freetype-dir --enable-gd-native-ttf --enable-mbstring --with-mcrypt=/usr/local/libmcrypt --enable-zip --enable-
mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --without-pear --enable-bcmath
if [ $? -eq 0 ];then
                make ZEND_EXTRA_LIBS='-liconv' && make install
echo -e "\n\033[32m-----------------------------------------------\033[0m"
echo -e "\033[32mThe $Php_version Server Install Success !\033[0m"
else
echo -e "\033[32mThe $Php_version Make or Make install ERROR,Please Check......"
exit 0
fi
fi
}


PS3="Please enter you select install menu:"
select i in nginx mysql php quit
do
"lnmp.sh" 113L, 3516C written                                                                                   
[root@web-server01~/script]# vim lnmp.sh 
chkconfig --add mysqld
chkconfig mysqld on
fi
}


functionphp_install(){
if [[ "$1" -eq "3" ]];then
if [ $? -eq 0 ];then
                make ZEND_EXTRA_LIBS='-liconv' && make install
echo -e "\n\033[32m-----------------------------------------------\033[0m"
echo -e "\033[32mThe $Php_version Server Install Success !\033[0m"
else
echo -e "\033[32mThe $Php_version Make or Make install ERROR,Please Check......"
exit 0
fi
fi
}


PS3="Please enter you select install menu:"
select i in nginx mysql php quit
do

case$iin
        nginx)
        nginx_install 1
        ;;
        mysql)
        mysql_install 2
        ;;
        php)
        php_install 3
        ;;
        quit)
exit
esac
done
-End-
读到这里说明你喜欢本公众号的文章,欢迎 置顶(标星)本公众号 Linux技术迷,这样就可以第一时间获取推送了~
本公众号 Linux技术迷,后台回复:Linux,领取2T学习资料 !
1. Linux 中 find 命令的 35 个实际例子
2. 运维必备的《网络端口大全》,看这一份就够了
3. Linux 学习指南 (收藏篇)
4. 2万字系统总结,带你实现Linux命令自由

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-08 15:23:29 HTTP/2.0 GET : https://f.mffb.com.cn/a/464053.html
  2. 运行时间 : 0.328766s [ 吞吐率:3.04req/s ] 内存消耗:4,698.88kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=ec4c529bd6f164b2f619960b05285e06
  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.000381s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000662s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.003367s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.015519s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000819s ]
  6. SELECT * FROM `set` [ RunTime:0.009458s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000739s ]
  8. SELECT * FROM `article` WHERE `id` = 464053 LIMIT 1 [ RunTime:0.007328s ]
  9. UPDATE `article` SET `lasttime` = 1770535409 WHERE `id` = 464053 [ RunTime:0.002020s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000286s ]
  11. SELECT * FROM `article` WHERE `id` < 464053 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.043069s ]
  12. SELECT * FROM `article` WHERE `id` > 464053 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.026578s ]
  13. SELECT * FROM `article` WHERE `id` < 464053 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.113481s ]
  14. SELECT * FROM `article` WHERE `id` < 464053 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.017388s ]
  15. SELECT * FROM `article` WHERE `id` < 464053 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.014977s ]
0.330338s