Zabbix Documentation 4.0
Zabbix Documentation 4.0
1 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 run as that user.
However, if a daemon is started from a 'root' account, it will switch to a 'zabbix' user account, which must be present. To create such a user account (in its own group, “zabbix”),
on a RedHat-based system, run:
groupadd --system zabbix
useradd --system -g zabbix -d /usr/lib/zabbix -s /sbin/nologin -c "Zabbix Monitoring System" zabbix
Zabbix processes do not need a home directory, which is why we do not recommend creating it. However, if you are using some functionality that requires it (e. g. store MySQL credentials in
$HOME/.my.cnf
you are free to create it using the following commands.
On RedHat-based systems, run:
mkdir -m u=rwx,g=rwx,o= -p /usr/lib/zabbix
chown zabbix:zabbix /usr/lib/zabbix
a. Install Zabbix repository
# rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
# yum clean all
b. Install Zabbix server, frontend, agent
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
# yum install -y mariadb-server
修改mariadb数据存放路径
CentOS7 中修改 Mariadb 数据库数据的存储路径
Mariadb 默认的数据存储目录为 /var/lib/mysql,要想改为指定目录,步骤如下。
1. 创建新目录
比如在根目录下创建一个 data 目录:
# mkdir -p /data/mysql
给这个目录加上读写权限:
# chmod -R 777 /data/mysql
2. 修改 /data/mysql 目录的拥有者
# chown -R mysql:mysql /data/mysql
3. 编辑 Mariadb 的配置文件 /etc/my.cnf
把[mysqld]下的配置项datadir和socket注释掉(以防有问题再改回来),新加行改为新的内容,如下:
[mysqld]
datadir=/data/mysql
[client]
default-character-set=utf8
socket=/var/lib/mysql/mysql.sock
注:如果文件中没有[client],需要手动加上。
保存文件退出。
4. 重新启动 Mariadb 服务
# systemctl start mariadb.service
c. Create initial database
# mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> quit;
Import initial schema and data. You will be prompted to enter your newly created password.
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
d. Configure the database for Zabbix server
Edit file /etc/zabbix/zabbix_server.conf
DBPassword=zabbix
e. Configure PHP for Zabbix frontend
Edit file /etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.
# php_value date.timezone Europe/Riga
f. Start Zabbix server and agent processes
Start Zabbix server and agent processes and make it start at system boot:
# systemctl restart zabbix-server zabbix-agent httpd
# systemctl enable zabbix-server zabbix-agent httpd
Now your Zabbix server is up and running!
Additionally, to use any other language than English, its locale should be installed on the web server. See the "See also" section in the “User profile” page to find out how to install it if required.
Since Zabbix 4.0.8, write permissions to the assets directory are required for the web server user.
Installing frontend
Step 1
In your browser, open Zabbix URL: http://<server_ip_or_name>/zabbix
You should see the first screen of the frontend installation wizard.

Step 2
Make sure that all software prerequisites are met.

| Pre-requisite | Minimum value | Description |
|---|---|---|
| PHP version | 5.4.0 | |
| PHP memory_limit option | 128MB | In php.ini: memory_limit = 128M |
| PHP post_max_size option | 16MB | In php.ini: post_max_size = 16M |
| PHP upload_max_filesize option | 2MB | In php.ini: upload_max_filesize = 2M |
| PHP max_execution_time option | 300 seconds (values 0 and -1 are allowed) | In php.ini: max_execution_time = 300 |
| PHP max_input_time option | 300 seconds (values 0 and -1 are allowed) | In php.ini: max_input_time = 300 |
| PHP session.auto_start option | must be disabled | In php.ini: session.auto_start = 0 |
| Database support | One of: MySQL, Oracle, PostgreSQL, IBM DB2 | One of the following modules must be installed: mysql, oci8, pgsql, ibm_db2 |
| bcmath | php-bcmath | |
| mbstring | php-mbstring | |
| PHP mbstring.func_overload option | must be disabled | In php.ini: mbstring.func_overload = 0 |
| PHP always_populate_raw_post_data option | must be disabled | Required only for PHP versions 5.6.0 or newer. In php.ini: always_populate_raw_post_data = -1 |
| sockets | php-net-socket. Required for user script support. | |
| gd | 2.0 or higher | php-gd. PHP GD extension must support PNG images (--with-png-dir), JPEG (--with-jpeg-dir) images and FreeType 2 (--with-freetype-dir). |
| libxml | 2.6.15 | php-xml or php5-dom |
| xmlwriter | php-xmlwriter | |
| xmlreader | php-xmlreader | |
| ctype | php-ctype | |
| session | php-session | |
| gettext | php-gettext Since Zabbix 2.2.1, the PHP gettext extension is not a mandatory requirement for installing Zabbix. If gettext is not installed, the frontend will work as usual, however, the translations will not be available. |
Optional pre-requisites may also be present in the list. A failed optional prerequisite is displayed in orange and has a Warning status. With a failed optional pre-requisite, the setup may continue.
If there is a need to change the Apache user or user group, permissions to the session folder must be verified. Otherwise Zabbix setup may be unable to continue.
Step 3
Enter details for connecting to the database. Zabbix database must already be created.

Step 4
Enter Zabbix server details.

Entering a name for Zabbix server is optional, however, if submitted, it will be displayed in the menu bar and page titles.
Step 5
Review a summary of settings.

Step 6
Download the configuration file and place it under conf/ in the webserver HTML documents subdirectory where you copied Zabbix PHP files to.


Providing the webserver user has write access to conf/ directory the configuration file would be saved automatically and it would be possible to proceed to the next step right away.
Step 7
Finish the installation.

Step 8
Zabbix frontend is ready! The default user name is Admin, password zabbix.

Proceed to getting started with Zabbix.
3 Installing Java gateway
It is required to install Java gateway only if you want to monitor JMX applications. Java gateway is lightweight and does not require a database.
To install from sources, first download and extract the source archive.
To compile Java gateway, run the ./configure script with --enable-java option. It is advisable that you specify the --prefix option to request installation path other than the default /usr/local, because installing Java gateway will create a whole directory tree, not just a single executable.
$ ./configure --enable-java --prefix=$PREFIX
To compile and package Java gateway into a JAR file, run make. Note that for this step you will need javac and jar executables in your path.
$ make
Now you have a zabbix-java-gateway-$VERSION.jar file in src/zabbix_java/bin. If you are comfortable with running Java gateway from src/zabbix_java in the distribution directory, then you can proceed to instructions for configuring and running Java gateway. Otherwise, make sure you have enough privileges and run make install.
$ make install
Proceed to setup for more details on configuring and running Java gateway.
See also
Zabbix Documentation 4.0的更多相关文章
- zabbix debug and vulnerability https://www.zabbix.com/documentation/3.0/manual/concepts/sender
https://www.zabbix.com/documentation/3.0/manual/concepts/sender zabbix--- zabbix_sender -vv -z 172.2 ...
- zabbix Server 4.0 部署及之内置item使用案例
zabbix Server 4.0 部署及之内置item使用案例 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.zabbix组件架构概述(图片摘自网络) 1>.zabbi ...
- 运维监控-基于yum的方式部署Zabbix Server 4.0 版本
运维监控-基于yum的方式部署Zabbix Server 4.0 版本 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.如何选择zabbix版本 1>.打开zabbix官方 ...
- zabbix Server 4.0 监控JMX监控详解
zabbix Server 4.0 监控JMX监控详解 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 大家都知道,zabbix server效率高是使用C语言编写的,有很多应用 ...
- zabbix Server 4.0 触发器(Trigger)篇
zabbix Server 4.0 触发器(Trigger)篇 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.触发器(Trigger)概述 1>.上一篇博客我们介绍了“内 ...
- Centos7 安装 Zabbix Server 4.0
官方参考URL:https://www.zabbix.com/documentation/4.0/start 1. 安装 Apache 2.4(略) 注意系统时间/时区ntp server是否定时同步 ...
- 运维监控-基于yum的方式部署 Zabbix Agent 4.0 版本
运维监控-基于yum的方式部署 Zabbix Agent 4.0 版本 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 上一篇博客我们分享了如何基于yum的方式部署zabbix 4. ...
- ZABBIX 2.1.0 发布,分布式系统监控
ZABBIX 2.1.0 发布了,这相当是 ZABBIX 2.2 的首个 Alpha 版本,包括了新的主要的功能和改进. 主要包括如下几个方面的提升: 性能提升 可加载模块 移除对未知事件的支持 应用 ...
- Centos 7.0 下安装 Zabbix server 3.0服务器的安装及 监控主机的加入(1)
一.本系列分为6部分 1.Centos 7.0 下安装 Zabbix server 3.0服务器的安装及 监控主机的加入 2.Centos 6.5 下安装 Zabbix server 3.0服务器的安 ...
随机推荐
- win10 搜索栏输入后长期没反应
博客转载自:https://blog.csdn.net/qq_40875146/article/details/81742533 Get-AppXPackage -Name Microsoft.Win ...
- 查找算法(2)--Binary chop--二分查找
1. 二分查找 (1)说明 元素必须是有序的,如果是无序的则要先进行排序操作. (2)基本思想: 也称为是折半查找,属于有序查找算法.用给定值k先与中间结点的关键字比较,中间结点把线形表分成两个子表, ...
- 深入解读阿里云Redis开发规范
Key命名设计:可读性.可管理性.简介性 规范建议使用冒号即:进行分割拼接,因为很多Redis客户端是根据冒号分类的.比如有几个Key:apps:app:1.apps:app:2和apps:app:3 ...
- MySQL创建触发器的时候报1419错误( 1419 - You do not have the SUPER privilege and binary logging is enabled )
mysql创建触发器的时候报错: 解决方法:第一步,用root用户登录:mysql -u root -p第二步,设置参数log_bin_trust_function_creators为1:set gl ...
- 让typecho支持PHP7
在PHP7环境下新安装Typecho默认是使用Pdo_Mysql数据库引擎驱动 如果之前Typecho运行环境不是PHP7,后来才升级为PHP7的,那么,需要将你的Typecho数据库引擎修改为Pdo ...
- DockerFile语法【h】
DockerFile在我理解就是可以将所需要构建镜像的功能.组件都天前配置好,然后直接生成一个Image,而不是先生成镜像,再通过修改容器的方法来生成最终需要的镜像. 镜像的定值实际上就是定值每一 ...
- 用PowerDesigner将SQL转pdm文件
1.打开新建的pdm文件,File->Reverse Enginner->Databases 2.选择对应数据库(DBMS),点击确定,然后添加SQL文件 3.点击确定 注:如果DBMS没 ...
- 16 SpringMVC 的请求参数的绑定与常用注解
1.SpringMVC 绑定请求参数 (1)支持的数据类型 基本类型参数: 包括基本类型和 String 类型POJO 类型参数: 包括实体类,以及关联的实体类数组和集合类型参数: 包括 List 结 ...
- Spring 学习指南 第三章 bean的配置 (未完结)
第三章 bean 的配置 在本章中,我们将介绍以下内容: bean 定义的继承: 如何解决 bean 类的构造函数的参数: 如何配置原始类型 (如 int .float 等) .集合类型(如 ja ...
- c#学习笔记1-简单算法
using System; namespace Demo { class Studycs { public static void Main(String[] args) { // String re ...