例如查看docker软件的安装列表
1.安装docker软件
[root@k8s-node1 ~]# yum install docker-ce-19.03.9-3.el7 -y
2.查看具体安装包名称
[root@k8s-node1 ~]# rpm -qa|grep docker docker-ce-19.03.9-3.el7.x86_64 docker-ce-cli-20.10.4-3.el7.x86_64
3.查看安装路径
[root@k8s-node1 ~]# rpm -ql docker-ce-19.03.9-3.el7.x86_64 /usr/bin/docker-init /usr/bin/docker-proxy /usr/bin/dockerd /usr/lib/systemd/system/docker.service /usr/lib/systemd/system/docker.socket
4.在不了解docker的日志安装位置情况下,可使用journalctl命令查看docker日志
[root@k8s-master ~]# journalctl -fu docker.service -- Logs begin at Sun 2021-02-28 20:16:36 EST. -- Feb 28 20:28:51 k8s-master dockerd[10897]: time="2021-02-28T20:28:51.473305701-05:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete" Feb 28 20:31:07 k8s-master dockerd[10897]: time="2021-02-28T20:31:07.959128068-05:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete" Feb 28 20:32:53 k8s-master dockerd[10897]: time="2021-02-28T20:32:53.964630457-05:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete" Feb 28 20:32:54 k8s-master dockerd[10897]: time="2021-02-28T20:32:54.102040967-05:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete" Feb 28 20:32:54 k8s-master dockerd[10897]: time="2021-02-28T20:32:54.247546644-05:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"