Zabbix配置安装需要的主要点有三个,我们来看看!
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_server和zabbix_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
Zabbix配置访问web:http://localhost/zabbix进行安装
#p#
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时,就更得心应手了!
【编辑推荐】