Ubuntu server 24 (Linux) 安装部署 Zabbix 7.0 LTS
一 安装Mysql 8.03test@test:~$ mysqld --version
/usr/sbin/mysqldVer 8.0.36-2ubuntu3 for Linux on x86_64 ((Ubuntu))
#mysql 大于8.03.x ,启动zabbix-server会报错如下
Unable to start Zabbix server due to unsupported MySQL database version (8.04.00).
Must not be higher than (8.03.x).
Use of supported database version is highly recommended.
Override by setting AllowUnsupportedDBVersions=1 in Zabbix server configuration file at your own risk.
二 安装Zabbix
1 安装Zabbix repository
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-1+ubuntu24.04_all.deb
sudo dpkg -i zabbix-release_7.0-1+ubuntu24.04_all.deb
sudo apt update 2 安装Zabbix server,Web前端,agent
sudo apt-get install zabbix-server-mysql zabbix-frontend-phpzabbix-sql-scripts zabbix-agent php8.3-fpm zabbix-nginx-conf 3 查察版本
#test@test:~$ zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 7.0.0
Revision 49955f1fb5c 3 June 2024, compilation time: Jun3 2024 05:55:33
Copyright (C) 2024 Zabbix SIA
License AGPLv3: GNU Affero General Public License version 3 <https://www.gnu.org/licenses/>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).
Compiled with OpenSSL 3.0.13 30 Jan 2024
Running with OpenSSL 3.0.13 30 Jan 2024
#test@test:~$ zabbix_server -V
zabbix_server (Zabbix) 7.0.0
Revision 49955f1fb5c 3 June 2024, compilation time: Jun3 2024 05:55:33
Copyright (C) 2024 Zabbix SIA
License AGPLv3: GNU Affero General Public License version 3 <https://www.gnu.org/licenses/>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).
Compiled with OpenSSL 3.0.13 30 Jan 2024
Running with OpenSSL 3.0.13 30 Jan 2024
4 创建数据库和导入数据库
#sudo mysql -uroot-p
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
Query OK, 1 row affected (0.01 sec)
mysql> create userzabbix@'%' IDENTIFIED WITH mysql_native_passwordBY '密码';
Query OK, 0 rows affected (0.02 sec)
mysql> grant all privileges on zabbix.* to zabbix@'%';
Query OK, 0 rows affected (0.00 sec)
mysql> set global log_bin_trust_function_creators = 1;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> quit
#导入数据
sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
#
mysql -uroot-p
mysql> set global log_bin_trust_function_creators = 0;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> quit
5 Zabbix server配置数据库
sudovim/etc/zabbix/zabbix_server.conf
# DBPassword= --> DBPassword="密码" 6 修改nginx 配置文件
sudo vim /etc/nginx/conf.d/zabbix.conf
# listen 8080;--> listen 80;
# server_name example.com; --> server_name 192.168.50.1 example.com;
7 启动Zabbix server和agent 服务
sudo systemctl restart zabbix-server zabbix-agentnginxphp8.3-fpm
sudo systemctl enable zabbix-server zabbix-agent nginx php8.3-fpm 8 访问web安装
https://img-blog.csdnimg.cn/direct/2b9b1e27f61b4f77ae62e85dd378cee4.png
https://img-blog.csdnimg.cn/direct/6077a6c79a8742129b4b5c221432bf63.png
https://img-blog.csdnimg.cn/direct/3f0c3b28f7fd458ab774dcbee909f3d1.png
https://img-blog.csdnimg.cn/direct/daf1ca533bac42ec97a5ee210f638b35.png
https://img-blog.csdnimg.cn/direct/a23515c3f6c74ce49b6b9f0bd86254d5.png
三 登录配置(默认用户暗码Admin:zabbix)
1 中文支持
sudo apt-get install language-pack-zh-hant language-pack-zh-hans
#
reboot
#上传windows 的字体,解决图形界面中文乱码问题
cd /usr/share/zabbix/assets/fonts
sudo cp graphfont.ttf graphfont.ttf_bak
sudo mv /home/test/STSONG.TTFgraphfont.ttf
#重新启动服务
sudo systemctl restart zabbix-server https://img-blog.csdnimg.cn/direct/39bf8187e2ff497ea461f870c366d9fa.png
https://img-blog.csdnimg.cn/direct/f0eb7ed5a28b4c098cb9460f00f04418.png
https://img-blog.csdnimg.cn/direct/6746ad1d63564e3ea9bc5f2aa5a3e10e.png
https://img-blog.csdnimg.cn/direct/ba8b175c73eb45a0ab4a57a28716ba87.png
2 修改默认暗码
https://img-blog.csdnimg.cn/direct/1c2fd5300c8b40248c1d50989c92e9a1.png
https://img-blog.csdnimg.cn/direct/af780c6c61474054a57be02dd193d2af.png
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]