
文章目录
安装 zabbix
zabbix4.0安装文档
https://www.zabbix.com/documentation/4.0/manual/installation/install_from_packages/rhel_centos
安装 zabbix yum 源
wget -P /etc/yum.repos.d/ http://down.whsir.com/downloads/zabbix.repo
安装 zabbix相关包
yum -y install zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql mariadb-server
数据库相关操作
systemctl start mariadb && mysql -e "create database zabbix character set utf8 collate utf8_bin;grant all on zabbix.* to zabbix@'127.0.0.1' identified by 'zabbix';flush privileges;"
配置文件 zabbix_server.conf
- 指定zabbix连接的数据库的主机
- 指定zabbix连接是哪个数据库
- 指定zabbix用哪个数据库账号
- 指定数据库用户的密码
vim /etc/zabbix/zabbix_server.conf
DBHost=127.0.0.1
DBName=zabbix
DBPassword=zabbix
DBUser=zabbix
启动 zabbix-server
systemctl start zabbix-server
查看进程服务没有起来

查看日志
tailf /var/log/zabbix/zabbix_server.log

使用 MySQL 来导入 Zabbix server 的初始数据库 schema 和数据
zcat /usr/share/doc/zabbix-server-mysql-4.0.18/create.sql.gz |mysql -uzabbix -pzabbix -h127.0.0.1 zabbix
再次启动服务 zabbix-server
systemctl start zabbix-server

监听 10051端口

配置文件 zabbix_agent.conf
- 指定服务端是谁
- 指定工作模式
主动模式
被动模式
vim /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1
ServerActive=127.0.0.1
启动服务 zabbix_agent
systemctl start zabbix-agent.service

启动服务 httpd
systemctl enable --now httpd
浏览器访问
http://192.168.43.19/zabbix/setup.php


vim /etc/php.ini
date.timezone=Asia/Shanghai
systemctl restart httpd





注意:默认用户名:Admin(区分大小写),密码:zabbix
修改密码和语言


958

被折叠的 条评论
为什么被折叠?



