当前位置:网站首页>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
边栏推荐
- How programming apes grow rapidly
- RF Analyze Demo搭建 Step by Step
- [combinatorics] polynomial theorem (polynomial coefficients | full arrangement of multiple sets | number of schemes corresponding to the ball sub model | polynomial coefficient correlation identity)
- [2. Basics of Delphi grammar] 2 Object Pascal data type
- ANOVA example
- 【剑指 Offer】58 - I. 翻转单词顺序
- Take you to API development by hand
- Shentong express expects an annual loss of nearly 1billion
- 爱可可AI前沿推介(7.3)
- 27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
猜你喜欢
NLP four paradigms: paradigm 1: fully supervised learning in the era of non neural networks (Feature Engineering); Paradigm 2: fully supervised learning based on neural network (Architecture Engineeri
New features of C 10
静态程序分析(一)—— 大纲思维导图与内容介绍
Atom QT 16_ audiorecorder
CC2530 common registers for timer 1
Unreal_ Datatable implements ID self increment and sets rowname
斑馬識別成狗,AI犯錯的原因被斯坦福找到了
Yu Wenwen, Hu Xia and other stars take you to play with the party. Pipi app ignites your summer
C language modifies files by line
CC2530 common registers for crystal oscillator settings
随机推荐
网络安全web渗透技术
BYD and great wall hybrid market "get together" again
LeetCode 1656. Design ordered flow
什么是质押池,如何进行质押呢?
CC2530 common registers for watchdog
What kind of material is 14Cr1MoR? Analysis of chemical composition and mechanical properties of 14Cr1MoR
Why is WPA3 security of enterprise business so important?
How to delete a specific line from a text file using the SED command?
Résolution de l'instance d'assemblage - - affichage à l'écran en mode réel
Difference between JSON and bson
LeetCode 1657. Determine whether the two strings are close
What is the material of sa302grc? American standard container plate sa302grc chemical composition
PHP converts a one-dimensional array into a two-dimensional array
Define a structure fraction to represent a fraction, which is used to represent fractions such as 2/3 and 5/6
[combinatorial mathematics] counting model, common combinatorial numbers and combinatorial identities**
27. Input 3 integers and output them in descending order. Pointer method is required.
C language string inversion
Leetcode: lucky number in matrix
NLP four paradigms: paradigm 1: fully supervised learning in the era of non neural networks (Feature Engineering); Paradigm 2: fully supervised learning based on neural network (Architecture Engineeri
The word backspace key cannot delete the selected text, so you can only press Delete