Zabbix 监控系统搭建5

2022-02-09 19:46:42 浏览数 (1)

配置前端php

date.timezone 配置成正确的时区 Asia/Shanghai

代码语言:javascript复制
[root@zabbix-server conf.d]# vim /etc/httpd/conf.d/zabbix.conf 
[root@zabbix-server conf.d]# grep  php_value  /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
        php_value date.timezone Asia/Shanghai
[root@zabbix-server conf.d]#  

打开防火墙

允许web访问

代码语言:javascript复制
[root@zabbix-server conf.d]# iptables -L -nv | grep 80
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:2180 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:8000 
[root@zabbix-server conf.d]# vim /etc/sysconfig/iptables
[root@zabbix-server conf.d]# grep 80 /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2180 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8000 -j ACCEPT
[root@zabbix-server conf.d]# /etc/init.d/iptables reload 
iptables: Trying to reload firewall rules:                 [  OK  ]
[root@zabbix-server conf.d]# iptables -L -nv | grep 80
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:80 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:2180 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:8000 
[root@zabbix-server conf.d]# 

0 人点赞