最近一直忙云计算方面工作,也涉及我不太熟悉的领域,数据中心监控软件zabbix。下面我就把我最近涉及到的zabbix技术方面做一个记录

Zabbix-server服务器端的部署:

  1. 系统centos 6.4_64安装,安装desktop、开发包,硬盘容量用lvm 防火墙关闭

  2. 安装zabbix官方源与epel

rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-2.2.2-1.e16.x86_64.rpm

rpm –ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

  1. 安装zabbix-server

Yum install –y zabbix zabbix-get zabbix-server zabbix-web-mysql zabbix-web zabbixe-agent

  1. 安装mysql数据库服务

Yum –y install mysql-server

Vi /etc/my.cnf

电信云计算中心之监控zabbix项目_第1张图片

 Chkconfig mysqld on    service mysqld start

  1. 创建数据库

[root@centos ~]# mysqladmin -uroot password tianyun

[root@centos ~]# mysql -uroot -ptianyun

mysql> create database zabbix character set utf8;

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';

mysql> flush privileges;

mysql> \q

导入zabbix表结构:

[root@centos ~]# mysql -uzabbix -pzabbix zabbix < /usr/share/doc/zabbix-server-mysql-2.2.1/create/schema.sql

[root@centos ~]# mysql -uzabbix -pzabbix zabbix < /usr/share/doc/zabbix-server-mysql-2.2.1/create/p_w_picpaths.sql

[root@centos ~]# mysql -uzabbix -pzabbix zabbix < /usr/share/doc/zabbix-server-mysql-2.2.1/create/data.sql

[root@centos ~]# mysql -uzabbix -pzabbix zabbix -e 'show tables'

  1. .配置zabbix连接数据库:

[root@centos ~]# vim /etc/zabbix/zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=zabbix

DBSocket=/var/lib/mysql/mysql.sock

[root@centos ~]# service zabbix-server start

Starting Zabbix server: [ OK ]

[root@centos ~]# chkconfig zabbix-server on

[root@centos ~]# vim /etc/httpd/conf.d/zabbix.conf

php_value max_execution_time 300

php_value memory_limit 128M

php_value post_max_size 16M

php_value upload_max_filesize 2M

php_value max_input_time 300

php_value date.timezone Asia/Shanghai

[root@centos ~]# service httpd restart

[root@centos ~]# chkconfig httpd on

  1. 配置web界面

打开浏览器:http//IP地址/zabbix

点击下一步下一步,配置成功

电信云计算中心之监控zabbix项目_第2张图片