一、zabbix_server和zabbix_agent部署
1、环境 系统为centos7.6 zabbix版本为zabbix 4.2 数据库使用的是RDS-mysql
2、在zabbix_server上安装zabbix源
rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm
3、重构缓存
yumclean allyummakecache
4、安装zabbix-server和angent
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
5、初始化zabbix数据库,host、user、password、dbname填写实际的信息
zcat/usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -h host -u user -p password dbname
6、修改zabbix_server配置文件 /etc/zabbix/zabbix_server.conf 中db相关信息
7、systemctl restart zabbix-server zabbix-agent httpd
8、systemctl enable zabbix-server zabbix-agent httpd
9、通过http://ip/zabbix访问开始配置
10、如果有PHP option "date.timezone" unknown Fail 报错 修改/etc/php.ini 将里面的;date.timezone = 改成date.timezone = Asia/Shanghai/
sed -i 's/;date.timezone =/date.timezone = Asia\/Shanghai/' /etc/php.ini
查看并修改/etc/httpd/conf.d/zabbix.conf配置文件的配置
vi /etc/httpd/conf.d/zabbix.conf
1
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
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 Asia/Shanghai //修改时区
11、
全部ok点击下一步
12、
输入DB相关信息,下一步
13、