搜档网
当前位置:搜档网 › zabbix安装官方文档中文版

zabbix安装官方文档中文版

zabbix安装官方文档中文版
zabbix安装官方文档中文版

Installation from Source

源代码安装

4.1 软件要求

Building of Zabbix server or agents from sources requires additional software.

用源代码建立Zabbix 服务器或者代理需要的软件。

The following software is required to compile Zabbix (required versions): 下列软件是编译Zabbix所需(所需的版本):

One of the following database engines:

下列的一种数据库引擎:

?IBM DB2 Headers and Libraries - CLI headers and libraries are required.

?IBM DB2头文件和库文件-CLI的头文件和库是必需的。

?MySQL Headers and Libraries.

?MySQL头文件和库。

?Oracle Headers and Libraries - OCI headers and libraries are required.

?Oracle头文件和库- OCI头文件和库是必需的。

?PostgreSQL Headers and Libraries.

?PostgreSQL头文件和库。

?SQLite Headers and Libraries.

?SQLite头文件和库。

Usually provided as part of mysql-dev, postgresql-dev, sqlite3-dev packages.

通常能够提供mysql-dev,postgresql-dev,sqlite3-dev包的一部分。

NET-SNMP (or UCD-SNMP) library and header files.Required for SNMP support.Optional.

Iksemel library and header files.Required to enable Jabber messaging.Optional.

Libcurl library and header files.Required for WEB monitoring module.Optional.

C Compiler. GNU C compiler is the best choice for open platforms. Other (HP, IBM) C compilers may be used as well.

GNU Make. GNU Make is required to process ZabbixMakefiles.

4.2 Structure of Zabbix distribution

Zabbix分布结构的

?src

The directory contains sources for all Zabbix processes except frontends.

?src/zabbix_server

The directory contains Makefile and sources for zabbix_server.

?src/zabbix_agent

The directory contains Makefile and sources for zabbix_agent and zabbix_agentd.

?src/zabbix_get

The directory contains Makefile and sources for zabbix_get.

?src/zabbix_sender

The directory contains Makefile and sources for zabbix_sender.

?include

The directory contains Zabbix include files.

?misc

o misc/init.d

The directory contains start-up scripts for different platforms.

?frontends

o frontends/php

The directory contains files of PHP frontend.

?create

The directory contains SQL script for initial database creation.

?create/schema

Database creation schemas.

?create/data

Data for initial database creation.

?upgrades

The directory contains upgrade procedures for different versions of Zabbix.

4.3 Zabbix Server

Server side

Step 1

Create the Zabbixsuperuser account

This is the user the server will run as. For production use you should create a dedicated unprivileged account ('zabbix' is commonly used). Running Zabbix as 'root','bin', or any other account with special rights is a security risk. Do not do it!

Zabbix server process (zabbix_server) is protected from being run under root account.

If Zabbix server and agent are run on the same machine it is recommended to use a different user for running the server than for running the agent. Otherwise, if both are run as the same user, the agent can access the server configuration file and any Admin level user in Zabbix can quite easily retrieve, for example, the database password.

Extract Zabbix sources

shell> tar -zxf zabbix-1.8.tar.gz

Step 3

Create the Zabbix database

Zabbix comes with SQL scripts used to create the required database schema and also to insert a default configuration. There are separate scripts for IBM DB2, MySQL, Oracle, PostgreSQL and SQLite.

For MySQL:

shell>mysql -u -p

mysql> create database zabbix character set utf8;

mysql> quit;

shell> cd create/schema

shell> cat mysql.sql | mysql -u -pzabbix

shell> cd ../data

shell> cat data.sql | mysql -u -pzabbix

shell> cat images_mysql.sql | mysql -u -pzabbix Step 4

Configure and compile the source code for your system

The sources must be compiled for both the server (monitoring machine) as well as the clients (monitored machines). To configure the source for the server, you must specify which database will be used.

shell> ./configure --enable-server --with-mysql --with-net-snmp

--with-jabber --with-libcurl # for MySQL + Jabber + WEB monitoring

However, if you want to compile client binaries along with server binaries, run:

shell> ./configure --enable-server --enable-agent --with-mysql

--with-net-snmp --with-jabber --with-libcurl

Use flag --enable-static to statically link libraries. If you plan to distribute compiled binaries among different servers, you must use this flag to make these binaries work without required libraries. Note that --enable-static does not work under Solaris.

Make and install everything

shell> make install

By default, make install will install all the files in /usr/local/sbin, /usr/local/lib etc. Make sure that you have enough permissions.

You can specify an installation prefix other than /usr/local using

--prefix, for example --prefix=/home/zabbix. In this case daemon binaries will be installed under /sbin, while utilities under /bin. Man pages will be installed under /share.

Step 6

Configure /etc/services

The step is optional. However, it is recommended. On the client (monitored) machines, add the following lines to /etc/services:

zabbix-agent 10050/tcpZabbix Agent

zabbix-agent 10050/udpZabbix Agent

zabbix-trapper 10051/tcpZabbix Trapper

zabbix-trapper 10051/udpZabbix Trapper

Note that the port numbers are official Zabbix ports registered in IANA.

Step 7

Configure /etc/inetd.conf

If you plan to use zabbix_agent instead of the recommended zabbix_agentd, the following line must be added:

zabbix_agent stream tcp nowait.3600 zabbix /opt/zabbix/bin/zabbix_agent

Restart inetd

shell>killall -HUP inetd

Modify default settings in configuration files

Step 8

Create a location to hold configuration files:

mkdir /etc/zabbix

Step 9

Configure /etc/zabbix/zabbix_agentd.conf

You need to configure this file for every host with zabbix_agentd installed. The file should contain the IP address of the Zabbix server. Connections from other hosts will be denied. You may take

misc/conf/zabbix_agentd.conf as example.

Step 10

Configure /etc/zabbix/zabbix_server.conf

For small installations (up to ten monitored hosts), default parameters are sufficient. However, you should change default parameters to maximize performance of Zabbix. See section [Performance tuning] for more details. You may take misc/conf/zabbix_server.conf as example.

Step 11

Run server processes

Run zabbix_server on server side.

shell> cd sbin

shell> ./zabbix_server

Step 12

Run agents

Run zabbix_agentd where necessary.

shell> cd sbin

shell> ./zabbix_agentd

4.4 Zabbix Proxy

Zabbix Proxy is a special process. It is not required to run Zabbix.

Step 1

Create the Zabbixsuperuser account

This is the user the Proxy will run as. For production use you should create a dedicated unprivileged account ('zabbix' is commonly used). Running Zabbix Proxy as 'root', 'bin', or any other account with special rights is a security risk. Do not do it!

Zabbix Proxy process (zabbix_proxy) is protected from being run under root account.

Step 2

Extract Zabbix sources

shell> tar -zxf zabbix-1.8.tar.gz

Step 3

Create the Zabbix database. Optional.

Zabbix Proxy process will create database automatically on the first run if it does not exist. It will use existing database otherwise. Database auto-creation is supported for SQLite only.

Zabbix comes with SQL scripts used to create the required database schema. There are separate scripts for IBM DB2, MySQL, Oracle, PostgreSQL and SQLite.

For IBM DB2:

shell> db2 "create database zabbix using codeset utf-8 territory us pagesize 32768"

shell> cd create/schema

shell> db2batch -d zabbix -f ibm_db2.sql

For MySQL:

shell>mysql -u -p

mysql> create database zabbix character set utf8;

mysql> quit;

shell> cd create/schema

shell> cat mysql.sql | mysql -u -pzabbix

For Oracle (we assume that user 'zabbix' with password 'password' exists and has permissions to create database objects):

shell> cd create/schema

shell> cat oracle.sql | sqlpluszabbix/password >out.log

Check file out.log for any error messages. Zabbix requires UTF8 database character set. If database is not UTF8 it can be converted by running: ALTER DATABASE NATIONAL CHARACTER SET UTF8;

For PostgreSQL:

shell>psql -U

psql> create database zabbix;

psql> \q

shell> cd create/schema

shell> cat postgresql.sql | psql -U zabbix

For SQLite:

shell> cd create/schema

shell> cat sqlite.sql | sqlite3 /var/lib/sqlite/zabbix.db

The database will be automatically created if it does not exist.

Step 4

Configure and compile the source code for your system

The sources must be compiled to enable compilation of Zabbix Proxy process. To configure the source for the Proxy, you must specify which database will be used.

shell> ./configure --enable-proxy --with-ibm-db2 --with-net-snmp # for IBM DB2 + SNMP monitoring

or

shell> ./configure --enable-proxy --with-mysql --with-net-snmp # for MySQL + SNMP monitoring

or

shell> ./configure --enable-proxy --with-oracle --with-net-snmp # for Oracle + SNMP monitoring

or

shell> ./configure --enable-proxy --with-pgsql --with-net-snmp # for PostgreSQL + SNMP monitoring

or

shell> ./configure --enable-proxy --with-sqlite3 --with-net-snmp # for SQLite3 + SNMP monitoring

Use flag --with-ibm-db2 to specify location of the CLI API.

Use flag --with-oracle to specify location of the OCI API.

Use flag --enable-static to statically link libraries. If you plan to distribute compiled binaries among different hosts, you must use this flag to make these binaries work without required libraries. --enable-static does not work under Solaris. Flag --with-ucd-snmp can be used instead of --with-net-snmp. If no SNMP support required, both --with-net-snmp and --with-ucd-snmp may be skipped.

However, if you want to compile client binaries along with proxy binaries, run:

shell> ./configure --enable-proxy --enable-agent --with-mysql

--with-net-snmp

Parameter --enable-static may be used to force static linkage.

Step 5

Make and install everything

shell> make install

By default, make install will install all the files in /usr/local/sbin, /usr/local/lib etc. You can specify an installation prefix other than /usr/local using --prefix

Step 6

Configure /etc/services

The step is optional. However, it is recommended. On the client (monitored) machines, add the following lines to /etc/services:

zabbix_agent 10050/tcp

zabbix_trap 10051/tcp

Step 7

Configure /etc/inetd.conf

If you plan to use zabbix_agent instead of the recommended zabbix_agentd, the following line must be added:

zabbix_agent stream tcp nowait.3600 zabbix /opt/zabbix/bin/zabbix_agent Restart inetd

shell>killall -HUP inetd

Step 8

Create a location to hold configuration files:

mkdir /etc/zabbix

Configure /etc/zabbix/zabbix_proxy.conf

For small installations (up to ten monitored hosts), default parameters are sufficient. However, you should change default parameters to maximize performance of Zabbix Proxy. Make sure you have correct Hostname and Server parameters set. You may take misc/conf/zabbix_proxy.conf as example.

Step 9

Run Proxy processes

Run zabbix_proxy:

shell> cd sbin

shell> ./zabbix_proxy

4.5 Zabbix Agent

Client side

Step 1

Create the Zabbix account

This is the user the agent will run as. For production use you should create a dedicated unprivileged account (“zabbix” is commonly used). Zabbix agents have protection against running under root account.

Step 2

Extract Zabbix sources

shell> tar -zxf zabbix-1.8.tar.gz

Configure and compile the source code for your system

The sources must be compiled for the client only.

To configure the source for the client:

shell> ./configure --enable-agent

Use flag --enable-static to statically link libraries. If you plan to distribute compiled binaries among different hosts, you must use this flag to make these binaries work without required libraries.

Step 4

Build agent

shell> make

Copy created binaries from bin/ to /opt/zabbix/bin or any other directory. Other common directories are /usr/local/bin or /usr/local/zabbix/bin.

Step 5

Configure /etc/services

The step is not real requirement. However, it is recommended.

On the client (monitored) machines, add the following lines to

/etc/services:

zabbix_agent 10050/tcp

zabbix_trap 10051/tcp

Step 6

Configure /etc/inetd.conf

If you plan to use zabbix_agent instead of the recommended zabbix_agentd, the following line must be added:

zabbix_agent stream tcp nowait.3600 zabbix /opt/zabbix/bin/zabbix_agent Restart inetd

shell>killall -HUP inetd

Create a location to hold configuration files:

mkdir /etc/zabbix

Step 8

Configure /etc/zabbix/zabbix_agentd.conf

You need to configure this file for every host with zabbix_agentd installed. The file should contain IP address of Zabbix server. Connections from other hosts will be denied. You may take

misc/conf/zabbix_agentd.conf as example.

Step 9

Run zabbix_agentd on all monitored machines

shell> /opt/zabbix/bin/zabbix_agentd

You should not run zabbix_agentd if you have chosen to use zabbix_agent! Make sure that your system allows allocation of 2MB of shared memory, otherwise the agent may not start and you will see “Can't allocate shared mem ory for collector.” in agent's log file. This may happen on Solaris 8.

4.6 Zabbix WEB Interface

Step 0

Zabbix frontend is written in PHP, so to run it a PHP supported webserver is needed. Installation is done by simply copying the PHP files into the webserver HTML documents directory. It is suggested to use a subdirectory instead of HTML root.

Common locations of the HTML documents directory for Apache web server include:

?/usr/local/apache2/htdocs (default directory when installing Apache from source)

?/srv/www/htdocs (OpenSUSE, SLES)

?/var/www/html (Fedora, RHEL, CentOS)

?/var/www (Debian, Ubuntu)

To create a subdirectory and copy Zabbix frontend files into it, execute the following commands, replacing with the correct path in your case:

mkdir/zabbix

cd frontends/php

cp -a . /zabbix

When upgrading you simply replace the content of /zabbix with the new files copied over from frontends/php, in this step.

Step 1

Point your browser to Zabbix URL.

Step 2

Read and accept GPL v2.

Step 3

Make sure that all software pre-requisites are met.

Pre-requisite

Minimum value Description PHP version 5.0 PHP Memory limit 8MB In php.ini:

memory_limit = 128M

PHP post max size 8MB In php.ini:

post_max_size = 16M

PHP max execution time 300 seconds In php.ini:

max_execution_time = 300

PHP max input time

300 seconds In php.ini:

max_input_time = 300 PHP database

support One of: IBM DB2, MySQL, Oracle, PostgreSQL, SQLite One of the following modules must be installed: ibm_db2, php-mysql, oci8, php-pgsql, php-sqlite3

PHP BC math Any

Compiled in or separate module php-bcmath. PHP multibyte support Any

Compiled in or separate module php-mbstring. GD Version 2.0 or higher

Module php-gd. Image formats

At least PNG Module php-gd. Step 4

Configure database settings. Zabbix database must already be created.

Step 5

Enter Zabbix Server details.

Step 6

See summary of settings.

Step 7

Download configuration file and place it under conf/.

Step 8

Finishing installation.

Step 9

For distributed monitoring only!

If used in a distributed environment you have to run only once: shell> ./zabbix_server -n

where Node ID is an unique Node identificator. For example:

shell> ./zabbix_server -n 1

This will convert database data for use with Node ID '1' and also adds a local node.

Step 10

Zabbix frontend is ready! Default user name is Admin, password zabbix.

zabbix安装配置

Zabbix 一安装配置: 环境搭建: VMware? Workstation 12 Pro (12.0.0 build-2985596) CentOS-7-x86_64-DVD-1511.iso (user:root password: toor00 ) zabbix-3.0.3.tar 安装过程: Installation from sources You can get the very latest version of Zabbix by compiling it from the sources. A step-by-step tutorial for installing Zabbix from the sources is provided here. 1 Installing Zabbix daemons 1 Download the source archive Go to the Zabbix download page and download the source archive. Once downloaded, extract the sources, by running: $ tar -zxvf zabbix-3.0.0.tar.gz Enter the correct Zabbix version in the command. It must match the name of the downloaded archive. 2 Create user account For all of the Zabbix daemon processes, an unprivileged user is required. If a Zabbix daemon is started from an unprivileged user account, it will

【免费下载】Zabbix安装使用手册

Zabbix安装使用手册 目录 ZABBIX安装使用手册 (1) 1、安装配置POSTGRESQL9.3 (1) 第一部分安装 1、安装配置Postgresql9.3 2、添加zabbix账户、zabbix数据库 psql –U pgsql postgres postgres=# create user zabbix with password ‘zabbix’ postgres=# LOGIN CREATEDB CREATEROLE; CREATE ROLE postgres=# create database zabbix owner zabbix; CREATE DATABASE postgres=# grant all privileges on database zabbix to zabbix; GRANT 3、安装zabbix-server cd /usr/ports/net-mgmt/zabbix22-server/ make install clean 4、导入zabbix数据模板 root@bsd:/# cd /usr/local/share/zabbix22/server/database/postgresql root@bsd:/usr/local/share/zabbix22/server/database/postgresql# cat schema.sql | psql –U zabbix zabbix; root@bsd:/usr/local/share/zabbix22/server/database/postgresql# cat images.sql | psql –U zabbix zabbix; root@bsd:/usr/local/share/zabbix22/server/database/postgresql# cat data.sql | psql –U zabbix zabbix; 5、配置zabbix -server root@bsd:/usr/local/etc/zabbix22# cp/usr/local/etc/zabbix22/zabbix_server.conf.sample

ZABBIX使用手册范本

使用手册

.简介................................................... 错误!未指定书签。 简介 .................................................... 错误!未指定书签。 功能 .................................................... 错误!未指定书签。 优劣势 .................................................. 错误!未指定书签。..安装部署.............................................. 错误!未指定书签。 服务端环境准备 .......................................... 错误!未指定书签。 数据库准备 .............................................. 错误!未指定书签。 编译安装 ................................................ 错误!未指定书签。 配置文件及前端文件修改 .................................. 错误!未指定书签。 前端安装配置 ............................................ 错误!未指定书签。 启动 .................................................... 错误!未指定书签。 在上配置 ................................................ 错误!未指定书签。..配置使用.............................................. 错误!未指定书签。 添加.................................................... 错误!未指定书签。 添加.................................................... 错误!未指定书签。 添加.................................................... 错误!未指定书签。 添加.................................................... 错误!未指定书签。 添加.................................................... 错误!未指定书签。 添加.................................................... 错误!未指定书签。 添加................................................... 错误!未指定书签。 添加.................................................... 错误!未指定书签。 添加.................................................... 错误!未指定书签。 添加.................................................... 错误!未指定书签。 添加监控................................................ 错误!未指定书签。 添加监控................................................ 错误!未指定书签。 添加监控................................................ 错误!未指定书签。 添加通用协议监控 ........................................ 错误!未指定书签。 添加自定义监控 .......................................... 错误!未指定书签。 添加.................................................... 错误!未指定书签。 添加(定制报表) ........................................ 错误!未指定书签。 添加 .................................................... 错误!未指定书签。 添加自动发现设备 ........................................ 错误!未指定书签。 添加 .................................................... 错误!未指定书签。 ........................................................ 错误!未指定书签。 (维护时间) ............................................ 错误!未指定书签。........................................................ 错误!未指定书签。

zabbix环境部署详细步骤(小白可入)

Zabbix部署流程 目录 1、计划安排 (2) 2、环境准备 (2) 3、软件安装(lamp) (2) 4、配置文件修改 (3) 5、web初始化及登陆 (4) 6、监控项模板配置 (5) 7、网络自动发现主机 (8) 8、添加监控项的触发器及对应的动作 (11) 9、在zabbix-server端配置简单的邮件postfix服务 (16) 10、用户与报警媒介关联 (18)

1、计划安排 2、环境准备 Zabbix-server端(10.21.X.X):操作系统:centos7.1 硬件:4c/8G 80G 安装图形化 Mysql数据库端(10.21.20.202):操作系统:centos7.1 硬件:4c/8G 120G 3、软件安装(lamp) (1)Zabbix-Server组件: yum –y install net-snmp* gcc 下载zabbix-3.2.7.tar.gz包并进行编译安装(./configure –prefix=/usr/local/zabbix --enable –server --enable-agent --with-mysql --with-net-snmp)---- make (注编译时若出现报错,按照报错解决依赖包问题) (2)web 组件(注意php的软件版本一定要保持一致5.4) yum -y install httpd php php-mysql yum -y localinstall zabbix-web-3.2.0 zabbix-web-mysql-3.2.0 php-mbstring php-bcmath (3)数据库端

Centos7安装配置zabbix

Centos7安装配置zabbix 1 关闭firewall systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 2 安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT #追加这行-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT #追加这行 -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT systemctl restart iptables.service #最后重启防火墙使配置生效 systemctl enable iptables.service #设置防火墙开机启动 3 关闭SELINUX vi /etc/selinux/config

Zabbix安装配置手册- -

Zabbix 手册 目录 Ⅰ Zabbix简介 (1) 一、Zabbix介绍 (1) 二、Zabbix系统架构 (4) 1.Zabbix架构: (4) 2.Zabbix架构说明: (5) Ⅱ Zabbix安装 (8) 一、Zabbix安装 (8) 1、安装基础包 (8) 2、启动httpd、mysql (9) 3、配置防火墙 (9) 4、配置PHP参数 (9) 5、修改httpd 的FQDN 错误 (10) 6、下载zabbix-3.0.3tar.gz (10) 7、添加zabbix 用户和组 (11)

8、安装zabbix-server (11) 9、创建zabbix 数据库以及相关表 (11) 10、配置软连接和启动文件信息 (12) 11、修改/etc/init.d 目录下的zabbix_server 和zabbix_agentd 启动文件(配置 server和agent) (12) 12、通过web 站点配置zabbix (14) 二、Zabbix 监控机配置 (19) 1. 登录 (20) 2. 添加主机(Hosts) (21) 3. 创建模板 (27) 4.添加告警动作(Actions) (30) 5.添加告警方式(Medias) (30) 6.添加用户(Users) (32) Ⅲ Zabbix配置 (34) 一、Client端配置 (34) 二、zabbix_server.conf 配置文件详解 (35) 三、zabbix_agentd.conf 配置文件详解 (43)

ⅠZabbix简介 一、Zabbix介绍 Zabbix是一个分布式监控系统,支持多种采集方式和采集客户端,有专用的Agent(代理),也支持SNMP、IPMI、JMX、Telnet、SSH等多种协议,它将采集到的数据存放到数据库,然后对其进行分析整理,达到条件触发告警.其灵活的扩展性和丰富的功能是其他监控系统所不能比的。相对来说,它的总体功能做得非常优秀,其界面如图1-1、图1-2。 图1-1

zabbix安装笔记

二.zabbix 服务器的介绍 zabbix(音同z?bix)是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案。zabbix能监视各种网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题。 zabbix监控服务器由2部分构成,zabbix server与可选组件zabbix agent。 zabbix server可以通过SNMP,zabbix agent,ping,端口监视等方法提供对远程服务器/网络状态的监视,数据收集等功能,它可以运行在Linux,Solaris,HP-UX,AIX,Free BSD,Open BSD,OS X等平台上。 二.基础环境介绍 1.系统:CentOS Linux release 7.1.1503 (Core) 2.编译环境:“Deveolpment Tools” 3.zabbix-Server:ip:192.168.1.125/24(centos7)agent: 192.168.1.128/24 (centos 6.5) 三.Zabbix Server端操作 1.安装zabbix-server 及所需的mysql组件、zabbix-agent [root@test ~]# rpm -ivh https://www.sodocs.net/doc/eb8194663.html,/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm [root@test ~]# yum install zabbix-server-mysql zabbix-web-mysql -y [root@test ~]# yum install zabbix-agent -y 2.由于centos 7 默认的数据库改由mariadb里,甲骨文公司收购了MySQL后,mysql之父便又写了这个数据库。此环境由于需要mysql ,所以下面将下载mysql 源,安装mysql。另外mysql安装完,root没有密码,可以直接登陆,后续如果需要修改密码可登陆数据库修改,或者运行 mysql_secure_installation 初始化工具 [root@test ~]# yum install wget -y [root@test ~]# wget https://www.sodocs.net/doc/eb8194663.html,/get/mysql-community-release-el7-5.noarch.rpm [root@test ~]# rpm -ivh mysql-community-release-el7-5.noarch.rpm [root@test ~]# yum install mysql-community-server -y [root@test ~]# service mysqld start #或者 systemctl start mysqld.service [root@test ~]# mysql -uroot 创建zabbix 数据库,并授权zabbix用户,以及设置zabbix用户登陆密码为zabbix [root@test ~]# mysql -uroot mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; mysql> quit; 进入zabbix数据库脚本导入的目录,将库数据导入zabbix数据库中。

zabbix-web初始基本配置

zabbix-web初始基本配置 zabbix-web设置截图: 修改日期"2016年9月4日:百无聊赖的一个中午" 空虚小编:勤奋的木木直 Zabbix3.0版本。。发布时间24 July, 2016 基本环境信息: 注意: 如果出现错误,一般为缺少PHP扩展件。zabbix3.0支持PHP5.4及以上版本缺少什么插件就去下载安装,在重启Apache服务刷新页面如果配置不符合要求清修改该文件参数 [root@server ~]# cat /etc/httpd/conf.d/zabbix.conf |grep php_ 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 详细参数作用自己查阅 小编php版本: [root@server ~]# rpm -qa | grep php php-cli-5.6.25-1.el6.remi.x86_64 php-gd-5.6.25-1.el6.remi.x86_64 php-pdo-5.6.25-1.el6.remi.x86_64 php-mbstring-5.6.25-1.el6.remi.x86_64 php-common-5.6.25-1.el6.remi.x86_64 php-devel-5.6.25-1.el6.remi.x86_64 php-fpm-5.6.25-1.el6.remi.x86_64 php-mcrypt-5.6.25-1.el6.remi.x86_64 php-pecl-jsonc-1.3.10-1.el6.remi.5.6.x86_64 php-pecl-jsonc-devel-1.3.10-1.el6.remi.5.6.x86_64 php-5.6.25-1.el6.remi.x86_64

Zabbix部署与安装

Zabbix3.2监控工具 Zabbix是一个基于WEB界面的提供的分布式系统监控以及网络监视功能的企业级的开源工具。 Zabbix能监视各种网络参数,保证服务器系统的安全运营,并提供灵活的通知机制让管理员迅速定位/解决存在的各种问题。 Zabbix由Zabbix_Server服务端和Zabbix_Agent客户端还有Zabbix_proxy代理三个部分组成。Zabbix_Server:可以通过SNMP,Zabbix_Agent,Ping,SNMP等方法提供对远程服务器/网络状态的监视。 Zabbix_Agent:是用来采集客户端服务器数据来交给Zabbix_Server处理。 Zabbix_Proxy:缓存同步Agent监控数据。 Zabbix的主要功能:CPU负荷,内存使用,磁盘使用,网络状况,端口监视,日志监视。Zabbix的监控架构: Zabbix部署步骤: 环境需求:必须LNMP/LAMP环境的支持,需要PHP5.4以上版本支持才可以。 # systemctl stop firewalld #关闭firewalld防火墙 # systemctl disable firewalld.service #禁止firewalld服务自启 # sed -i -e 's|SELINUX=enforcing|SELINUX=disabled|' /etc/selinux/config #关闭SELINUX # sed -i -e 's|SELINUXTYPE=targeted|#SELINUXTYPE=targeted|' /etc/selinux/config # setenforce 0 源码编译方式: ?安装相关依赖组件 # yum -y install php php-gd php-mysql php-bcmath php-mbstring php-xml curl curl-devel gcc gcc-c++ net-snmp net-snmp-devel perl-DBI httpd mariadb* #YUM部署LAMP环境

zabbix+apache+mysql安装部署

centos7 zabbix+apache+mysql安装部署 1、安装所需的软件包 yum install -y gcc php php-gd php-devel php-mysql php-bcmath php-ctytpe php-xml php -xmlreader php-xlmwriter php-session php-net-socket php-mbstring php-gettext httpd net-snmp curl curl-devel net-snmp net-snmp-devel perl-DBI mysql* 2 、创建用户 groupadd -g 201 zabbix useradd -g zabbix -u 201 -m zabbix 3、登录数据库,创建zabbix数据库,并授权zabbix用户从192.168.10.197主机登录mysql,使用的密码为123456 为了加强安全性,MySQL5.7为root用户随机生成了一个密码,在error log中,关于error log的位置,如果安装的是RPM包,则默认是/var/log/mysqld.log。 只有启动过一次mysql才可以查看临时密码 [root@linux-node2 ~]# mysql -uroot -p mysql>mysqladmin -u root -p oldpass password "Admin@123" ########修改密码##### mysql> use mysql; mysql>create database zabbix character set utf8; mysql>grant all privileges on zabbix.* to zabbix@'localhost' identified by '123456'; mysql> flush privileges; 4、下载安装zabbix wget https://www.sodocs.net/doc/eb8194663.html,/unix/misc/zabbix-2.0.3.tar.gz # tar -zxvf zabbix-2.0.3.tar.gz #cd zabbix-2.203 导入数据库表 #cd zabbix-2.0.3/database/mysql #mysql -uroot -pmysqlzabbix

ZABBIX SERVER安装(源码)

ZABBIX SERVER源码安装

一、安装依赖包 #yum-y install gcc-4.4.6-3.el6.x86_64.rpm gcc-c++-4.4.6-3.el6.x86_64.rpm autoconf-2.63-5.1.el6.noarch.rpm httpd-2.2.15-15.el6.x86_64.rpm httpd-manual-2.2.15-15.el6.noarch.rpm httpd-tools-2.2.15-15.el6.x86_64.rpm httpd-devel-2.2.15-15.el6.i686.rpm httpd-devel-2.2.15-15.el6.x86_64.rpm php-5.3.3-3.el6_1.3.x86_64.rpm mysql-5.1.52-1.el6_0.1.x86_64.rpm mysql-server-5.1.52-1.el6_0.1.x86_64.rpm mysql-connector-java-5.1.12-2.el6.x86_64.rpm php-mysql-5.3.3-3.el6_1.3.x86_64.rpm mod_ssl-2.2.15-15.el6.x86_64.rpm mod_perl-2.0.4-10.el6.x86_64.rpm mod_auth_mysql-3.0.0-11.el6_0.1.x86_64.rpm php-gd-5.3.3-3.el6_1.3.x86_64.rpm php-xml-5.3.3-3.el6_1.3.x86_64.rpm php-ldap-5.3.3-3.el6_1.3.x86_64.rpm php-pear-1.9.4-4.el6.noarch.rpm php-xmlrpc-5.3.3-3.el6_1.3.x86_64.rpm mysql-connector-odbc-5.1.5r1144-7.el6.x86_64.rpm mysql-devel-5.1.52-1.el6_0.1.x86_64.rpm libdbi-dbd-mysql-0.8.3-5.1.el6.x86_64.rpm net-snmp-devel-5.5-37.el6.x86_64.rpm curl-7.19.7-26.el6_1.2.x86_64.rpm unixODBC-devel-2.2.14-11.el6.x86_64.rpm OpenEXR-libs-1.6.1-8.1.el6.x86_64.rpm OpenIPMI-libs-2.0.16-12.el6.x86_64.rpm java-1.5.0-gcj-devel-1.5.0.0-29.1.el6.x86_64.rpm 利用yum工具安装,不同平台软件包的名字略有差别。 二、安装Zabbix-Server 下载zabbix-2.4.4.tar.gz https://www.sodocs.net/doc/eb8194663.html,/project/zabbix/ZABBIX%20Latest%20Stable/2.4.4/zabbix-2.4.4.tar.gz 增加zabbix用户 #groupadd zabbix–g201 #userass–g zabbix-u201-m zabbix

zabbix服务器安装及客户端配置

一、LAMP安装 1、安装apache2 apt-get install apache2 输入Y后即可安装,检查apache2版本:apache2 -v 验证是否安装成功,打开浏览器,地址栏输入:ip即可看到如图(如果是本地安装请输入地址http://localhost)It works!: 如果看到了版本但是没有看到“Apache2 Ubuntu Default Page”,请在终端执行service apache2 restart 或者执行 /etc/init.d/apache2 restart 2、安装php5 apt-get install php5 libapache2-mod-php5 apt-get install php5-fpm php5-mysql

上面同时安装了php5与apache2的php模块,共两个包。 验证php5是否安装成功,Ubuntu15.10环境,安装apache2后默认会生成/var/www/html/这个路径。 html目录中创建探针文件testphp.php vi /var/www/html/testphp.php 保存退出 保存后,浏览器访问:http://localhost/testphp.php,即可看到如下图:显示出PHP的信息内容页面

3、安装mysql-server apt-get install mysql-server 安装过程中会要求你输入两遍mysql的root用户密码,其他地方直接下一步就行,由于已经安装了,重新安装无需配置密码,所以无法截图出来,抱歉。 4、安装phpmyadmin 除php-myadmin外要给他装一些依赖 apt-get install php5-mysql phpmyadmin

zabbix安装整理(修改)

Zabbix安装 安装步骤: 1、安装好apache、mysql、php、snmp组件 apache :yum install httpd httpd-manual -y mysql : yum install mysql-server php-mysql mysql-devel -y php : yum install php php-bcmatch php-gd php-bcmath php-mbstring –y snmp : yum install net-snmp net-snmp-utils net-snmp-devel -y 其它组件: curl : yum install curl curl-devel -y gcc : yum install gcc libgcc -y make : yum install make –y lrzsz: yum install -y lrzsz libxml: yum install –y libxml* yum install -y php-xml* #yum install -y ntp #yum install -y ntpdate #cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #service ntpd stop #ntpdate https://www.sodocs.net/doc/eb8194663.html, #date 下载zabbix的最新版本zabbix-2.2.3.tar.gz 通过lrzsz工具上传到服务器中,SZ上传。 复制到/home目录下 tar -zxvf zabbix-2.2.3.tar.gz 解压后进入目录,运行配置: ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent \ --with-mysql --with-net-snmp --with-libcurl make make install 为了安全,zabbix是通过用户zabbix来执行的,所以,要新建zabbix用户 groupadd zabbix useradd zabbix -g zabbix 启动mysql service mysqld start 进入下载的zabbix目录,新建zabbix的数据库:

ZABBIX使用手册

ZABBIX使用手册

1.X简介 (1) 1.1Z ABBIX简介 (1) 1.2Z ABBIX功能 (1) 1.3优劣势 (1) 2.PART2.安装部署 (2) 2.1服务端环境准备 (2) 2.2数据库准备 (2) 2.3编译安装 (2) 2.4配置文件及WEB前端文件修改 (3) 2.5WEB前端安装配置 (3) 2.6启动S ERVER (4) 2.7在HOSTS上配置AGENT (5) 3.PART3.配置使用 (6) 3.1添加H OSTS (6) 3.2添加I TEMS (6) 3.3添加T RIGGERS (8) 3.4添加A CTIONS (8) 3.5添加M EDIAS (9) 3.6添加U SERS (10) 3.7添加WEB M ONITORINGS (10) 3.8添加G RAPHS (13) 3.9添加S CREENS (14) 3.10添加M APS (15) 3.11添加M Y SQL监控 (15) 3.12添加O RACLE监控 (16) 3.13添加SNMP监控 (18) 3.14添加通用协议监控 (18) 3.15添加自定义监控 (18) 3.16添加T EMPLATES (19) 3.17添加R EPORTS(定制报表) (19) 3.18添加M ACROS (20) 3.19添加自动发现设备 (21) 3.20添加I NVENTORY (21) 3.21E XPORT/I MPORT XML (21) 3.22M AINTENANCE(维护时间) (22) 4. (23)

图表目录 图表1 (4) 图表2 (6) 图表3 (7) 图表4 (7) 图表 5 (8) 图表 6 (9) 图表7 (9) 图表8 (10) 图表9 (11) 图表10 (11) 图表11 (12) 图表12 (12) 图表13 (13) 图表14 (13) 图表15 (14) 图表16 (15) 图表17 (15) 图表18 (16) 图表19 (18) 图表20 (18) 图表21 (19) 图表22 (19) 图表23 (20) 图表24 (20) 图表25 (21) 图表26 (22) 图表27 (22) 图表28 (23) 图表29 (23) 图表30 (24)

zabbix2.4.5安装

一.部署环境 系统:CentOS 6.4x64 最小化安装 Server:192.168.3.28 Client:192.168.3.29 二.基础软件包安装 在server安装基础软件包,这里的环境使用yum安装,如果使用源码安装也是可以的。[root@zabbix-server ~]# yum -y install wget vim tree gccgcc-c++ autoconfhttpdphpmysqlmysql-server php-mysqlhttpd-manual mod_sslmod_perlmod_auth_mysqlphp-gdphp-xml php-mbstringphp-ldapphp-pear php-xmlrpcphp-bcmathmysql-connector-odbcmysql-devellibdbi-dbd-mysql net-snmp net-snmp-devel curl-devel 启动httpd、mysql并设置成开机自动启动 [root@zabbix-server ~]# servicehttpd start [root@zabbix-server ~]# servicemysqld start [root@zabbix-server ~]# chkconfighttpd on [root@zabbix-server ~]# chkconfigmysqld on 在iptables中放行80,10050,10051端口。 [root@zabbix-server ~]# iptables -I INPUT -p tcp -m multiport --destination-port 80,10050:10051 -j ACCEPT #查看防火墙结果 [root@zabbix-server ~]# iptables -L -n Chain INPUT (policy ACCEPT) targetprot opt source destination ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 80,10050:10051 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED ACCEPT icmp-- 0.0.0.0/0 0.0.0.0/0 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) targetprot opt source destination REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) targetprot opt source destination

zabbix深入玩转

zabbix深入玩转 Part1.Zabbix简介 一、Zabbix简介 Zabbix Zabbix 是一个提供Web 管理界面的企业级的开源系统/网络监控分布式监控解决方案,由一个国外的团队持续维护更新,软件可以自由下载使用,运作团队靠提供收费的技术支持赢利。 官方网站:https://www.sodocs.net/doc/eb8194663.html, Zabbix 1.8官方文档:https://www.sodocs.net/doc/eb8194663.html,/documentation/1.8/start Zabbix通过C/S模式采集数据,通过B/S模式在web端展示和配置。 被监控端:主机通过安装agent方式采集数据,网络设备通过SNMP方式采集数据 Server端:通过收集SNMP和agent发送的数据,写入MySQL数据库,再通过php+apache在web前端展示。 Zabbix运行条件: Server: Zabbix Server需运行在LAMP(Linux+Apache+Mysql+PHP)环境下,对硬件要求低 Agent: 目前已有的agent基本支持市面常见的OS,包含Linux、HPUX、Solaris、Sun、windows SNMP: 支持各类常见的网络设备 二、Zabbix功能 ●??具备常见的商业监控软件所具备的功能(主机的性能监控、网络设备性能监控、数据库性能监控、FTP等通 用协议监控、多种告警方式、详细的报表图表绘制) ●??支持自动发现网络设备和服务器 ●??支持分布式,能集中展示、管理分布式的监控点 ●??扩展性强,server提供通用接口,可以自己开发完善各类监控 三、优劣势 优点: ●??开源,无软件成本投入 ●??Server对设备性能要求低(实际测试环境:虚拟机Redhat EL AS5,2GCPU 1G内存,监控5台设备,CPU使 用率基本保持在10%以下,内存剩余400M以上) ●??支持设备多 ●??支持分布式集中管理 ●??开放式接口,扩展性强 缺点: ●??全英文,界面不友好 ●??无厂家支持,出现问题解决比较麻烦 ●??需在被监控主机上安装agent 安装前先配置好PHP,要求支持php-gd、php-bcmath、php-xml、php-mysql、php-net-socket、php-mbstring,即configure 参数中加上–with-gd –enable-bcmath –enable-xml –with-mysql –enable-sockets –enable-mbstring

zabbix-agent安装及脚本

1.创建软件仓库 rpm -ivh https://www.sodocs.net/doc/eb8194663.html,/zabbix/3.0/rhel/7/x86_64/zabbix-ag ent-3.0.4-1.el7.x86_64.rpm 2.安装zabbix agent yum install zabbixzabbix-agent -y 3.编辑配置文件-监控server vim /etc/zabbix/zabbix_agentd.conf -------zabbix server端主机IP 其他无需改动! 4.启动zabbix agent systemctl restart zabbix-agent 5.编辑zabbix监控页面 创建模版-创建主机-创建图形

##############################两种脚本 ############################# #/bin/bash rpm -ivh https://www.sodocs.net/doc/eb8194663.html,/zabbix/3.0/rhel/7/x86_64/zabbix-agent-3.0.4-1.el7.x86_64.rpm yum install zabbixzabbix-agent -y functionChiose() { read -p "Please enter your Hostname:" hostname if [ -z $hostname ] then sed -i -e "s/Server=127.0.0.1/Server=192.168.16.102/g" /etc/zabbix/zabbix_agentd.conf && echo -e '\E[1;34zabbix server changed !\E[0m' sed -i -e "s/Zabbix server/$hostname/g" /etc/zabbix/zabbix_agentd.conf && echo -e '\E[1;34hostname changed !\E[0m' else echo -e '\E[1;31mWrong number! Try again:\E[0m' Chiose fi

相关主题