CentOS7安装部署zabbix5.0

关闭防火墙和selinux

systemctl stop firewalld.service
setenforce 0
进入vim /etc/selinux/config
SELINUX=disadled

安装 Zabbix 存储库

Rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum clean all

安装 Zabbix 服务器和代理

yum -y install zabbix-server-mysql zabbix-agent
yum -y install centos-release-scl		(启用红帽软件集合)
vim /etc/yum.repos.d/zabbix.repo		(启用zabbix前端存储库)
[zabbix-frontend]
enabled=1
yum -y install zabbix-web-mysql-scl zabbix-nginx-conf-scl  (安装zabbix前端包)

Mysql数据库安装配置

yum -y install mariadb mariadb-server
systemctl start mariadb		(启动数据库)
mysql		(进入数据库)
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> create user zabbix@localhost identified by 'password';
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost;
zcat /usr/share/doc/zabbix-server-mysql-5.0.7/create.sql.gz | mysql -uzabbix -pzabbix zabbix	(导入初始框架和数据)

配置zabbix-server文件

vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

配置php文件

vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
[zabbix]
user = nginx
group = nginx

php_value[date.timezone] = Asia/Shanghai(设置时区)
vim /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf
listen          80;
server_name     192.168.226.169;

#fastcgi_pass    unix:/var/opt/rh/rh-php72/run/php-fpm/zabbix.sock;
fastcgi_pass    127.0.0.1:9000;

启动zabbix和代理进程

systemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm

192.168.226.169/setup.php

配置php环境

vim /etc/opt/rh/rh-php72/php.ini
post_max_size = 16M
max_execution_time = 300(最大执行时间)
max_input_time = 300(最大输入时间)
date.timezone = 'Asia/Shanghai'(设置时区)

重启zabbix和代理进程

systemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm

访问zabbix页面

192.168.226.169/setup.php
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值