最近一直忙云计算方面工作,也涉及我不太熟悉的领域,数据中心监控软件zabbix。下面我就把我最近涉及到的zabbix技术方面做一个记录
Zabbix-server服务器端的部署:
系统centos 6.4_64安装,安装desktop、开发包,硬盘容量用lvm 防火墙关闭
安装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
安装zabbix-server
Yum install –y zabbix zabbix-get zabbix-server zabbix-web-mysql zabbix-web zabbixe-agent
安装mysql数据库服务
Yum –y install mysql-server
Vi /etc/my.cnf
Chkconfig mysqld on service mysqld start
创建数据库
[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/images.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'
.配置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
配置web界面
打开浏览器:http://IP地址/zabbix
点击下一步下一步,配置成功
本文转自东方之子736651CTO博客,原文链接:http://blog.51cto.com/ecloud/1862449 ,如需转载请自行联系原作者