当前位置:网站首页>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
边栏推荐
- What material is sa537cl2? Analysis of mechanical properties of American standard container plate
- Interpretation of several important concepts of satellite antenna
- MySQL converts comma separated attribute field data from column to row
- Idea configuration plug-in
- 27. Input 3 integers and output them in descending order. Pointer method is required.
- C语言字符串练习
- What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material
- 网络安全web渗透技术
- How to delete a specific line from a text file using the SED command?
- MySQL single table field duplicate data takes the latest SQL statement
猜你喜欢

CC2530 common registers for port interrupts

Talk about several methods of interface optimization

线程池:业务代码最常用也最容易犯错的组件

The word backspace key cannot delete the selected text, so you can only press Delete

Daily code 300 lines learning notes day 10
![[combinatorics] polynomial theorem (polynomial theorem | polynomial theorem proof | polynomial theorem inference 1 item number is the number of non negative integer solutions | polynomial theorem infe](/img/9d/6118b699c0d90810638f9b08d4f80a.jpg)
[combinatorics] polynomial theorem (polynomial theorem | polynomial theorem proof | polynomial theorem inference 1 item number is the number of non negative integer solutions | polynomial theorem infe

Processing strategy of message queue message loss and repeated message sending

C language modifies files by line

CC2530 common registers for crystal oscillator settings

Mysql database DDL and DML
随机推荐
Static program analysis (I) -- Outline mind map and content introduction
utfwry. Dat PHP, about ThinkPHP's method of IP location using utfwry address Library
CC2530 common registers for timer 1
LeetCode 1658. Minimum operand to reduce x to 0
Leetcode: lucky number in matrix
Kindeditor editor upload image ultra wide automatic compression -php code
定义一个结构体Fraction,表示分数,用于表示 2/3, 5/6这样的分数
Kotlin学习快速入门(7)——扩展的妙用
One brush 146 force buckle hot question-3 longest substring without repeated characters (m)
PHP converts a one-dimensional array into a two-dimensional array
汇编实例解析--实模式下屏幕显示
Learn from me about the enterprise flutter project: simplified framework demo reference
PHP online confusion encryption tutorial sharing + basically no solution
ucore概述
[Jianzhi offer] 58 - ii Rotate string left
【剑指 Offer 】64. 求1+2+…+n
Central South University | through exploration and understanding: find interpretable features with deep reinforcement learning
CC2530 common registers for serial communication
Fast Ethernet and Gigabit Ethernet: what's the difference?
[2. Basics of Delphi grammar] 2 Object Pascal data type