zabbix时区设置

1.4 zabbix 时区设置

修改Linux 服务器时区

1
2
[root@ct7 ~]# mv /etc/localtime /etc/localtime-GMT
[root@ct7 ~]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

修改Zabbix 时区

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[root@ct7 zabbix]# vim /etc/php.ini
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Shanghai
[root@ct7 zabbix]# vim /etc/httpd/conf.d/zabbix.conf
<IfModule mod_php5.c>
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 always_populate_raw_post_data -1
php_value date.timezone Asia/Shanghai
</IfModule>
[root@ct7 zabbix]# more restart_zabbix.sh
#restart zabbix service
systemctl stop httpd
systemctl stop zabbix-server
systemctl stop zabbix-agent
systemctl start zabbix-server
systemctl start httpd
systemctl start zabbix-agent