zoukankan      html  css  js  c++  java
  • Ubuntu 搭建zabbix

    查看是否安装了MySQL:sudo netstat -tap |grep mysql

     

    开启php命令:/etc/init.d/php7-0.fpm restart

    sudo apt-get install zabbix-server-mysql

     

    Windows安装agent

    https://www.cnblogs.com/kevingrace/p/7754909.html

    mysql> CREATE DATABASE zabbixdb;   //创建数据库zabbixdb

    mysql> GRANT ALL on zabbixdb.*  to zabbix@localhost IDENTIFIED BY 'password';

    /*创建数据库用户zabbix,密码password,授权zabbix访问zabbixdb*/

    mysql> FLUSH PRIVILEGES;   //更新授权信息

    ---------------------

    (原文:https://blog.csdn.net/u014130786/article/details/80475206)

      

    b. 安装Zabbix server,Web前端,agent

    # apt -y install zabbix-server-mysql zabbix-frontend-php zabbix-agent

    c. 创建初始数据库

    # mysql -uroot -p
    my7526407

    mysql> create database zabbix character set utf8 collate utf8_bin;

    我设置的是:把数据库zabbix_server 的所有东西 授权给zabbix这个用户 用户密码是 my7526407

    mysql>grant all privileges on zabbix_server.* to zabbix@localhost identified by 'my7526407';

    mysql>exit;

    导入初始架构和数据,系统将提示您输入新创建的密码。

    # zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

     

    这里输入的密码是上面创建数据库的时候的密码 my7526407

    为Zabbix server配置数据库

    编辑配置文件 /etc/zabbix/zabbix_server.conf

    DBHost=localhost

     DBName=zabbix_server

    DBUser=zabbix

    DBPassword=my7526407

    为Zabbix前端配置PHP

    编辑配置文件 /etc/zabbix/apache.conf, uncomment and set the right timezone for you.

    # php_value date.timezone Asia/Shanghai

    启动Zabbix server和agent进程

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

    # systemctl restart zabbix-server zabbix-agent apache2
    # systemctl enable zabbix-server zabbix-agent apache2

    进入web页面完成安装,web访问地址http://localhost/zabbix/

    完成安装后web登陆的用户是Admin,密码zabbix

     

     

     

     

           

  • 相关阅读:
    104. 二叉树的最大深度
    Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
    python-admin管理后台
    django-cookies 和session
    django-关系映射
    django-关系映射 一对一 一对多 多对多
    django-Meta类
    django-orm聚合查询和原生数据库查询
    django-F对象、Q对象
    django-orm删除数据
  • 原文地址:https://www.cnblogs.com/wsnan/p/11070855.html
Copyright © 2011-2022 走看看