Ubuntu server 24 (Linux) 安装部署 Zabbix 7.0 LTS

宁睿  金牌会员 | 2024-7-18 08:11:01 | 显示全部楼层 | 阅读模式
打印 上一主题 下一主题

主题 703|帖子 703|积分 2119

一  安装Mysql 8.03
  1. test@test:~$ mysqld --version
  2. /usr/sbin/mysqld  Ver 8.0.36-2ubuntu3 for Linux on x86_64 ((Ubuntu))
  3. #mysql 大于8.03.x ,启动zabbix-server会报错如下
  4. Unable to start Zabbix server due to unsupported MySQL database version (8.04.00).
  5. Must not be higher than (8.03.x).
  6. Use of supported database version is highly recommended.
  7. Override by setting AllowUnsupportedDBVersions=1 in Zabbix server configuration file at your own risk.
复制代码
二  安装Zabbix
1 安装Zabbix repository
  1. wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-1+ubuntu24.04_all.deb
  2. sudo dpkg -i zabbix-release_7.0-1+ubuntu24.04_all.deb
  3. sudo apt update
复制代码
2 安装Zabbix server,Web前端,agent
  1. sudo apt-get install zabbix-server-mysql zabbix-frontend-php  zabbix-sql-scripts zabbix-agent php8.3-fpm zabbix-nginx-conf
复制代码
3 查察版本
  1. #test@test:~$ zabbix_agentd -V
  2. zabbix_agentd (daemon) (Zabbix) 7.0.0
  3. Revision 49955f1fb5c 3 June 2024, compilation time: Jun  3 2024 05:55:33
  4. Copyright (C) 2024 Zabbix SIA
  5. License AGPLv3: GNU Affero General Public License version 3 <https://www.gnu.org/licenses/>.
  6. This is free software: you are free to change and redistribute it according to
  7. the license. There is NO WARRANTY, to the extent permitted by law.
  8. This product includes software developed by the OpenSSL Project
  9. for use in the OpenSSL Toolkit (http://www.openssl.org/).
  10. Compiled with OpenSSL 3.0.13 30 Jan 2024
  11. Running with OpenSSL 3.0.13 30 Jan 2024
  12. #test@test:~$ zabbix_server -V
  13. zabbix_server (Zabbix) 7.0.0
  14. Revision 49955f1fb5c 3 June 2024, compilation time: Jun  3 2024 05:55:33
  15. Copyright (C) 2024 Zabbix SIA
  16. License AGPLv3: GNU Affero General Public License version 3 <https://www.gnu.org/licenses/>.
  17. This is free software: you are free to change and redistribute it according to
  18. the license. There is NO WARRANTY, to the extent permitted by law.
  19. This product includes software developed by the OpenSSL Project
  20. for use in the OpenSSL Toolkit (http://www.openssl.org/).
  21. Compiled with OpenSSL 3.0.13 30 Jan 2024
  22. Running with OpenSSL 3.0.13 30 Jan 2024
复制代码
4  创建数据库和导入数据库
  1. #sudo mysql -uroot  -p
  2. mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
  3. Query OK, 1 row affected (0.01 sec)
  4. mysql> create user  zabbix@'%' IDENTIFIED WITH mysql_native_password  BY '密码';
  5. Query OK, 0 rows affected (0.02 sec)
  6. mysql> grant all privileges on zabbix.* to zabbix@'%';
  7. Query OK, 0 rows affected (0.00 sec)
  8. mysql> set global log_bin_trust_function_creators = 1;
  9. Query OK, 0 rows affected, 1 warning (0.00 sec)
  10. mysql> quit
  11. #导入数据
  12. sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
  13. #
  14. mysql -uroot  -p
  15. mysql> set global log_bin_trust_function_creators = 0;
  16. Query OK, 0 rows affected, 1 warning (0.00 sec)
  17. mysql> quit
复制代码
5 Zabbix server配置数据库
  1. sudo  vim  /etc/zabbix/zabbix_server.conf
  2. # DBPassword= --> DBPassword="密码"
复制代码
6 修改nginx 配置文件
  1. sudo vim /etc/nginx/conf.d/zabbix.conf
  2. #        listen          8080;  --> listen       80;
  3. #        server_name     example.com; --> server_name 192.168.50.1 example.com;
复制代码
7 启动Zabbix server和agent 服务
  1. sudo systemctl restart zabbix-server zabbix-agent  nginx  php8.3-fpm
  2. sudo systemctl enable zabbix-server zabbix-agent nginx php8.3-fpm
复制代码
8 访问web安装





三 登录配置(默认用户暗码Admin:zabbix)
1 中文支持
  1. sudo apt-get install language-pack-zh-hant language-pack-zh-hans
  2. #
  3. reboot
  4. #上传windows 的字体,解决图形界面中文乱码问题
  5. cd /usr/share/zabbix/assets/fonts
  6. sudo cp graphfont.ttf graphfont.ttf_bak
  7. sudo mv /home/test/STSONG.TTF  graphfont.ttf
  8. #重新启动服务
  9. sudo systemctl restart zabbix-server
复制代码




2 修改默认暗码



免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

宁睿

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表