ubuntu 20.04 server 安装 zabbix
参考文档
https://zhuanlan.zhihu.com/p/587415883?utm_id=0
https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/
https://blog.csdn.net/ammc520/article/details/134279322
在Ubuntu 20.04上安装MySQL教程
https://blog.csdn.net/m0_57165777/article/details/127977315
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-4%2Bubuntu20.04_all.deb
sudo dpkg -i zabbix-release_6.0-4+ubuntu20.04_all.deb
如果不执行 下面这句话 再下面的 会出错
sudo apt-get update
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
sudo apt install mysql-server
sudo apt-get install mysql-client
sudo mysql_secure_installation
VALIDATE PASSWORD COMPONENT can be used to test passwords: n
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : n
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
systemctl status mysql.service
sudo cat /etc/mysql/debian.cnf
mysql -u debian-sys-maint -p
输入上面的密码
use mysql;
select user,plugin from user;
update user set plugin=‘mysql_native_password’ where user=‘root’;
select user,plugin from user;
alter user ‘root’@‘localhost’ identified by ‘1234’;
flush privileges;
exit
sudo service mysql restart