你好,游客 登录 注册 搜索
背景:
阅读新闻

Zabbix3.0之Server端安装部署详解

[日期:2017-06-19] 来源:Linux社区  作者:6528161 [字体: ]

Zabbix3.0之Server端部署详解

yum 配置

注意:所有的localhost建议换成IP,否则有时候会报错

建议命令改,也可以手动改
直接命令改,简单,高效
[root@localhost conf]# vim /etc/httpd/conf.d/zabbix.conf [root@localhost conf]# sed -i 's@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g' /etc/httpd/conf.d/zabbix.conf[root@localhost conf]#

数据库配置

CentOS7上如果通过yum安装的话,已经找不到了MySQL已经变成了mariadb。所以启动方式有略有不同

启动数据库

  •  [root@localhost conf]# systemctl start mariadb

  •  创建zabbix所用数据库

  •  

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all on zabbix.* to zabbix@'localhost' identified by '123456';Query OK, 0 rows affected (0.00 sec)
  •  导入数据库

[root@localhost conf]# cd /usr/share/doc/zabbix-server-mysql-3.0.9/[root@localhost zabbix-server-mysql-3.0.9]# zcat create.sql.gz |mysql -uzabbix -p123456 zabbix[root@localhost zabbix-server-mysql-3.0.9]#
  •  修改配置文件

  • vim /etc/zabbix/zabbix_server.conf

  •  DBHost=localhost #数据库所在主机IP

  •  DBName=zabbix #数据库名

  •  DBUser=zabbix #数据库用户

  •  DBPassword=*******#数据库密码

  •  更改完毕后,重启zabbix服务

  •  因为之前实验环境,先关闭Nginx服务,在启动Apache服务

  •  [root@localhost zabbix-server-mysql-3.0.9]# /usr/local/nginx/sbin/nginx -s stop

  •  [root@localhost zabbix-server-mysql-3.0.9]# systemctl start httpd

启动zabbix服务

  •  [root@localhost zabbix-server-mysql-3.0.9]# systemctl start zabbix-server

浏览器查看界面

界面配置信息

Welcome Check of pre-requisites Configure DB connection Zabbix server details Pre-installation summary Install Pre-installation summary

Please check configuration parameters. If all is correct, press "Next step" button, or "Back" button to change configuration parameters.

Database type MySQL Database server 172.16.1.200 Database port default Database name zabbix Database user zabbix Database password ******

Zabbix server localhost Zabbix server port 10051 Zabbix server name zabbix-server

修改agent配置文件

  •  [root@localhost zabbix-server-mysql-3.0.9]# vim /etc/zabbix/zabbix_agentd.conf

  •  重启服务

  •  [root@localhost zabbix-server-mysql-3.0.9]# systemctl start zabbix-agent

  •  查看端口

[root@localhost zabbix-server-mysql-3.0.9]# ss -lstp |egrep -e "10050|10051"LISTEN     0      128                     *:10050                    *:*        users:(("zabbix_agentd",46212,4),("zabbix_agentd",46211,4),("zabbix_agentd",46210,4),("zabbix_agentd",46209,4),("zabbix_agentd",46208,4),("zabbix_agentd",46207,4))
LISTEN     0      128                     *:10051                    *:*        users:(("zabbix_server",45965,5),("zabbix_server",45964,5),("zabbix_server",45963,5),("zabbix_server",45949,5),("zabbix_server",45948,5),("zabbix_server",45947,5),("zabbix_server",45946,5),("zabbix_server",45945,5),("zabbix_server",45944,5),("zabbix_server",45943,5),("zabbix_server",45942,5),("zabbix_server",45941,5),("zabbix_server",45940,5),("zabbix_server",45939,5),("zabbix_server",45938,5),("zabbix_server",45937,5),("zabbix_server",45936,5),("zabbix_server",45935,5),("zabbix_server",45934,5),("zabbix_server",45933,5),("zabbix_server",45932,5),("zabbix_server",45931,5),("zabbix_server",45930,5),("zabbix_server",45929,5),("zabbix_server",45928,5),("zabbix_server",45927,5),("zabbix_server",45922,5))
LISTEN     0      128                    :::10050                   :::*        users:(("zabbix_agentd",46212,5),("zabbix_agentd",46211,5),("zabbix_agentd",46210,5),("zabbix_agentd",46209,5),("zabbix_agentd",46208,5),("zabbix_agentd",46207,5))
LISTEN     0      128                    :::10051                   :::*        users:(("zabbix_server",45965,6),("zabbix_server",45964,6),("zabbix_server",45963,6),("zabbix_server",45949,6),("zabbix_server",45948,6),("zabbix_server",45947,6),("zabbix_server",45946,6),("zabbix_server",45945,6),("zabbix_server",45944,6),("zabbix_server",45943,6),("zabbix_server",45942,6),("zabbix_server",45941,6),("zabbix_server",45940,6),("zabbix_server",45939,6),("zabbix_server",45938,6),("zabbix_server",45937,6),("zabbix_server",45936,6),("zabbix_server",45935,6),("zabbix_server",45934,6),("zabbix_server",45933,6),("zabbix_server",45932,6),("zabbix_server",45931,6),("zabbix_server",45930,6),("zabbix_server",45929,6),("zabbix_server",45928,6),("zabbix_server",45927,6),("zabbix_server",45922,6))
[root@localhost zabbix-server-mysql-3.0.9]#

更多Zabbix相关教程集合

Ubuntu 14.04下Zabbix2.4.5 源码编译安装  http://www.linuxidc.com/Linux/2015-05/117657.htm

CentOS 7 LNMP环境搭建Zabbix3.0  http://www.linuxidc.com/Linux/2017-02/140134.htm

Ubuntu 16.04安装部署监控系统Zabbix2.4  http://www.linuxidc.com/Linux/2017-03/141436.htm

Zabbix监控安装部署及警报配置  http://www.linuxidc.com/Linux/2017-03/141611.htm

Zabbix触发器表达式详解 http://www.linuxidc.com/Linux/2017-03/141921.htm

Ubuntu 16.04下安装部署Zabbix3.0  http://www.linuxidc.com/Linux/2017-02/140395.htm

CentOS 6.3下Zabbix监控apache server-status http://www.linuxidc.com/Linux/2013-05/84740.htm

CentOS 7 下 Zabbix 3.0安装详解 http://www.linuxidc.com/Linux/2017-03/141716.htm

64位CentOS 6.2下安装Zabbix 2.0.6   http://www.linuxidc.com/Linux/2014-11/109541.htm

ZABBIX 的详细介绍请点这里
ZABBIX 的下载地址请点这里

本文永久更新链接地址http://www.linuxidc.com/Linux/2017-06/144956.htm

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款