• zabbix安装


    iso:centos7.9mini

     

    1.1 关闭SeLinux
    setenforce 0          #临时关闭

    vi /etc/selinux/config
    #永久关闭:关闭SELINUX
    SELINUX=disabled

    1.2 关闭firewalld
    systemctl stop firewalld.service          #临时关闭firewalld
    systemctl disable firewalld.service       #永久关闭firewalld

    1.3 安装apache
    yum install httpd       #使用yum安装httpd
    systemctl enable httpd     #设置开机自启httpd
    systemctl start httpd      #开启httpd服务
    systemctl status httpd     #查看httpd服务状态

    af47271438c631d22649ee7273d5d8e3.png 1.4 安装mysql
    yum install mariadb mariadb-server    #yum安装mariadb
    systemctl enable mariadb        #设置开机自启服务
    systemctl start mariadb         #开机mariadb服务
    systemctl status mariadb        #查看mariadb状态

     

     

    1.5 安装php环境
    yum install php php-mysql 

    1.6 安装zabbix
    rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm

    #这里我遇到了一个报错,提示找不到这些包,我们可以更改为阿里源试下

    报错如下:

    解决如下:

    [root@ceshi yum.repos.d]# cat zabbix.repo
    [zabbix]
    name=Zabbix Official Repository - $basearch
    #baseurl=http://repo.zabbix.com/zabbix/3.4/rhel/7/$basearch/
    baseurl=https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/7/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

    [zabbix-non-supported]
    name=Zabbix Official Repository non-supported - $basearch
    #baseurl=http://repo.zabbix.com/non-supported/rhel/7/$basearch/
    baseurl=https://mirrors.aliyun.com/zabbix/non-supported/rhel/7/$basearch/
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
    gpgcheck=1

    yum install zabbix-server-mysql zabbix-get zabbix-web zabbix-web-mysql zabbix-agent zabbix-sender  #再次安装

    8d517b763e26fcd02534d9e3d48efc3f.png 8f7800ba7f81d6446a9a47f8ddbef0ae.png

     

    创建一个zabbix库并设置为utf8的字符编码格式

    create database zabbix character set utf8 collate utf8_bin;

    创建账户并且授权设置密码
    grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';

    flush privileges;

    导入表
    cd /usr/share/doc/zabbix-server-mysql-3.4.15/

    进行解压
    gunzip create.sql.gz

     #进入mysql17931ecd67620ab3cebac28f2bf3724a.png

     

    1.7 配置zabbix server配置文件
    #配置文件目录

    cd /etc/zabbix/
    [root@ceshi zabbix]# ls
    web  zabbix_agentd.conf  zabbix_agentd.d  zabbix_server.conf

    #对zabbix_server.conf进行配置
    DBHost=localhost
    DBName=zabbix
    DBUser=zabbix
    DBPassword=zabbix
    DBSocket=/var/lib/mysql/mysql.socka4335a0ae5f350851a040c99b82fc920.pnge686c0a03b0df5b36032573cfc481110.png

     开机自启zabbix-server服务
    systemctl start zabbix-server   #开启服务
    systemctl enable zabbix-server  #设置开机自启
    systemctl status zabbix-server  #查看服务状态

    1.8 配置php
    cd /etc/httpd/conf.d

    [root@ceshi conf.d]# ls
    autoindex.conf  php.conf  README  userdir.conf  welcome.conf  zabbix.conf

    vi zabbix.conf

    # php_value date.timezone Europe/Riga
    php_value date.timezone Asia/Shanghai1d42a904c366f7aab0edd0bb6e6c83ae.png

    1.8 登陆zabbix网址设置
    https://192.168.3.30/zabbix

     9415c7d312fcf7bbd90e2f389f706ed0.png

    操作如下:

    输入我们之前设置的密码:zabbix

    默认用户:Admin

    默认密码:zabbix 

  • 相关阅读:
    idea中maven优先从本地仓库寻找依赖包的配置
    为什么u盘在mac上显示不出来
    [webservice] springboot整合cxf
    ubuntu20.04安装教程
    观察者模式-对象间的联动
    DataGrip操作Oracle
    52_数据结构
    c++源码编译过程(翻译阶段)的若干细节概要
    日志平台搭建第四章:Linux安装kibana
    护眼灯什么颜色的灯光好?2022年平价护眼台灯推荐
  • 原文地址:https://blog.csdn.net/dacming/article/details/127776760