软件环境

Centos7.3

LAMP

Zabbix 3.2

 1. Installing repository configuration package

Install the repository configuration package. This package contains yum (software package manager) configuration files.

# rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

Now you are ready to install Zabbix server with MySQL or server with PostreSQL, agent and proxy.

2. Installing apache and php

[root@localhost ~]# yum -y install httpd php php-mysql php-mbstring php-gd php-bcmath php-ldap php-xml

2.1 配置php时区参数

(a) php.ini

(b) /etc/httpd/conf.d/zabbix.conf

php_value date.timezone Asia/Shanghai

2.2 启动web服务

[root@localhost ~]# systemctl start httpd.service

# systemctl enable httpd.service

3. Installing mariadb  

# yum -y install mariadb mariadb-server

# systemctl start mariadb.service

# systemctl enable mariadb.service

4. Installing Zabbix server and web packages

# yum -y install zabbix-server-mysql zabbix-web-mysql  zabbix-agent

4.1 Creating initial mariadb database

# mysql_secure_installation

# mysql -u root -p <root_password>

mysql> create database zabbix character set utf8 collate utf8_bin;

mysql> create user 'zabbix'@'localhost' identified by 'zabbix_password';

mysql> create user 'zabbix'@'192.168.1.%' identified by 'zabbix_password';

mysql> grant all on zabbix.* to ‘zabbix’@‘localhost';

mysql> grant all on zabbix.* to ’zabbix‘@‘192.168.1.%’;
mysql> quit

4.2 Now import initial schema and data. Make sure to insert correct version for 3.2.*. You will be prompted to enter your newly created password.

In order to check the version you have in your package, use the following command:

# rpm -q zabbix-server-mysql

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

5. Database configuration for Zabbix server

Edit server host name, user and password in zabbix_server.conf as follows, where DBPassword is the password you've set creating initial database:

# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost ##database host name
DBName=zabbix ##database name
DBUser=zabbix   ##database user name
DBPassword=<zabbix_password>   ##database user password

5.1Starting Zabbix server 

It's time to start Zabbix server process and make it start at system boot:

# systemctl start zabbix-server
# systemctl enable zabbix-server

5.2 PHP configuration for Zabbix web

Apache configuration file for Zabbix frontend is located in /etc/httpd/conf.d/zabbix.conf. Some PHP settings are already configured.

But it's necessary to uncomment the "date.timezone" setting and set the right timezone for you.

php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
# php_value date.timezone Europe/Riga

5.3 SELinux configuration

Having SELinux status enabled in enforcing mode, you need to execute the following command to enable successful connection of Zabbix frontend to the server:

# setsebool -p httpd_can_network_connect on

# setsebol -p http_can_connect_zabbix on

# setsebool -p -p zabbix_can_network on

5.4 Firwall configuration

#f irewall-cmd --permanent --add-port=80/tcp

# firewall-cmd --permanent --add-port=443/tcp

# firewall-cmd --permanent --add-port=10050-10052/tcp

# firewall-cmd  --reload

As frontend and SELinux configuration is done, you need to restart Apache web server:

# systemctl restart httpd

# systemctl restart zabbix-server

# systemctl restart zabbix-agent

5.5 Installing and configuration Zabbix-web

webUI site: http://IP/zabbix

username:Admin

password: zabbix

Zabbix web configuration file

# cat /etc/zabbix/web/zabbix.config.php

Zabbix Server 3.2的更多相关文章

  1. [原创] zabbix学习之旅六:如何解决zabbix server在内网,而邮件发送服务器在外网的问题

    通过前面的文章,你已经可以快速地搭建一个报警系统,并能正常的收到报警邮件了.不过在很多企业级环境下,邮件发送服务器往往放在外网,而zabbix server放置在内网,在这种情况下,zabbix的报警 ...

  2. 基于LNMP的Zabbbix之Zabbix Server源码详细安装,但不给图

    Zabbix Server安装 看到那里有错或者有什么问题的话,求指点 邮箱:losbyday@163.com 上一篇PHP源码安装参见基于LNMP的Zabbbix之PHP源码安装:https://i ...

  3. zabbix server安装详解

    简介 zabbix(音同 zæbix)是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案. zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以 ...

  4. Zabbix(二) : Zabbix Server端配置文件说明

    Zabbix Server端配置文件说明 # This is a configuration file for Zabbix Server process # To get more informat ...

  5. zabbix server总是stoped,找到此方法解决了问题

    zabbix日志报错: One child process died (PID:8885,exitcode/signal:1). Exiting ... syncing history data... ...

  6. Zabbix监控之迁移zabbix server

    abbix监控中有时会根据需要对zabbix服务器进行迁移,zabbix迁移是非常简单的,因为zabbix的前端所有的操作都存在zabbix数据库里.所以zabbix迁移只需对zabbix库中相应的表 ...

  7. docker 一键安装zabbix server、zabbix agent

    基本原理.须知:1.zabbix 分为zabbix server和zabbix agent,其中zabbix server需要web环境,并且其数据存储在独立的数据库中:2.docker是一种容器服务 ...

  8. Zabbix Server端配置文件说明

    zabbix作为运维邻域不可缺少的一员,它的各种文档可是数不胜数啊,但是关于配置文件的解释与说明就有点少.这里列出zabbix配置文件篇之zabbix_server. Zabbix Server端配置 ...

  9. 【Zabbix】Zabbix Server自动发现

    Zabbix自动发现 由于有上百台的虚拟机需要监控,如果一个个去添加配置,费时费力.Zabbix的自动发现,可以自动发现需要监控的机器,监控相应指标. 前置条件 安装部署好Zabbix Server. ...

  10. zabbix Server 4.0 部署及之内置item使用案例

    zabbix Server 4.0 部署及之内置item使用案例 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.zabbix组件架构概述(图片摘自网络) 1>.zabbi ...

随机推荐

  1. vue学习笔记(九)vue-cli中的组件通信

    前言 在上一篇博客vue学习笔记(八)组件校验&通信中,我们学会了vue中组件的校验和父组件向子组件传递信息以及子组件通知父组件(父子组件通信),上一篇博客也提到那是对组件内容的刚刚开始,而本 ...

  2. 数据降维-NMF非负矩阵分解

    1.什么是非负矩阵分解? NMF的基本思想可以简单描述为:对于任意给定的一个非负矩阵V,NMF算法能够寻找到一个非负矩阵W和一个非负矩阵H,使得满足 ,从而将一个非负的矩阵分解为左右两个非负矩阵的乘积 ...

  3. Alertmanager 部署配置

    目录 前言 源码安装 配置 启动 配置prometheus监控Alertmanager 修改prometheus配置 重新加载配置文件 配置测试告警 修改prometheus配置 重新加载配置文件 测 ...

  4. 快捷键 导入命名空间shift +alt

  5. PTA 1139 1138 1137 1136

    PAT 1139 1138 1137 1136 一个月不写题,有点生疏..脑子跟不上手速,还可以啦,反正今天很开心. PAT 1139 First Contact 18/30 找个时间再修bug 23 ...

  6. 56岁潘石屹生日当天宣布要学编程语言Python,网友:地产商来抢码农饭碗了!

    最近在码农界里,一个比较轰动的事情,就是地产大佬潘石屹,在56岁生日当天宣布要学习编程语言Python. 可能部分老铁不认识潘石屹,简单介绍下大佬背景: 潘石屹,1963年11月14日出生于甘肃天水, ...

  7. 用Python调用华为云API接口发短信

    [摘要] 用Python调用华为云API接口实现发短信,当然能给调用发短信接口前提条件是通过企业实名认证,而且有一个通过审核的短信签名,话不多说,showcode #!/usr/bin/python3 ...

  8. js-Date()对象,get/setFullYear(),getDay()编程练习

    啥也不说!看代码 主要注意:getday()方法中原理!!! <!DOCTYPE html> <html lang="en"> <head> & ...

  9. 洛谷 P1920 成功密码 题解

    这是蒟蒻的第一篇题解,(之前的都没过,估计这篇也过不了 回到正题 这题,本蒟蒻第一眼看到以后,就决定咦,这不是模拟吗? 看到世界范围,嗯,打扰了. 扯回正题 首先,暴力肯定是A不了的(至少我A不了 但 ...

  10. [TimLinux] myblog 创建第一个app

    1. 项目结构 项目地址:https://github.com/timscm/myblog.git 2. 启动项目 通过pycharm启动项目,进入调试模式: "D:\Program Fil ...