系统:centos6.8 x86_64
软件:zabbix-2.4.6-1.el6.x86_64
装yum源:
[root[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] 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
[[email protected] create]# yum install mysql-server
[[email protected] create]# yum install mysql-devel
[[email protected] create]# /etc/init.d/mysqld start
[[email protected] ~]# yum install zabbix-server-mysql zabbix-web-mysql
[[email protected] ~]# 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 [email protected] identified by ‘123456‘;
mysql> flush privileges;
[[email protected] ~]# cd /usr/share/doc/zabbix-server-mysql-2.4.5/create/
[[email protected] create]# mysql -uzabbix -p123456 < schema.sql
[[email protected] create]# mysql -uzabbix -p123456 zabbix < schema.sql
[[email protected] create]# mysql -uzabbix -p123456 zabbix < images.sql
[[email protected] 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.
[[email protected] ~]# /etc/init.d/zabbix-server start
Editing PHP configuration for Zabbix frontend
[[email protected] ~]# 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
[[email protected] ~]# vi /etc/php.ini
date.timezone = Asia/Chongqing
[[email protected] ~]# /etc/init.d/httpd restart
注:
默认用户名/密码:Admin/zabbix