系统:centos6.8 x86_64
软件:zabbix-2.4.6-1.el6.x86_64
装yum源:
[root@zabbix ~]# cd /etc/yum.repos.d/
[root@zabbix yum.repos.d]# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Installing Zabbix packages
[root@zabbix create]# yum install mysql-server
[root@zabbix create]# yum install mysql-devel
[root@zabbix create]# /etc/init.d/mysqld start
[root@zabbix ~]# yum install zabbix-server-mysql zabbix-web-mysql
[root@zabbix ~]# yum install zabbix-agent#Example for installing Zabbix agent only
Creating initial database
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '123456';
mysql> flush privileges;
[root@zabbix ~]# cd /usr/share/doc/zabbix-server-mysql-2.4.5/create/
[root@zabbix create]# mysql -uzabbix -p123456 < schema.sql
[root@zabbix create]# mysql -uzabbix -p123456 zabbix < schema.sql
[root@zabbix create]# mysql -uzabbix -p123456 zabbix < images.sql
[root@zabbix create]# mysql -uzabbix -p123456 zabbix < data.sql
Starting Zabbix server process
1.Edit database configuration in zabbix_server.conf
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=123456
2. Start Zabbix server process.
[root@zabbix ~]# /etc/init.d/zabbix-server start
Editing PHP configuration for Zabbix frontend
[root@zabbix ~]# vi /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 Europe/Riga
[root@zabbix ~]# vi /etc/php.ini
date.timezone = Asia/Chongqing
[root@zabbix ~]# /etc/init.d/httpd restart
注:
默认用户名/密码:Admin/zabbix
本文转自 zhuxtqw 51CTO博客,原文链接:http://blog.51cto.com/1054054/1703250,如需转载请自行联系原作者