当前位置:首页>学习笔记>ansible运维自动化学习笔记

ansible运维自动化学习笔记

  • 2026-03-08 06:04:12
ansible运维自动化学习笔记
全球计算机技术交流群共同交流学习,来的加我微信拉你进群958038508!
ansible安装和配置

1、yum install ansible 

2、# vi /etc/ansible/ansible.cfg

[defaults]

inventory = /etc/ansible/hosts

forks = 5 命令完一次出几行结果

become = root (sudo_user这项已经不用了可以不用开)

remote_port = 22

host_key_checking = False

timeout = 10

log_path = /var/log/ansible.log

private_key_file = /root/.ssh/id_rsa 用公钥加密,ssh不安全

简单使用

/etc/ansible/hosts下增加这2行

[webservers]

192.168.1.10 ansible_ssh_user=root ansible_ssh_pass=123456

服务器访问ansible webservers -a "df -h" 

创建公钥和私钥

ssh-keygen 一直回车,会在当前用户家目录.ssh/下产生两个文件一个公钥一个私钥

id_rsa  私     id_rsa.pub 公

ssh-copy-id root@192.168.10.3  自动考到客户端去

再ssh客户端就不用密码了

这样hosts文件中就不用写客户端密码一可以访问了

/etc/ansible/hosts下增加这2行

[webservers]

192.168.1.10 ansible_ssh_user=root

服务器访问ansible webservers -a "df -h" 

批量执行命令

[root@m01 ~]# ansible oldboy -m command -a "df -h"

定义主机清单

[web]172.16.1.7[nfs]172.16.1.31[backup]172.16.1.41[oldboy:children] 针对组的组进行管理webnfsbackup

ansible oldboy --list-hosts查看组的主机列表

ansible web -m ping 测试主机ping用ping模块

利用客户端普通用户来进行访问

先在客户端把用户加入visudo里面

visudo 下找到root    ALL=(ALL)       ALL

按这个格式把新用户添加一行

服务器上面修改hosts文件下面这样就行了不用账号密码:

[webserver]

192.168.10.3

然后服务端测试访问:(后面的K为大写)

ansible webserver -a "ls /root" -u user1 -k --become --become-user root -K

前面小k后面大K

SSH password: (root密码)

SUDO password[defaults to SSH password]: (user1普通用户密码)

command命令模块(带管道符的用不了这个模块,要用shell模块)

如果不知道模块怎么写:ansible-doc copy  可以看EXAMPLES下面的例子 

# 默认模块, 执行命令

[root@m01 ~]# ansible oldboy  -a "hostname"

# 如果需要一些管道操作,则使用shell

[root@m01 ~]# ansible oldboy -m shell -a "ifconfig|grep eth0" -f 50

# -f =forks   /etc/ansible/ansible.cfg #结果返回的数量

yum安装模块

推送脚本文件至远程,远程执行脚本文件

[root@m01 ~]# ansible oldboy -m yum -a "name=httpd state=installed"

name    ---指定要安装的软件包名称

state   ---指定使用yum的方法

    installed,present   ---安装软件包

    removed,absent      ---移除软件包

    latest               ---安装最新软件包

copy模块

# 推送文件模块

[root@m01 ~]# ansible oldboy -m copy -a "src=/etc/hosts dest=/tmp/test.txt owner=www group=www mode=0600"

# 在推送覆盖远程端文件前,对远端已有文件进行备份,按照时间信息备份

[root@m01 ~]# ansible oldboy -m copy -a "src=/etc/hosts dest=/tmp/test.txt backup=yes"

# 直接向远端文件内写入数据信息,并且会覆盖远端文件内原有数据信息

[root@m01 ~]# ansible oldboy -m copy -a "content='bgx' dest=/tmp/oldboy"

src           --- 推送数据的源文件信息

dest          --- 推送数据的目标路径

backup        --- 对推送传输过去的文件,原摧送的位置多一个文件备份带时间格式的 

content       --- 直在客户机上建立一个文件并且还可以写入指定的信息

group         --- 将本地文件推送到远端,指定文件属组信息

owner         --- 将本地文件推送到远端,指定文件属主信息

mode          --- 将本地文件推送到远端,指定文件权限信息

service服务模块

[root@m01 ~]# ansible oldboy -m service -a "name=crond state=stopped enabled=yes"

name        --- 定义要启动服务的名称

state       --- 指定服务状态是停止或是运行

    started     --- 启动

    stopped     --- 停止

    restarted   --- 重启

    reloaded    --- 重载

enabled     --- 是否让服务开启自启动

安装执行

[root@m01 ~]# ansible web -m yum -a "name=httpd state=installed"

配置

[root@m01 ~]# ansible web -m copy -a "content='This is Ansible' dest=/var/www/html/index.html"

启动服务

[root@m01 ~]# ansible web -m service -a "name=httpd state=started"

yum copy service mount cron user file 

1.机器还原快照(firewalld、selinux、配置好仓库)

2.推送你的公钥

3.指定backup安装rsync、配置、启动、创建目录、创建用户、准备密码文件、权限

4.指定nfs安装nfs、配置、启动

5.web挂载nfs

6.web执行脚本推送数据至bakcup,加入定时任务

拷贝文件去客户端

ansible webserver -m copy -a "src=anaconda-ks.cfg  dest=/tmp" 

在客户端新建立文件夹

ansible webserver -m file -a "dest=/tmp/abc mode=777 state=directory" 

删除客户端文件

ansible webserver -m file -a "dest=/tmp/abc  state=absent" 

客户端新建文件

ansible webserver -m file -a "dest=/tmp/abc mode=777 state=touch" 

软件安装

ansible webserver -m yum -a "name=vim state=present"

创建用户

ansible webserver -m user -a "name=foo password=admin" 

删除用户

ansible webserver -m user -a "name=foo state=absent" 

创建用户不可以登陆

ansible webserver -m user -a "name=foo password=admin shell=/sbin/nologin"  

启动、停止、重启、开机启动,服务

ansible webserver -m service -a "name=httpd state=started" 

state=restarted     state=stopped       enabled=true

在本地运行模块,等同于在远程执行,不需要将脚本文件进行推送目标主机执行

[root@m01 ~]# ansible oldboy -m script -a "/server/scripts/yum.sh"

file配置模块

    创建目录

[root@m01 ~]# ansible oldboy -m file -a "path=/tmp/oldboy state=diretory"

    创建文件

[root@m01 ~]# ansible oldboy -m file -a "path=/tmp/tt state=touch mode=555 owner=root group=root"

[root@m01 ~]# ansible oldboy -m file -a "src=/tmp/tt path=/tmp/tt_link state=link"

递归改组root

 ansible web -m file -a "path=/tmp/test state=directory owner=root group=root recurse=yes"

path        --- 指定远程主机目录或文件信息

recurse     --- 递归授权

state       --- 

    directory   --- 在远端创建目录

    touch       --- 在远端创建文件

    link        --- link或hard表示创建链接文件

    absent      --- 表示删除文件或目录

    mode        --- 设置文件或目录权限

    owner       --- 设置文件或目录属主信息

    group       --- 设置文件或目录属组信息

group模块

name            --- 指定创建的组名

gid             --- 指定组的gid

state

    absent      --- 移除远端主机的组

    present     --- 创建远端主机的组(默认)

创建组,指定gid

[root@m01 ~]# ansible oldboy -m group -a "name=oldgirl gid=888"

user模块

uid             --- 指定用户的uid

group           --- 指定用户组名称

groups          --- 指定附加组名称

password        --- 给用户添加密码

shell           --- 指定用户登录shell

create_home     --- 是否创建家目录

创建oldgirl,设定uid为888,并加入gid为888

[root@m01 ~]# ansible oldboy -m user -a "name=oldgirl uid=888 group=888 shell=/sbin/nologin create_home=no"

随机生成加密字符串(-1使用MD5进行加密 -stdin 非交互式 -salt 加密参数)

[root@m01 ~]# echo "bgx" | openssl passwd -1 -stdin

固定加密字符串

[root@m01 ~]# echo "123"| openssl passwd -1 -stdin -salt 'salt

创建普通用户,并配置对应的用户密码

[root@m01 ~]# echo "bgx" | openssl passwd -1 -stdin

$1$1KmeCnsK$HGnBE86F/XkXufL.n6sEb.

[root@m01 ~]# ansible oldboy -m user -a 'name=xlw password="$1$765yDGau$diDKPRoCIPMU6KEVEaPTZ0"'

crond模块

# 正常使用crond服务

[root@m01 ~]# crontab -l 查看有哪些计划

* * * * *  /bin/sh /server/scripts/yum.sh

# 使用ansible添加一条定时任务

[root@m01 ~]# ansible oldboy -m cron -a "minute=* hour=* day=* month=* weekday=*  job='/bin/sh /server/scripts/test.sh'"

[root@m01 ~]# ansible oldboy -m cron -a "job='/bin/sh /server/scripts/test.sh'"

# 设置定时任务注释信息name='cron01',防止重复,name设定

[root@m01 ~]# ansible oldboy -m cron -a "name='cron01' job='/bin/sh /server/scripts/test.sh'"

# 删除相应定时任务

[root@m01 ~]# ansible oldboy -m cron -a "name='ansible cron02' minute=0 hour=0 job='/bin/sh /server/scripts/test.sh' state=absent"

# 注释相应定时任务,使定时任务失效    

[root@m01 scripts]# ansible oldboy -m cron -a "name='ansible cron01' minute=0 hour=0 job='/bin/sh /server/scripts/test.sh' disabled=yes"

mount模块

(挂栽的目录会自动创建,如果用absent卸载会把目录同时删除)

(剧本中没测试不知道是否可以自动创立文件夹)

present     ---开机挂载,仅将挂载配置写入/etc/fstab

mounted     ---挂载设备,并将配置写入/etc/fstab

unmounted   ---卸载设备,不会清除/etc/fstab写入的配置

absent      ---卸载设备,会清理/etc/fstab写入的配置

挂载光盘

ansible web -m mount -a "src=/dev/cdrom path=/mnt/cdrom fstype=iso9660 opts=defaults state=mounted"

仅将挂载的配置写入/etc/fstab,并不会执行挂载操作

[root@m01 ~]# ansible oldboy -m mount -a "src=172.16.1.31:/data path=/data fstype=nfs opts=defaults state=present"

临时挂载设备,并将挂载信息写入/etc/fstab

[root@m01 ~]# ansible web -m mount -a "src=172.16.1.31:/data path=/data fstype=nfs opts=defaults state=mounted"

临时卸载,不会清理/etc/fstab

[root@m01 ~]# ansible web -m mount -a "src=172.16.1.31:/data path=/data fstype=nfs opts=defaults state=unmounted"

卸载,不仅临时卸载,同时会清理/etc/fstab

[root@m01 ~]# ansible web -m mount -a "src=172.16.1.31:/data path=/data fstype=nfs opts=defaults state=absent"

yum copy service mount cron user file 

机器还原快照(firewalld、selinux、配置好仓库)

    选择虚拟机-》快照-》恢复

--------------------------------------playbook------------------------

playbook是由一个或多个模块组成的,使用多个不同的模块,完成一件事情。

yum

copy

service

安装一个服务,配置,并启动。

    1.找谁来拍。

    2.大概的任务。

    3.具体怎么做。

安装httpd服务->playbook

1.安装

2.配置

3.启动

[root@m01 ~]# cat httpd_install.yaml 

这是一个ansible的playbook

- hosts: web  tasks:    - name: Install Httpd Server      yum: name=httpd,httpd-tools state=installed    - name: Configure Httpd Server      copy: src=./httpd.conf dest=/etc/httpd/conf/httpd.conf    - name: Start Httpd Server      service: name=httpd state=started enabled=yes 

修改本地拷贝好的httpd.conf文件

执行ansible-playbook httpd_install.yaml 推送

环境规划

角色 外网IP(NAT) 内网IP(LAN)    部署软件

m01 eth0:10.0.0.61 eth1:172.16.1.61 ansible

backup eth0:10.0.0.41 eth1:172.16.1.41 rsync

nfs eth0:10.0.0.31 eth1:172.16.1.31 nfs、Sersync

web01 eth0:10.0.0.7 eth1:172.16.1.7 httpd

全网备份

实时备份

目录规划

mkdir /etc/ansible/ansible_playbook/{file,conf,scripts} -p 

tree /etc/ansible/ansible_playbook/

/etc/ansible/ansible_playbook/

├── conf

└── file

└── scripts

##########

基础环境:

所有机器统一的配置

    1.需要关闭firewalld以及selinux、epel仓库、ssh端口、优化基础配置

    2.需要安装rsync和nfs-utils

    3.准备www用户

    4.需要准备/etc/rsync.pass密码文件

    5.需要准备全网备份脚本

基础的playbook剧本

简单精典案例(安装、配置、运行,重启):

vim install_httpd.yaml

#install http- hosts: web  tasks:    - name: install httpd      yum: name=httpd state=installed    - name: configure file		 把自己本地的httpd.conf文件改好copy到所有客户机上      copy: src=./httpd.conf  dest=/etc/httpd/conf/httpd.conf      notify: restart httpd 如果配置文件有改动就会调下面的handlers名字下面的							服务restart httpd这个名字一定要和下面对应    - name: start service      service: name=httpd state=started  handlers:    - name: restart httpd      service: name=httpd state=restarted

测试语法:ansible-playbook --syntax-check install_http.yaml

模拟运行一下:ansible-playbook -C install_http.yaml

-----------------------------------------------------------

[root@m01 ansible_playbook]# 

阿里云yum添加:

1、https://opsx.alibaba.com/mirror

2、ctrl+f 过滤epel

3、打开帮助

4、wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

5、会在这里多一个yum文件:

/etc/yum.repos.d/epel.repo 

vim  base.yaml 

- hosts: all  tasks:    - name: Install Epel Repos	ansible没有wget所以我们用get_url模块一样的功能上面      get_url: url=http://mirrors.aliyun.com/repo/epel-7.repo dest=/etc/yum.repos.d/epel.repo    - name: Dns Client      copy: src=./conf/resolv.conf dest=/etc/resolv.conf    - name: Install Rsync Nfs-Utils      yum: name=rsync,nfs-utils state=installed    - name: Create Group WWW      group: name=www gid=666    - name: Create User WWW      user: name=www uid=666 group=666 create_home=no shell=/sbin/nologin    - name: Create Rsync_Client_Pass      copy: content='1' dest=/etc/rsync.pass mode=600    - name: Create Scripts Directory      file: path=/server/scripts recurse=yes state=directory    - name: Push File Scripts      copy: src=./scripts/rsync_backup_md5.sh dest=/server/scripts/    - name: Crontable Scripts      cron: name="backup scripts" hour=01 minute=00 job="/bin/bash /server/scripts/rsync_backup_md5.sh &>/dev/null"

##########

应用环境:Rsync

    1.安装rsync

    2.配置rsync(配置变更,一定要进行重载操作)

    3.创建虚拟用户,权限调整

    4.创建目录/data/  /backup

    5.启动rsync

    6.配置邮箱->邮箱的发件人->校验的脚本

[root@m01 ansible_playbook]# cat rsync.yaml 

- hosts: backup  tasks:    - name: Installed Rsync Server      yum: name=rsync,mailx state=installed    - name: configure Rsync Server      copy: src=./conf/rsyncd.conf dest=/etc/rsyncd.conf      notify: Restart Rsync Server    - name: Create Virt User      copy: content='rsync_backup:1' dest=/etc/rsync.password mode=600    - name: Create Data       file: path=/data state=directory recurse=yes owner=www group=www mode=755    - name: Create Backup       file: path=/backup state=directory recurse=yes owner=www group=www mode=755    - name: Start RsyncServer      service: name=rsyncd state=started enabled=yes    - name: Push Check Scripts      copy: src=./scripts/rsync_check_backup.sh dest=/server/scripts/    - name: Crond Check Scripts      cron: name="check scripts" hour=05 minute=00 job="/bin/bash /server/scripts/rsync_check_backup.sh &>/dev/null"  handlers:    - name: Restart Rsync Server      service: name=rsyncd state=restarted

应用环境:NFS

    1.安装nfs-utils

    2.配置nfs     (当修改了配置,触发重载操作)

    3.创建目录,授权

    4.启动

 [root@m01 ansible_playbook]# cat nfs.yaml 

- hosts: nfs  tasks:    - name: Installed Nfs Server      yum: name=nfs-utils state=installed    - name: Configure Nfs Server      copy: src=./conf/exports dest=/etc/exports      notify: Restart Nfs Server    - name: Create Share Data      file: path=/data state=directory recurse=yes owner=www group=www mode=755    - name: Start Nfs Server      service: name=nfs-server state=started enabled=yes  handlers:    - name: Restart Nfs Server      service: name=nfs-server state=restarted

应用环境:Sersync

    1.下载sersync

    2.解压,改名,配置

    3.启动

[root@m01 ansible_playbook]# cat sersync.yaml 

- hosts: nfs  tasks:    - name: Scp Sersync      copy: src=./file/sersync2.5.4_64bit_binary_stable_final.tar.gz dest=/usr/local/sersync.tar.gz    - name: Zip      shell: cd /usr/local && tar xf sersync.tar.gz && mv GNU-Linux-x86 sersync      args: 这个意思是上面如果有下面的目录了就不创建了        creates: /usr/local/sersync    - name: configure Sersync      copy: src=./conf/confxml.xml dest=/usr/local/sersync/    - name: Start Sersync      shell: /usr/local/sersync/sersync2 -dro /usr/local/sersync/confxml.xml

应用环境:WEB

挂载nfs共享的目录

[root@m01 ansible_playbook]# cat web.yaml 

- hosts: web  tasks:    - name: Mount NFS Server Share Data      mount: src=172.16.1.31:/data path=/data fstype=nfs opts=defaults state=mounted   

包含模拟include

vim mail.yaml  写个总模块来调用上面的分模块

- import_playbook: base.yaml

- import_playbook: rsync.yaml

- import_playbook: nfs.yaml

- import_playbook: sersync.yaml

- import_playbook: web.yaml

7.快照还原

    1.推送公钥

    2.使用ping模块测试

    3.执行ansible-playbook测试

    4.测试全网备份,测试是否能发邮件,并校验结果

    5.测试nfs的挂载

    6.测试实时同步

------------------------------------------------------------------------

扩展:

安装httpd,php服务

    [root@web01 ~]# yum install httpd php -y

 配置httpd服务

    -----上qq群下载httpd.conf文件即可--------

上传代码

    [root@web01 conf]# cd /data/

    -------上传kaoshi.zip文件-------

解压代码

    [root@web01 data]# unzip  kaoshi.zip

启动httpd服务

    [root@web01 conf]# systemctl start httpd

全球计算机技术交流群共同交流学习,来的加我微信拉你进群958038508!

最新文章

随机文章

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