Centos怎么安装部署最新版Zabbix3.4
创始人
2024-12-22 07:43:15
0次

 一、系统环境

cat /etc/redhat-release

centos linux release 7.3.1611 (core)

关闭防火墙及selinux

systemctl stop firewalld.service
systemctl disable firewalld.service
sed -i 's/selinux=enforcing/selinux=disabled/' /etc/selinux/config
grep selinux=disabled /etc/selinux/config
setenforce 0

二、数据库安装及配置

1、mariadb概述

mariadb数据库管理系统是mysql的一个分支,主要由开源社区在维护,采用gpl授权许可。
开发这个分支的原因是:甲骨文公司收购了mysql后,有将mysql闭源的潜在风险,因此社区采用分支的方式来避开这个风险。

mariadb的目的是完全兼容mysql,包括api和命令行,使之能轻松成为mysql的代替品。

2、安装mariadb

yum install mariadb-server mariadb -y

mariadb数据库的相关命令是:

systemctl start mariadb #启动mariadb
systemctl stop mariadb #停止mariadb
systemctl restart mariadb #重启mariadb
systemctl enable mariadb #设置开机启动

三、zabbix3.4安装及配置

1、zabbix3.4新功能概述

  • remote command support through proxies

  • parallel processing of alerts

  • being notified on problem acknowledgement

  • item value preprocessing

    • new preprocessing options

  • configurable jmx endpoints

  • jmx low-level discovery

  • pcre library for regular expressions

  • url-encoding support in web monitoring

    • automatic url-encoding

    • flexible url-encoding for variables

    • unicode support in domain names

  • support of macros and time suffixes in time periods

  • host macro support in event tags

  • frontend improvements

    • dropping ie9 and ie10 support

    • full cloning of screens and maps

    • unified style for radio buttons and checkboxes

    • applying same permissions to nested host groups

    • increased field sizes

    • miscellaneous

  • daemon improvements

    • ipmi polling

    • configuration parameters

    • more information on agent metric thread crashes

  • item changes/improvements

  • low-level discovery

  • return code check for scripts and commands

zabbixe中文文档

2、zabbix3.4安装

rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql -y

3、创建数据库

create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';

4、导入数据

复制代码 代码如下:


zcat /usr/share/doc/zabbix-server-mysql-3.4.0/create.sql.gz | mysql -uzabbix -pzabbix zabbix

5、配置数据库用户及密码

grep -n '^'[a-z] /etc/zabbix/zabbix_server.conf
38:logfile=/var/log/zabbix/zabbix_server.log
49:logfilesize=0
72:pidfile=/var/run/zabbix/zabbix_server.pid
99:dbname=zabbix
115:dbuser=zabbix
123:dbpassword=zabbix
314:snmptrapperfile=/var/log/snmptrap/snmptrap.log
432:timeout=4
474:alertscriptspath=/usr/lib/zabbix/alertscripts
484:externalscripts=/usr/lib/zabbix/externalscripts
520:logslowqueries=3000

6、启动zabbix server并设置开机启动

systemctl enable zabbix-server
systemctl start zabbix-server

7、编辑zabbix前端php配置,更改时区

vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone asia/shanghai

8、selinux配置

setsebool -p httpd_can_connect_zabbix on
setsebool -p httpd_can_network_connect_db on

9、启动httpd并设置开机启动

systemctl start httpd
systemctl enable httpd

四、安装zabbix web

1、浏览器访问,并进行安装http://172.16.8.254/zabbix/

Centos怎么安装部署最新版Zabbix3.4

2、点击next会出现检查状态

Centos怎么安装部署最新版Zabbix3.4

3、检查系统环境设置,必须全部都为ok,才能继续

Centos怎么安装部署最新版Zabbix3.4

4、输入连接到数据库详细信息。zabbix数据库必须已经创建好

Centos怎么安装部署最新版Zabbix3.4

Centos怎么安装部署最新版Zabbix3.4

5、连接zabbix服务细节,如果没有改变可选择默认

Centos怎么安装部署最新版Zabbix3.4

7、完成安装,会将在/etc/zabbix/web/zabbix.conf.php生成配置文件

congratulations! you have successfully installed zabbix frontend.
configuration file "/etc/zabbix/web/zabbix.conf.php" created.

Centos怎么安装部署最新版Zabbix3.4

8、登录最新版zabbix3.4 默认用户admin 默认密码zabbix

Centos怎么安装部署最新版Zabbix3.4

五、zabbxi-agent安装及配置

1、安装zabbxi-agent

yum install zabbix-agent -y

2、配置zabbxi-agent

grep -n '^'[a-z] /etc/zabbix/zabbix_agentd.conf 
13:pidfile=/var/run/zabbix/zabbix_agentd.pid
32:logfile=/var/log/zabbix/zabbix_agentd.log
43:logfilesize=0
97:server=172.16.8.254
138:serveractive=172.16.8.254
149:hostname=zabbix server
267:include=/etc/zabbix/zabbix_agentd.d/*.conf

3、启动zabbxi-agent并设置开机启动

systemctl enable zabbix-agent.service
systemctl restart zabbix-agent.service

相关内容

热门资讯

空调连续工作多久需要停机休息 空调连续工作的时间取决于多个因素,包括空调的型号、功率、使用环境和维护情况等。一般来说,空调可以连续...
空调哪个符号是除湿的 空调除湿功能通常用一个水滴形状的符号表示。不同品牌和型号的空调遥控器可能会有所差异,但一般来说,除湿...
格力空调多长时间加一次氟利昂 1、一般情况下,空调对氟利昂的使用量是非常小的,所以在空调使用了四年左右的时候再考虑加也没问题。2、...
空调用多长时间需要加氟一次 一般情况下是五年。当出现以下这几种情况时,空调才需要加氟。1、空调的室内机和室外机各有两个接口,当接...
格调生活·C标思享荟:卡萨帝在... 9月12日的郑州龙湖金融岛,夜风轻拂,灯光璀璨。“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑...
品牌价值破千亿、高端份额持续领... 9月12日,“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑州站”在郑州龙湖金融岛举办。2026...
空调主板坏了修800还是换新的 空调主板坏了是修还是换新,需要考虑多个因素,以下是一些建议:1. 维修成本:如果维修费用较低,比如 ...
空调开多久需要休息多长时间 问题:空调开多久需要休息多长时间回答:1、在使用空调的过程中,一般空调开7~8个小时左右需要休息2~...
中央空调多长时间清洗一次 1、一般空调开机前清洗一次即可,空调开机中间时段再清洗一次,空调关机时清洗一次,这样比较合理。2、空...
中央空调氟利昂多久加一次 看空调制热和制冷程度,很多人的观点认为氟利昂必须一年放一次,其实这个观点是错误的,理解上面有点偏差,...