zoukankan      html  css  js  c++  java
  • Zabbix3.0实战安装部署

    ##########安装zabbix-3.0.19##########
    wget https://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
    rpm -ivh zabbix-release-3.0-1.el7.noarch.rpm 
    yum -y install  zabbix-server zabbix-server-mysql  zabbix-web zabbix-web-mysql;
    
    ##########配置apache##########
    #需要修改主机名和时区
    sed -i "s@^#ServerName www.example.com:80@ServerName localhost:80@g" /etc/httpd/conf/httpd.conf 
    sed -i "s@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g" /etc/httpd/conf.d/zabbix.conf       
    systemctl start httpd
    ^start^enable
    
    ##########配置数据库##########
    yum -y install mariadb-server mariadb
    systemctl start mariadb
    systemctl enable mariadb
    mysql_secure_installation
    mysql -uroot -pmariadb00 -e "create database zabbix character set utf8 collate utf8_bin;grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix00';"
    
    ##########导入zabbix数据库##########
    zcat /usr/share/doc/zabbix-server-mysql-3.0.19/create.sql.gz | mysql -uzabbix -pzabbix00 zabbix
    mysql -uzabbix -pzabbix00 -e "use zabbix;show tables;" | wc -l     #114行
    
    ##########修改zabbix-server配置文件##########
    sed -ir -e "s@^# DBHost=.*@DBHost=localhost@g" 
    -e "s@^# DBPassword=.*@DBPassword=zabbix00@g" 
    -e "s@^DBName=.*@DBName=zabbix@g"  
    -e "s@DBUser=.*@DBUser=zabbix@g" /etc/zabbix/zabbix_server.conf
    systemctl start zabbix-server        #监听端口10051
    ^start^enable
    systemctl start httpd
    ^start^enable
    
    #浏览器开始配置 http://localhost/zabbix 
    #默认zabbix账号: Admin 密码 : zabbix
    
  • 相关阅读:
    linux下安装redis 3.2.1
    redis 登入,检查
    断写了一年的博客~~
    前端面试的感想
    http和web缓存
    http请求报文和响应报文(2)
    http请求报头和响应报头(1)
    网络编程(一)
    防恶意解析,禁止用IP访问网站的Apache设置 修改 httpd.conf 实现
    About English Web Site Font
  • 原文地址:https://www.cnblogs.com/testder/p/9307803.html
Copyright © 2011-2022 走看看