本文经过实测,按步骤粘贴命令即可部署完成
安装网络yum库
#rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
通过yum装mysql和zabbix调用的插件还有agent代理
#yum install zabbix-server-mysql zabbix-web-mysql mysql-server zabbix-agent
配置mysql密码和给zabbix用户权限
#service mysqld start
#/usr/bin/mysqladmin -u root password ‘zabbix‘ 数据库管理员密码
# mysql -uroot -pzabbix
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to [email protected] identified by ‘zabbix‘; 页面连数据库密码
mysql> exit
导入数据
# cd /usr/share/doc/zabbix-server-mysql-2.4.*/create
# mysql -uroot -pzabbix zabbix < schema.sql
# mysql -uroot -pzabbix zabbix < images.sql
# mysql -uroot -pzabbix zabbix < data.sql
配置zabbix主配置文件
# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix 页面连数据库的密码
#vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
使zabbix支持中文和中文字体样式
#vim /usr/share/zabbix/include/locales.inc.php
‘zh_CN‘ => array(‘name‘ => _(‘Chinese (zh_CN)‘), ‘display‘ => true),
#mv /usr/share/zabbix/fonts/graphfont.{ttf,ttfbak}
通过winscp工具复制window字体到/usr/share/zabbix/fonts目录
#cd /usr/share/zabbix/fonts/
#mv simkai.ttf graphfont.ttf
使zabbix支持中文主机名
#vim /usr/share/zabbix/include/defines.inc.php
define(‘ZBX_PREG_INTERNAL_NAMES‘, ‘([0-9a-zA-Z_\. \-\x{80}-\x{ff}]+)‘);
各个服务开启并设置开机启动
#service zabbix-server start
#service httpd start
#service mysqld restart
#chkconfig zabbix-server on
#chkconfig httpd on
#chkconfig mysqld on
#chkconfig snmpd on ; service snmpd start
#chkconfig snmptrapd on ; service snmptrapd start
#chkconfig zabbix-agent on ; service zabbix-agent start
网页访问
访问http://ip地址/zabbix 初始化页面
初始化时填写页面连数据库的用户名密码zabbix/zabbix 默认登录密码 Admin/zabbix