3分钟装好zabbix

注:非原创,但刚刚亲手实验成功。

rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm

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

[[email protected]]# yum install zabbix-server-mysql zabbix-web-mysql -y

 

安装 mysql:

[[email protected]]# yum install mysql mysql-devel mysql-server -y

[[email protected]]# service mysqld restart

 

安装 zabbix agent


[[email protected]]# yum install zabbix-agent -y

创建 zabbix mysql 数据库:

Create zabbix database and user on MySQL.

[[email protected]]# mysql -u root
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> exit

导入数据库表结构和数据:

[[email protected]]# cd /usr/share/doc/zabbix-server-mysql-2.2.0/create
[[email protected]]# mysql -uroot zabbix < schema.sql
[[email protected]]# mysql -uroot zabbix < images.sql
[[email protected]]# mysql -uroot zabbix < data.sql

编辑 zabbix 数据配置:

[[email protected]]# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

开始 zabbix-server 进程
[[email protected]]# service zabbix-server start


Editing PHP configuration for Zabbix frontend

apache的 zabbix 配置文件

#vi /etc/httpd/conf.d/zabbix.conf. 

 

PHP 配置更改

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 Europe/Riga 

更改为:  php_value date.timezone Asia/Shanghai

date.timezone 必须设置正确

 

重启 httpd 服务:

[[email protected]]# service httpd restart

Zabbix 
配置页面:

 

http://192.168.5.11/zabbix

 

默认的用户名和密码: Admin/zabbix.

dE8tG.MgBAAA&ek=1&kp=1&pt=0&bo=LwJ0AQAAA
dPidHOMgBAAA&ek=1&kp=1&pt=0&bo=LQJxAQAAA
dH7FIuMgBAAA&ek=1&kp=1&pt=0&bo=LQJrAQAAA
dCBl6eSEOAAA&ek=1&kp=1&pt=0&bo=KgJvAQAAA
dFQqsuPNHwAA&ek=1&kp=1&pt=0&bo=NQJSAQAAA


你可能感兴趣的:(数据库,mysql,database,create)