cd /usr/share/doc/zabbix-server-mysql-2.4.5/create
#mysql 可设置一下mysql的root密码(set password=password('xxxpwd');)
mysql> create database zabbix;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> quit;
mysql -uzabbix -pzabbix zabbix < data.sql
mysql -uzabbix -pzabbix zabbix < images.sql
mysql -uzabbix -pzabbix zabbix < schema.sql
4.apache设置(针对于RHEL7&CentOS7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
vim /etc/httpd/conf.d/zabbix.conf
Alias /zabbix /usr/share/zabbix
<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
#Order allow,deny
#Allow from all
Require all granted ###此行是在7系列里使用,其上两行为7之前版本使用
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
</Directory>
cd /usr/share/zabbix/fonts/ #可将想用的字体放到此目录下,注意字体文件的后缀一定要为小写字母
vim /usr/share/zabbix/include/defines.inc.php
#define('ZBX_GRAPH_FONT_NAME', 'graphfont'); // font file name
define('ZBX_GRAPH_FONT_NAME', 'SIMKAI'); // font file name
#define('ZBX_FONT_NAME', 'graphfont');
define('ZBX_FONT_NAME', 'SIMKAI');