Zabbix server 3.2安装部署
zabbix server
前提环境:
CentOS 6
Lnmp
php需要的包(bcmath,mbstring,sockets,gd,libxml,xmlwriter,xmlreader,ctype,session,gettext) # gettext多语言支持
版本:Zabbix-3.2.3
server安装
yum install -y net-snmp \
net-snmp-devel
cd /usr/local/src/zabbix-3.2.
./configure --prefix=/usr/local/zabbix \
--enable-server \
--enable-agent \
--with-mysql=/usr/local/mysql/bin/mysql_config \
--with-net-snmp \
--with-libcurl \
--with-libxml2 \
--with-openssl
make && make install
--enable-server zabbix服务端
--enable-agent zabbix客户端
修改php配置文件(php.ini)
memory_limit=128M
post_max_size=16M
upload_max_filesize=2M
max_execution_time=
max_input_size=
session.auto_start = 0
mbstring.func_overload = 0
always_populate_raw_post_data = -1
创建用户(服务器端 客户端都需要创建 默认运行用户是zabbix)
useradd -M -s /sbin/nologin zabbix
初始化数据库
zabbix server,proxy需要数据库
agent不需要
proxy只需要导入一个sql文件,server需要导入三个sql文件
proxy:
database/mysql/schema.sql
server:
database/mysql/schema.sql
database/mysql/images.sql
database/mysql/data.sql
配置zabbix server
/usr/local/zabbix/etc/zabbix_server.conf
LogFile=/tmp/zabbix_server.log
DBHost=localhost
DBName=zabbix
DBUser=root
DBPassword=
DBSocket=/tmp/mysql.sock
启动zabbix server
/usr/local/zabbix/sbin/zabbix_server
配置zabbix server访问站点
copy前端文件
mkdir /storage/www/zabbix
cp -rp frontends/php/* /storage/www/zabbix
/usr/local/nginx/conf/nginx.conf
server
{
listen ;
server_name monitor.zabbix.com;
#access_log off;
root /storage/www/;
error_page /50x.html;
location = /50x.html {
root html;
}
location /
{
index index.php index.html;
}
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
配置访问zabbix
一、在线配置(图形界面形式 最终程序也是写入参数到zabbix.conf.php 会有各模块错误检查)
用户zabbix需要对zabbix.conf.php的写权限
monitor.zabbix.com
二、直接手动修改zabbix.conf.php配置文件
/storage/www/zabbix/conf/zabbix.conf.php
<?php
// Zabbix GUI configuration file.
global $DB; $DB['TYPE'] = 'MYSQL'; # 数据库类型
$DB['SERVER'] = 'localhost'; # mysql host
$DB['PORT'] = ''; # mysql port 我们设置的是unix socket访问方式 所以不需要修改为3306
$DB['DATABASE'] = 'zabbix'; # 具体数据库
$DB['USER'] = 'root'; # mysql user
$DB['PASSWORD'] = '123456'; # mysql pass ?>
登录语言选择
查看配置中是否开启了中文
include/locales.inc.php
'zh_CN' => ['name' => _('Chinese (zh_CN)'), 'display' => true],
中文乱码解决
找到本地C:\Windows\Fonts\simkai.ttf(楷体)上传到服务器zabbix网站目录fonts目录下
修改配置文件
cd /storage/www/zabbix && sed -i 's/DejaVuSans/simkai/g' ./include/defines.inc.php
zabbix agent
agent安装
cd /usr/local/src/zabbix-3.2.3
./configure --prefix=/usr/local/zabbix-agent \
--enable-agent
make && make install
创建用户(服务器端 客户端都需要创建 默认运行用户是zabbix)
useradd -M -s /sbin/nologin zabbix
配置zabbix agent
/usr/local/zabbix-agent/etc/zabbix_agentd.conf
LogFile=/tmp/zabbix_agentd.log
Server=172.18.2.196 # zabbix server ip
#ServerActive=172.18.2.196 # 主动模式
Hostname=test6 # 客户端主机名(执行hostname命令所得)
Include=/usr/local/zabbix-agent/etc/zabbix_agentd.conf.d/ # 其它监控模块的路径
启动zabbix agent
/usr/local/zabbix-agent/sbin/zabbix_agentd
ALL(server,agent)
启动脚本
misc/init.d 有多个linux发行版的init脚本(需要自行修改程序路径)
测试
server(zabbix_get 获取客户端item值)
zabbix_get -s (agent ip) -p (agent port) -k "item-key"
example: zabbix_get -s 127.0.0.1 -p 10050 -k "system.uname"
agent(zabbix_agentd 获取item值)
zabbix_agentd -t "item-key"
example: zabbix_agentd -t "system.uname"
ps:本文所有的相对路径以源码解压缩路径(/usr/local/src/zabbix-3.2.3)为起点
参考:https://www.zabbix.com/documentation/3.2/manual/installation/install
Zabbix server 3.2安装部署的更多相关文章
- SQL Server Compact免安装部署
原文:SQL Server Compact免安装部署 情况 应用程序中的EF使用了SQL Server Compact,打包部署到客户机器上后提示数据库连接异常,信息类似”配置节“.”Provider ...
- Entity Framework6使用SQL Server Compact免安装部署
原文:Entity Framework6使用SQL Server Compact免安装部署 使用Nuget安装以下包: EntityFramework.6.0.2 EntityFramework.Sq ...
- 原创:CentOS 环境中 Zabbix 3.4 的安装部署实践
IT管理工作中,如果没有对服务器.网络设备.服务.进程.应用等的监控,往往是用户发送问题报告后才知道出了问题.事后救火显得被动,不能从容面对问题. 才有了部署一套网络监控系统的想法,机缘巧合下结识了Z ...
- WIN中SharePoint Server 2010 入门安装部署详解
目前流行的原始安装文件基本都是这样的:Windows Server 2008 R2+SQL Server 2008R2+SharePoint Server 2010 这个初始环境原本也无可厚非 ...
- zabbix server源码安装
一.准备工作 yum -y install net-snmp-devel php-bcmath php-ctype php-xml php-xmlreader php-xmlwriter php-se ...
- Zabbix server(离线版)安装手册
由于zabbix server需要依赖MySQL及PHP的相关依赖,因此需要先安装好MySQL及PHP的相关依赖后方可安装zabbixserver. 安装MySQL 目录mysql下的rpm 1.新建 ...
- zabbix server、agent安装及使用
先准备yum源,当然你有打好的rpm包那更好 [root@linux-node1 ~]# cat /etc/yum.repos.d/zabbix.repo [zabbix] name=Zabbix O ...
- Windows Server 2012 R2安装部署Office Web Apps Server
微软官方参考地址https://technet.microsoft.com/zh-cn/library/jj219455.aspx,建议参考官方说明. 注意:每一步进行完成后重启服务器!!! 一. ...
- Vcenter server 5.5安装部署
1.安装VMware ESXi Server 虚拟主机安装方法请看本人博客 "实践记忆": http://www.cnblogs.com/zoulongbin/p/5896836. ...
随机推荐
- python-运算、分支、深浅拷贝
算术表达式: + - * / 除法Python3中是默认向浮点数靠拢 //取整运算 结果的最小整数靠拢 向下 5 // 2 = 2(向下取整) %取余运算 5 % 2 = 1 **幂值运算 ...
- ubuntu 18.04在更新软件库时出现E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet...
1.完整的错误信息如下: E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease i ...
- Package Manager Console的使用
Find-Package PM> Find-Package autofac https://docs.microsoft.com/en-us/nuget/tools/ps-ref-find-pa ...
- ElasticSearch集群故障案例分析: 警惕通配符查询
最近ElasticSearch集群出现了 https://elasticsearch.cn/article/171 文章中描述的情况,现在转载全文警示下自己. 许多有RDBMS/SQL背景的开发者,在 ...
- 2017 ACM/ICPC Asia Regional Qingdao Online - 1008 Chinese Zodiac
2017-09-17 13:28:04 writer:pprp 签到题:1008 Chinese Zodiac #include <iostream> #include <strin ...
- spring boot2.1读取 apollo 配置中心3
上篇记录了springboot读取apollo的配置信息,以及如何获取服务端的推送更新配置. 接下来记录一下,如何获取公共namespace的配置. 上文中使用如下代码共聚公共命名空间的配置: @Ap ...
- Android Fragment解析(下)
今天被人问到了什么是Fragment,真是一头雾水,虽然以前也用到过,但不知道它是叫这个名字,狂补一下. 以下内容来自互联网,原文链接:http://blog.csdn.net/lmj62356579 ...
- 设计模式--观察者模式C++实现
观察者模式C++实现 1定义 Observer/Publish/subscribe发布订阅模式 定义对象间一种一对多的依赖关系,使得当一个对象改变状态时,所有依赖他的对象都能获得通知并被自动更新 2类 ...
- Light oj 1379 -- 最短路
In Dhaka there are too many vehicles. So, the result is well known, yes, traffic jam. So, mostly peo ...
- UVA-11374 Airport Express (dijkstra+枚举)
题目大意:n个点,m条无向边,边权值为正,有k条特殊无向边,起止点和权值已知,求从起点到终点的边权值最小的路径,特殊边最多只能走一条. 题目分析:用两次dijkstra求出起点到任何一个点的最小权值, ...