CentOS 6.5最小化安装zabbix
安装EPEL源
1
|
#rpm�Civhhttps://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
|
服务端安装LAMP环境
1 |
#vim/etc/PHP/ini |
修改如下行:
947 date.timezone = Asia/Shanghai
440 max_execution_time = 300
449 max_input_time = 300
729 post_max_size = 32M
457 memory_limit = 128M
1588 mbstring.func_overload = 2
1
2
3
4
|
#serviceMysqLdstart
#chkconfigMysqLdon
#servicehttpdstart
#chkconfighttpdon
|
安装zabbix:
创建zabbix用户及组
2 |
#groupaddzabbix-g201
#useradd-gzabbix-u201-mzabbix
|
解压安装zabbix
2 |
#tarxfzabbix-2.0.8.tar.gz
|
#make&&makeinstall |
#vim/etc/services |
#zabbix
zabbix-agent 10050/tcp #Zabbix Agent
zabbix-agent 10050/udp #Zabbix Agent
zabbix-trapper 10051/tcp #Zabbix Trapper
zabbix-trapper 10051/udp #Zabbix Trapper
#MysqLadminpasswordzabbix
#MysqL-uroot-pzabbix
|
MysqL> create database zabbix characterset utf8;
MysqL> grant all on zabbix.* tozabbix@localhost identified by 'zabbix';
MysqL> flush privileges;
MysqL> quit
导入zabbix的表结构及数据
#cdzabbix-2.0.8/database/MysqL/ |
日志存放目录,并复制脚本
#mkdir/var/log/zabbix
#chownzabbix.zabbix/var/log/zabbix
#cpzabbix-2.0.8/misc/init.d/fedora/core/zabbix_*/etc/init.d/
#chmod755/etc/init.d/zabbix_*
|
配置zabbix服务端的配置文件
#vim/etc/zabbix/zabbix_server.conf |
87 DBName=zabbix
102 DBUser=zabbix
113 DBPassword=zabbix
#cp-rPHP/var/www/html/zabbix
#chown-Rapache.root/var/www/html/zabbix
|
启动zabbix_server添加开机自启动
#chkconfig--addzabbix_server
#chkconfig--addzabbix_agentd
|
#servicezabbix_serverstart