Skip to content

Latest commit

 

History

History
103 lines (89 loc) · 2.99 KB

Centos7.7二进制文件安装使用Zabbix5.0(zabbix-server).md

File metadata and controls

103 lines (89 loc) · 2.99 KB

一、系统环境

Centos7.7、
关闭防火墙、
关闭selinux

二、配置阿里云yum源

curl -o /etc/yum.repos.d/epel.repos http://mirrors.aliyun.com/repo/epel-7.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

三、Zabbix5.0 YUM源

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

Zabbix5.0 YUM源切换到阿里

vim /etc/yum.repos.d/zabbix.repo
%s#repo.zabbix.com#mirrors.aliyun.com/zabbix#g
yum clean all
yum makecache

四、Zabbix5.0 YUM 源开启web前端安装

安装 Zabbix 服务端和客户端

yum install zabbix-server-mysql zabbix-agent -y

安装 centos scl

yum install centos-release-scl -y

安装 Zabbix Web

yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl -y

安装Zabbix前端软件包

yum install zabbix-web-mysql-scl zabbix-apache-conf-scl

安装 Mariadb 服务器

yum install mariadb-server mariadb -y
systemctl restart mariadb
mysql_secure_installation 设置密码: 

五、创建 Zabbix 用户

create database zabbix character set utf8 collate utf8_bin;
create user zabbix@localhost identified by '';
grant all privileges on zabbix.* to zabbix@localhost;
flush privileges;

六、导入初始数据

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uroot -pKino123. zabbix

七、Zabbix server 配置修改

vim /etc/zabbix/zabbix_server.conf
DBPassword=密码

八、更改fpm配置

vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
listen.acl users = apache,nginx
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[max_input_vars] = 10000
php_value[data.timezone] = Asia/Shanghai

九、启动Zabbix server和agent进程

启动Zabbix server和agent进程,并为它们设置开机自启:

systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm

访问网页体验zabbix5.0