Zabbix7.0安装(Ubuntu24.04+LNMP)
1.选择版本
下载Zabbix
2.安装虚拟机
这里选择在Ubuntu24.04上安装Zabbix.
安装链接https://blog.csdn.net/weixin_58189050/article/details/145446065
配置源
vim /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
apt update
3.安装zabbix
1.安装repository
#Install Zabbix repository
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu24.04_all.deb
dpkg -i zabbix-release_latest_7.0+ubuntu24.04_all.deb
apt update
2.安装Zabbix server,Web前端,agent
apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent
3.安装数据库
apt install mysql-server -y
4.创建数据库
# mysql -uroot -p
password
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;
导入初始架构和数据,系统将提示您输入新创建的密码。
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
5. 为Zabbix server配置数据库
vim /etc/zabbix/zabbix_server.conf
6.为Zabbix前端配置PHP
vim /etc/zabbix/nginx.conf
7. 启动Zabbix server和agent进程
systemctl restart zabbix-server zabbix-agent nginx php8.3-fpm
systemctl enable zabbix-server zabbix-agent nginx php8.3-fpm
4.图形化安装
1.中文安装
apt install language-pack-zh-hans
update-localelangzh_cn.utf-8
export langzh_cn.utf-8
systemctl restart zabbix-server zabbix-agent nginx php8.3-fpm
其余下一步即可。
默认密码Admin:zabbix
2.解决乱码
解决乱码
sudo add-apt-repository universe
sudo apt update
sudo apt install fonts-wqy-microhei
sudo cp /usr/share/fonts/truetype/wqy/wqy-microhei.ttc /usr/share/zabbix/assets/fonts/graphfont.ttf
修改之后