如何安装Zabbix
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何安装Zabbix相关的知识,希望对你有一定的参考价值。
参考技术A zabbixCS结构监控系统前直没整理安装:安装几都要重新看目前Zabbix配置安装进行整理Zabbix配置需要web、php、mysql、gcc等支持
请自行配置
接我始操作
操作范例操作系统Centos
5.2
tar
zxvf
zabbix-1.6.2.tar.gz
mysql
-uroot
-p
mysql>
create
databases
zabbix;
mysql>
GRANT
ALL
PRIVILEGES
ON
zabbix.*
TO
zabbix@localhost
IDENTIFIED
BY
‘zabbix’
WITH
GRANT
OPTION;
mysql>
use
zabbix;
mysql>
source
/usr/local/src/zabbix-1.6.2/create/schema/mysql.sql
mysql>
source
/usr/local/src/zabbix-1.6.2/create/data/data.sql
mysql>
source
/usr/local/src/zabbix-1.6.2/create/data/images_mysql.sql
cd
zabbix-1.6.2
./configure
–prefix=/usr/local/zabbix/
\
//指定安装目录
–enable-server
\
//安装server监控节点需要
–enable-agent
\
//安装agent
–with-mysql
\
//需要mysql支持需要指定目录
–with-net-snmp
//需要snmp支持需要指定目录
用编译选项需要更看帮助
–enable-static
Build
statically
linked
binaries
–enable-server
Turn
on
build
of
server
–enable-proxy
Turn
on
build
of
proxy
server
–enable-agent
Turn
on
build
of
agent
–enable-ipv6
Turn
on
support
of
IPv6
–with-mysql
–with-oracle
–with-pgsql
–with-sqlite3
–with-jabber
–with-net-snmp
–with-ucd-snmp
Zabbix配置客户端需执行:
./configure
–prefix=/usr/local/zabbix
–enable-agent
make
&&
make
install
Zabbix配置安装程没报错基本OK接增加应端口:
vi
/etc/services
加入
zabbix_agent
10050/tcp
#
zabbix
agent
zabbix_agent
10050/udp
#
zabbix
agent
zabbix_trapper
10051/tcp
#
zabbix
trapper
zabbix_trapper
10051/udp
#
zabbix
trapper
复制配置文件服务启脚本
cp
-rf
misc/conf
/opt/app/zabbix/etc
-R
misc/init.d/
选择自合适自环境启脚本或者自写
添加zabbix用户
useradd
zabbix
用脚本启zabbix_serverzabbix_agentd
[root@zabbix
~]#ll
/usr/local/zabbix/sbin/
total
2344
-rwxr-xr-x
1
root
root
362581
Apr
16
22:55
zabbix_agent
-rwxr-xr-x
1
root
root
425336
Apr
16
22:55
zabbix_agentd
-rwxr-xr-x
1
root
root
136854
Apr
16
22:55
zabbix_get
-rwxr-xr-x
1
root
root
163086
Apr
16
22:55
zabbix_sender
-rwxr-xr-x
1
root
root
1284665
Apr
16
22:55
zabbix_server
Zabbix配置zabbix编译目录:
配置文件:
mkdir
/etc/zabbix
cp
misc/conf/*
/etc/zabbix/
vi
frontends/php/include/db.inc.php
更改数据库相关内容:
$DB_TYPE
="MYSQL";
$DB_SERVER
="localhost";
$DB_DATABASE
="zabbix";
$DB_USER
="zabbix";
$DB_PWD
="zabbix";
cp
-rf
frontends/php
/var/www/html/zabbix
-R
php环境需求
PHP
version:
5.2.8
Ok
PHP
Memory
limit:
128M
Ok
PHP
post
max
size:
8M
Ok
PHP
max
execution
time:
300
sec
Ok
PHP
Databases
support:
MySQL
Ok
PHP
BC
math
support
yes
Ok
GD
Version:
bundled
(2.0.34
compatible)
Ok
Image
formats:
PNG
Ok
PHP
Timezone:
Asia/Shanghai
注:gd-devel没安装web端安装应其要安装比net-snmp通yum安装便
[root@zabbix
~]#rpm
-qa|grep
gd
gd-devel-2.0.33-9.4.el5_1.1
gd-2.0.33-9.4.el5_1.1
安装php-bcmath
yum
-y
install
php-bcmath
修改区
Vi
/etc/php.ini
date.timezone
=Asia/Shanghai
何安装Zabbix介绍
以上是关于如何安装Zabbix的主要内容,如果未能解决你的问题,请参考以下文章
六十Linux监控平台介绍zabbix监控介绍安装zabbix忘记Admin密码如何做
Linux监控平台介绍 zabbix监控介绍 安装zabbix 忘记Admin密码如何做