当前位置:网站首页>RedHat 6.2 配置 Zabbix
RedHat 6.2 配置 Zabbix
2022-07-03 16:58:00 【星哥玩云】
1.搭建本地YUM源。
# yum -y install httpd php php-MySQL mysql-server mysql-client curl curl-devel net-snmp net-snmp-devel perl-DBI php-gd php-xml php-bcmath zlib-devel mysql-devel glibc-devel gcc automake libidn-devel openssl-devel net-snmp-devel rpm-devel OpenIPMI-devel php-mbstring
2.添加用户 [[email protected] src]# useradd zabbix [[email protected] src]# passwd zabbix
3.配置zabbix的MYSQL数据库 #service mysqld start [[email protected] src]# mysql -u root -p
mysql> create database zabbix; Query OK, 1 row affected (0.02 sec) mysql> grant all on zabbix.* to [email protected] identified by 'zabbix'; Query OK, 0 rows affected (0.08 sec) mysql> quit
解压下的zabbix的源码包 #tar zxvf zabbix-1.8.13.tar.gz #cd zabbix-1.8.13 #mysql -u root zabbix < create/schema/mysql.sql #mysql -u root zabbix < create/data/data.sql #mysql -u root zabbix < create/data/images_mysql.sql
4.安装 #./configure -prefix=/opt/zabbix --enable-server --with-mysql --with-net-snmp --with-jabber=/usr/local/ --with-libcurl --with-openipmi --enable-agent
可能会报jabber相关的错误 解决:安装iksemel。 #wget http://iksemel.googlecode.com/files/iksemel-1.4.tar.gz #tar zxvf iksemel-1.4.tar.gz #cd iksemel-1.4 #./configure #make #make install
再次执行 #./configure -prefix=/opt/zabbix --enable-server --with-mysql --with-net-snmp --with-jabber=/usr/local/ --with-libcurl --with-openipmi --enable-agent
#make install
安装成功会有提示
5.修改/etc/services文件 # cat >> /etc/services << EOF zabbix-trapper 10051/tcp Zabbix Trapper zabbix-trapper 10051/udp Zabbix Trapper EOF
6.配置zabbix #cd zabbix-1.8.13 6.1 #cp misc/init.d/RedHat/zabbix_server_ctl /etc/init.d/zabbix_server # mkdir /etc/zabbix # cp misc/conf/* /etc/zabbix/ # vi /etc/zabbix/zabbix_server.conf DBName=zabbix DBUser=zabbix DBPassword=zabbix
6.2复制PHP的WEB应用 # mkdir /var/www/html/zabbix # cp -r frontends/php/* /var/www/html/zabbix
6.3修改/etc/zabbix/zabbix_server.conf的 PidFile= 与/etc/init.d/zabbix_server 里的变量 PIDFILE= 相互一致,注意保存目录的权限问题,才能生成pid文件,否则不能正常start,stop,restart服务。
6.4添加到启动服务: 编辑/etc/init.d/zabbix_server文件,在文件头部的#!/bin/sh行下添加如下两行: #chkconfig: 35 95 95 #description:zabbix server 执行 #chkconfig --add zabbix_server
7.启动 Zabbix Server #service zabbix_server start
启动时可能报错: libiksemel.so.3: cannot open shared object file: No such file or directory
解决: #updatedb #locate libiksemel.so.3 #ldd zabbix_server
8.访问http://<服务器ip>/zabbix 进行配置页面,一步步走。最后zabbix会给一个配置文件,把配置文件上传zabbix的WEB应用的conf目录。即可。
可能出现问题。 php-mbstring 不OK
解决:安装 #yum install php-mbstring
9.http://<服务器ip>/zabbix 的登录用户名密码是admin/zabbix
客户端的安装 一、直接下载agent包安装过程 zabbix_agents_1.8.5.linux2_6.amd64.tar.gz
1. #groupadd zabbix #useradd zabbix -g zabbix
2. #mkdir /usr/local/zabbix/ #tar -zxvf zabbix_agents_1.8.5.linux2_6.amd64.tar.gz -C /usr/local/zabbix/
或下载源码包,解压后,执行 #./configure --prefix=/usr/local/zabbix --enable-agent #make #make install
3.配置zabbix * 服务端口定义: 编辑 /etc/services,在后面追加: #cat >> /etc/services << EOF zabbix-agent 10050/tcp Zabbix Agent zabbix-agent 10050/udp Zabbix Agent EOF
* 复制配置文件: #mkdir /etc/zabbix 从zabbix Server上拷贝一份zabbix.agentd.conf
* 安装启动脚本 #下载并拷贝启动脚本zabbix_agentd到/etc/init.d目录下 #chmod a+x /etc/init.d/zabbix_agentd * 修改 /etc/init.d/zabbix_agentd 变量定义: BASEDIR=/usr/local/zabbix
*修改/etc/zabbix/zabbix.agentd.conf的 PidFile= 与/etc/init.d/zabbix_agentd 里的变量 PIDFILE= 相互一致,注意保存目录的权限问题,才能生成pid文件,否则不能正常start,stop,restart服务。
* 添加到启动服务: 编辑/etc/init.d/zabbix_agentd文件,在文件头部的#!/bin/sh行下添加如下两行: #chkconfig: 35 95 95 #description:zabbix Agent server 执行 #chkconfig --add zabbix_agentd
* 启动 Zabbix Agentd /etc/init.d/zabbix_agentd start
边栏推荐
- Arduino esp32: overall framework of lvgl project (I)
- 13mnnimo5-4 German standard steel plate 13MnNiMo54 boiler steel 13MnNiMo54 chemical properties
- Résolution de l'instance d'assemblage - - affichage à l'écran en mode réel
- Summary of three methods of PHP looping through arrays list (), each (), and while
- BYD and great wall hybrid market "get together" again
- How to promote cross department project collaboration | community essay solicitation
- [combinatorics] recursive equation (the relationship theorem between the solution of the recursive equation and the characteristic root | the linear property theorem of the solution of the recursive e
- 什么是质押池,如何进行质押呢?
- [combinatorics] recursive equation (characteristic equation and characteristic root | example of characteristic equation | root formula of monadic quadratic equation)
- Daily code 300 lines learning notes day 10
猜你喜欢

静态程序分析(一)—— 大纲思维导图与内容介绍

Take you to API development by hand

手把手带你入门 API 开发

13mnnimo5-4 German standard steel plate 13MnNiMo54 boiler steel 13MnNiMo54 chemical properties

ucore概述

图之深度优先搜索

关于学习Qt编程的好书精品推荐

Talk about several methods of interface optimization

Meituan side: why does thread crash not cause JVM crash

跨境电商:外贸企业做海外社媒营销的优势
随机推荐
The word backspace key cannot delete the selected text, so you can only press Delete
C语言字符串反转
CC2530 common registers for watchdog
Capacités nécessaires à l'analyse des données
Static program analysis (I) -- Outline mind map and content introduction
[Jianzhi offer] 57 - ii Continuous positive sequence with sum s
What is the pledge pool and how to pledge?
Execute script unrecognized \r
Zebras are recognized as dogs, and Stanford found the reason why AI made mistakes
Meituan side: why does thread crash not cause JVM crash
How to promote cross department project collaboration | community essay solicitation
Difference between JSON and bson
匯編實例解析--實模式下屏幕顯示
Deep understanding of grouping sets statements in SQL
什么是质押池,如何进行质押呢?
静态程序分析(一)—— 大纲思维导图与内容介绍
What is the difference between 14Cr1MoR container plate and 14Cr1MoR (H)? Chemical composition and performance analysis of 14Cr1MoR
Redis:关于列表List类型数据的操作命令
What material is sa537cl1? Sa537cl1 corresponds to the national standard material
Interpretation of several important concepts of satellite antenna