欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 维修 > Zabbix7.0安装(Ubuntu24.04+LNMP)

Zabbix7.0安装(Ubuntu24.04+LNMP)

2025/2/8 22:39:21 来源:https://blog.csdn.net/weixin_58189050/article/details/145462716  浏览:    关键词: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 multiverse

deb https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse

deb 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-8systemctl 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

 

修改之后

 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com