查看ubuntu系统版本
root@localhost:~# cat /proc/version
Linux version 4.15.0-159-generic (buildd@lgw01-amd64-055) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #167-Ubuntu SMP Tue Sep 21 08:55:05 UTC 2021
root@localhost:~# uname -a
Linux localhost 4.15.0-159-generic #167-Ubuntu SMP Tue Sep 21 08:55:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@localhost:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
配置dns解析
root@localhost:~# vim /etc/systemd/resolved.conf
[Resolve]
DNS=114.114.114.114
DNS=8.8.8.8
###重启
root@localhost:~# systemctl daemon-reload
root@localhost:~# systemctl restart systemd-resolved
ntpdate时间同步
root@localhost:~# apt-get install ntpdate
root@localhost:~# ntpdate 192.168.1.220
zabbix agent安装(参照zabbix官网)
(base) root@zdjsapp:~# wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-3+bionic_all.deb
(base) root@zdjsapp:~# dpkg -i zabbix-release_4.0-3+bionic_all.deb
(base) root@zdjsapp:~# apt install zabbix-agent
###配置
(base) root@zdjsapp:~# vim /etc/zabbix/zabbix_agentd.conf
(base) root@zdjsapp:~# systemctl restart zabbix-agent
(base) root@zdjsapp:~# systemctl enable zabbix-agent
Synchronizing state of zabbix-agent.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable zabbix-agent
(base) root@zdjsapp:~# /lib/systemd/systemd-sysv-install enable zabbix-agent