首页 > 其他分享 >zabbix proxy 安装

zabbix proxy 安装

时间:2022-11-04 12:03:13浏览次数:42  
标签:0.1 server zabbix proxy mysql mariadb 安装

zabbix proxy 4.0.x 安装

# 官方安装参考链接:
https://www.zabbix.com/download?zabbix=4.0&os_distribution=centos&os_version=7&components=proxy&db=mysql&ws=

# Install Zabbix repository
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm
yum clean all

# Install Zabbix proxy
yum install zabbix-proxy-mysql -y

# 安装、初始化数据库。Zabbix-proxy也要连接一个数据库,一般安装在本地即可。
yum install -y mariadb*  # (其实只下载mariadb、mariadb-server、mariadb-devel也可)
systemctl start mariadb
systemctl enable mariadb

#mysql_secure_installation 设置mysql账户root密码

# 也可以直接设置mysql密码,mariadb 如果在本机是第一次安装,是没有密码滴,可以直接设置;如果在本机是再次安装,需要删除之前mysql的数据
/usr/bin/mysqladmin -u root password 'newpassword'

# Create initial database
mysql -uroot -p
newpassword
MariaDB [(none)]> create database zabbix_proxy character set utf8 collate utf8_bin;
MariaDB [(none)]> create user zabbix_proxy@localhost identified by 'zabbix_proxy';
MariaDB [(none)]> grant all privileges on zabbix_proxy.* to zabbix_proxy@localhost;
MariaDB [(none)]>  flush privileges;

# 导入 zabbix proxy 表结构
zcat /usr/share/doc/zabbix-proxy-mysql*/schema.sql.gz | mysql -uzabbix -p zabbix_proxy

# 修改 zabbix proxy 配置文件
/etc/zabbix/zabbix_proxy.conf
Server=127.0.0.1 # zabbix server IP地址
DBName=zabbix_proxy
DBUser=zabbix_proxy
DBPassword=zabbix_proxy

# 启动 zabbix proxy
systemctl restart zabbix-proxy
systemctl enable zabbix-proxy

# 查看 zabbix proxy启动进程
[root@ip-10-23-12-6 ec2-user]# ps axu |grep zabbix
zabbix    3534  0.0  0.2 228660  8496 ?        S    03:40   0:00 /usr/sbin/zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf

# 查看 zabbix proxy 日志
[root@ip-10-23-12-6 ec2-user]# tail -5 /var/log/zabbix/zabbix_proxy.log
  3547:20221104:035046.808 cannot send proxy data to server at "127.0.0.1": empty string received
  3547:20221104:035047.808 cannot send proxy data to server at "127.0.0.1": empty string received
  3547:20221104:035048.809 cannot send proxy data to server at "127.0.0.1": empty string received
  3547:20221104:035049.809 cannot send proxy data to server at "127.0.0.1": empty string received
  3547:20221104:035050.810 cannot send proxy data to server at "127.0.0.1": empty string received

标签:0.1,server,zabbix,proxy,mysql,mariadb,安装
From: https://www.cnblogs.com/Star-Haitian/p/16857282.html

相关文章

  • playwright安装提示:BEWARE: your OS is not officially supported by Playwright; do
    背景在我们执行playwrightinstall的时候会提示:yourOSisnotofficiallysupportedbyPlaywright;downloadingfallbackbuild解决办法这个不需要解决哈,忽略提......
  • android 手机 apk安装失败对应码
    下面是从网上找到的几种常见的错误及解决方法:1、INSTALL_FAILED_INVALID_APK:无效的安装包,安装包已损坏请检查安装包是否完整。如果是xpk包,可以通过手动安装xpk来检测一......
  • Docker安装Harbor证书:Error response from daemon: Get "https://xx.xx.xx/v2/": x509
    自建harbor仓库ssl证书过期之后,更换了ssl证书。jenkins流水线无法登录harbor镜像仓库、且无法拉取镜像时报,报错信息如下:Errorresponsefromdaemon:Get"https://xx.......
  • prometheus 监控案例-Tomcat、Redis、Mysql、Haproxy、Nginx
    服务监控  可以根据prometheus官网找到对应服务的exporter  https://prometheus.io/docs/instrumenting/exporters/监控Tomcat容器  基于第三方exporter实现......
  • Docker安装Nacos
    创建本地的映射文件mkdir-p/root/nacos/init.d/root/nacos/logstouch/root/nacos/init.d/custom.properties在文件中写入配置management.endpoints.web.expo......
  • 安装 poetry 环境
    Poetryisatoolfor dependencymanagement and packaging inPython.Itallowsyoutodeclarethelibrariesyourprojectdependsonanditwillmanage(inst......
  • Linux 服务器安装和配置jenkins
    目录jdk安装jenkins下载安装启动浏览器打开Jenkinsjdk安装yuminstalljava-1.8.0-openjdk*-y验证是否安装成功java-version能查到版本号说明安装成功jenkin......
  • Linux服务器安装tomcat
    1.下载对应jre版本的tomcat   2.将tomcat上传至linux服务器,并解压tar-zxvfapache-tomcat-6.0.53.tar.gzmvapache-tomcat-6.0.53.tar.gztomcat6  //将文件......
  • ubuntu20.04 从安装 kvm、qemu、libvirt 到进入虚拟机
    安装环境可行性检测验证CPU是否支持硬件虚拟化grep-Eoc'(vmx|svm)'/proc/cpuinfo//数字大于0,则代表CPU支持硬件虚拟化,反之则不支持检查VT是否在BIOS中启用a......
  • pip安装软件正确姿势
    问题xs@xs:~/project/report-api_gd$pipinstallraven==6.1.0Collectingraven==6.1.0 Retrying(Retry(total=4,connect=None,read=None,redirect=None,status=N......