zabbix3.2安装
1 Getting (获取、得到)Zabbix #获取zabbix
Overview #概述 [???v?vju:]
There are four ways(方法)of getting Zabbix: #以下四种方式获得zabbix
- Install it from the distribution [?d?str??bju??n] (分布、分发) packages (包)
- Download the latest source archive [?ɑ:rka?v](文件) and compile [k?m?pa?l] (编译) it yourself
- Install it from the containers [k?n‘ten?](容器、本地编译)
- Download the virtual [?v?:rt?u?l] (虚拟) appliance (设备)
2 Requirements #要求
Hardware #计算机硬件
Memory #存储
Zabbix requires both physical and disk memory. 128 MB of physical memory and 256 MB of free disk space could be a good starting point. However, the amount of required disk memory obviously depends on the number of hosts and parameters that are being monitored. If you‘re planning to keep a long history of monitored parameters, you should be thinking of at least a couple of gigabytes to have enough space to store the history in the database. Each Zabbix daemon process requires several connections to a database server. Amount of memory allocated for the connection depends on configuration of the database engine.
The more physical memory you have, the faster the database (and therefore Zabbix) works!
CPU
Zabbix and especially Zabbix database may require significant CPU resources depending on number of monitored parameters and chosen database engine.
Other hardware
A serial communication port and a serial GSM modem are required for using SMS notification support in Zabbix. USB-to-serial converter will also work.
Examples of hardware configuration
The table provides several examples of hardware configurations:
Name | Platform | CPU/Memory | Database | Monitored hosts |
---|---|---|---|---|
Small | CentOS | Virtual Appliance | MySQL InnoDB | 100 |
Medium | CentOS | 2 CPU cores/2GB | MySQL InnoDB | 500 |
Large | RedHat Enterprise Linux | 4 CPU cores/8GB | RAID10 MySQL InnoDB or PostgreSQL | >1000 |
Very large | RedHat Enterprise Linux | 8 CPU cores/16GB | Fast RAID10 MySQL InnoDB or PostgreSQL | >10000 |
Actual configuration depends on the number of active items and refresh rates very much. It is highly recommended to run the database on a separate box for large installations.
Supported platforms #支持的平台
Due to security requirements and mission-critical nature of monitoring server, UNIX is the only operating system that can consistently deliver the necessary performance, fault tolerance and resilience. Zabbix operates on market leading versions.
Zabbix is tested on the following platforms:
- Linux
- IBM AIX
- FreeBSD
- NetBSD
- OpenBSD
- HP-UX
- Mac OS X
- Solaris
- Windows: all desktop and server versions since 2000 (Zabbix agent only)
Zabbix may work on other Unix-like operating systems as well.
Zabbix disables core dumps if compiled with encryption and does not start if system does not allow disabling of core dumps.
Software [?s?:ftwer] # 软件
Zabbix is built around a modern Apache web server, leading database engines, and PHP scripting language.
Database management system #数据库管理系统
Software | Version | Comments |
---|---|---|
MySQL | 5.0.3 or later | Required if MySQL is used as Zabbix backend database. InnoDB engine is required. |
Oracle | 10g or later | Required if Oracle is used as Zabbix backend database. |
PostgreSQL | 8.1 or later | Required if PostgreSQL is used as Zabbix backend database. It is suggested to use at least PostgreSQL 8.3, which introduced much better VACUUM performance. |
SQLite | 3.3.5 or later | Required if SQLite is used as Zabbix backend database. |
IBM DB2 | 9.7 or later | Required if IBM DB2 is used as Zabbix backend database. |
IBM DB2 support [s??p?:rt] (支持) is experimental [?k?sp?r??m?ntl] (实验性、实验)!
While SQLite3 can be used with Zabbix proxies without any problems, using SQLite3 with Zabbix server is not recommended. Since Zabbix 2.4.0, simultaneous database access with server and frontend may even lead to database corruption!
Frontend # 前端
The following [?fɑ:lo???] (下列、以下) software is required to run Zabbix frontend: #下面的软件需要运行在前端
Software | Version | Comments |
---|---|---|
Apache | 1.3.12 or later | |
PHP | 5.4.0 or later | |
PHP extensions: | ||
gd | 2.0 or later | PHP GD extension must support PNG images (--with-png-dir), JPEG (--with-jpeg-dir) images and FreeType 2 (--with-freetype-dir). |
bcmath | php-bcmath (--enable-bcmath) | |
ctype | php-ctype (--enable-ctype) | |
libXML | 2.6.15 or later | php-xml or php5-dom, if provided as a separate package by the distributor. |
xmlreader | php-xmlreader, if provided as a separate package by the distributor. | |
xmlwriter | php-xmlwriter, if provided as a separate package by the distributor. | |
session | php-session, if provided as a separate package by the distributor. | |
sockets | php-net-socket (--enable-sockets). Required for user script support. | |
mbstring | php-mbstring (--enable-mbstring) | |
gettext | php-gettext (--with-gettext). Required for translations to work. | |
ldap | php-ldap. Required only if LDAP authentication is used in the frontend. | |
ibm_db2 | Required if IBM DB2 is used as Zabbix backend database. | |
mysqli | Required if MySQL is used as Zabbix backend database. | |
oci8 | Required if Oracle is used as Zabbix backend database. | |
pgsql | Required if PostgreSQL is used as Zabbix backend database. | |
sqlite3 | Required if SQLite is used as Zabbix backend database. |
Zabbix may work on previous versions of Apache, MySQL, Oracle, and PostgreSQL as well.
For other fonts than the default DejaVu, PHP function imagerotate might be required. If it is missing, these fonts might be rendered incorrectly in Monitoring → Overview header and other locations. This function is only available if PHP is compiled with bundled GD, which is not the case in Debian and other distributions.
WEB browser [?bra?z?] (浏览器) on client side #客户端web浏览器
Cookies and Java Script must be enabled.
Latest versions of Google Chrome, Mozilla Firefox, Microsoft Internet Explorer and Opera are supported. Other browsers (Apple Safari, Konqueror) may work with Zabbix as well.(就是说支持的浏览器有那些)
Server
Requirement [r??kwa??rm?nt] (要求) |
Description [d??skr?p??n] (描述) |
---|---|
OpenIPMI | Required for IPMI support. |
libssh2 | Required for SSH support. Version 1.0 or higher. |
fping | Required for ICMP ping items. |
libcurl | Required for web monitoring, VMware monitoring and SMTP authentication. For SMTP authentication, version 7.20.0 or higher is required. |
libiksemel | Required for Jabber support. |
libxml2 | Required for VMware monitoring. |
net-snmp | Required for SNMP support. |
Java gateway #Java 网关
If you obtained Zabbix from the source repository or an archive, then the necessary dependencies are already included in the source tree.
If you obtained Zabbix from your distribution‘s package, then the necessary dependencies are already provided by the packaging system.
In both cases above, the software is ready to be used and no additional downloads are necessary.
If, however, you wish to provide your versions of these dependencies (for instance, if you are preparing a package for some Linux distribution), below is the list of library versions that Java gateway is known to work with. Zabbix may work with other versions of these libraries, too.
The following table lists JAR files that are currently bundled with Java gateway in the original code:
Library | License | Website | Comments |
---|---|---|---|
logback-core-0.9.27.jar | EPL 1.0,LGPL 2.1 | http://logback.qos.ch/ | Tested with 0.9.27, 1.0.13, and 1.1.1. |
logback-classic-0.9.27.jar | EPL 1.0,LGPL 2.1 | http://logback.qos.ch/ | Tested with 0.9.27, 1.0.13, and 1.1.1. |
slf4j-api-1.6.1.jar | MIT License | http://www.slf4j.org/ | Tested with 1.6.1, 1.6.6, and 1.7.6. |
android-json-4.3_r3.1.jar | Apache License 2.0 | https://android.googlesource.com/platform/libcore/+/master/json | Tested with 2.3.3_r1.1 and 4.3_r3.1. See src/zabbix_java/lib/README for instructions on creating a JAR file. |
Java gateway compiles and runs with Java 1.6 and above. It is recommended that those who provide a precompiled version of the gateway for others use Java 1.6 for compilation, so that it runs on all versions of Java up to the latest one.
Database size #数据库的大小
Zabbix configuration data require a fixed amount of disk space and do not grow much.
Zabbix database size mainly depends on these variables, which define the amount of stored historical data:
- Number of processed [p‘r?sest] (处理)values [‘v?lj?z] (值) per second
This is the average number of new values Zabbix server receives every second. For example, if we have 3000 items for monitoring with refresh rate of 60 seconds, the number of values per second is calculated as 3000/60 = 50.
It means that 50 new values are added to Zabbix database every second.
- Housekeeper settings for history #管理和历史设置
Zabbix keeps values for a fixed period of time, normally several weeks or months. Each new value requires a certain amount of disk space for data and index.
So, if we would like to keep 30 days of history and we receive 50 values per second, total number of values will be around (30*24*3600)*50 = 129.600.000, or about 130M of values.
Depending on the database engine used, type of received values (floats, integers, strings, log files, etc), the disk space for keeping a single value may vary from 40 bytes to hundreds of bytes. Normally it is around 90 bytes per value for numeric items. In our case, it means that 130M of values will require 130M * 90 bytes = 10.9GB of disk space.
The size of text/log item values is impossible to predict exactly, but you may expect around 500 bytes per value.
- Housekeeper setting for trends #管理员设置趋势
Zabbix keeps a 1-hour max/min/avg/count set of values for each item in the table trends. The data is used for trending and long period graphs. The one hour period can not be customised.
Zabbix database, depending on database type, requires about 90 bytes per each total. Suppose we would like to keep trend data for 5 years. Values for 3000 items will require 3000*24*365* 90 = 2.2GB per year, or 11GB for 5 years.
- Housekeeper settings for events
Each Zabbix event requires approximately 170 bytes of disk space. It is hard to estimate the number of events generated by Zabbix daily. In the worst case scenario, we may assume that Zabbix generates one event per second.
It means that if we want to keep 3 years of events, this would require 3*365*24*3600* 170 = 15GB
The table contains formulas that can be used to calculate the disk space required for Zabbix system:
Parameter | Formula for required disk space (in bytes) |
---|---|
Zabbix configuration | Fixed size. Normally 10MB or less. |
History | days*(items/refresh rate)*24*3600*bytes items : number of items days : number of days to keep history refresh rate : average refresh rate of items bytes : number of bytes required to keep single value, depends on database engine, normally ~90 bytes. |
Trends | days*(items/3600)*24*3600*bytes items : number of items days : number of days to keep history bytes : number of bytes required to keep single trend, depends on database engine, normally ~90 bytes. |
Events | days*events*24*3600*bytes events : number of event per second. One (1) event per second in worst case scenario. days : number of days to keep history bytes : number of bytes required to keep single trend, depends on database engine, normally ~170 bytes. |
Average values such as ~90 bytes for numeric items, ~170 bytes for events have been gathered from real-life statistics using a MySQL backend database.
So, the total required disk space can be calculated as:
Configuration + History + Trends + Events
The disk space will NOT be used immediately after Zabbix installation. Database size will grow then it will stop growing at some point, which depends on housekeeper settings.
Time synchronisation [?s??kr?na?‘ze???n] (同步) #实时同步
It is very important to have precise system date on server with Zabbix running. ntpd is the most popular daemon that synchronizes the host‘s time with the time of other machines. It‘s strongly recommended to maintain synchronised system date on all systems Zabbix components are running on.
If the time is not synchronised Zabbix will convert timestamps of the gathered data into Zabbix server time by taking client/server timestamps after establishing data connection and adjusting the received item value timestamps by the client-server time difference. To keep it simple and avoid possible complications the connection latency is ignored. Because of that the connection latency is added to the timestamps of data acquired from active connections (active agent, active proxy, sender) and subtracted from the timestamps of data acquired from passive connections (passive proxy). All other checks are done in server time and their timestamps are not adjusted.
3 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 #安装zabbix服务器
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.2.0.tar.gz
Enter the correct Zabbix version in the command. It must match the name of the downloaded archive.
2 Create [kri?et] (创建) user account [??ka?nt] (账户)
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 Linux systems, run:
groupadd zabbix useradd -g zabbix zabbix
A separate user account is not required for Zabbix frontend installation.
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.
Running Zabbix as root
, bin
, or any other account with special rights is a security risk.
3 Create Zabbix database #创建zabbix数据库
For Zabbix server and proxy daemons, as well as Zabbix frontend, a database is required. It is not needed to run Zabbix agent.
SQL scripts are provided for creating database schema and inserting the dataset. Zabbix proxy database needs only the schema while Zabbix server database requires also the dataset on top of the schema.
Having created a Zabbix database, proceed to the following steps of compiling [k?m‘pa?l??] (编译)Zabbix.
4 Configure the sources #配置源
When configuring the sources for a Zabbix server or proxy, you must specify the database type to be used. Only one database type can be compiled with a server or proxy process at a time.
To see all of the supported configuration options, inside the extracted Zabbix source directory run:
./configure --help
To configure the sources for a Zabbix server and agent, you may run something like:
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
--with-libcurl configuration option with cURL 7.20.0 or higher is required for SMTP authentication, supported since Zabbix 3.0.0.
--with-libcurl and --with-libxml2 configuration options are required for virtual machine monitoring, supported since Zabbix 2.2.0.
To configure the sources for a Zabbix server (with PostgreSQL etc.), you may run:
./configure --enable-server --with-postgresql --with-net-snmp
To configure the sources for a Zabbix proxy (with SQLite etc.), you may run:
./configure --prefix=/usr --enable-proxy --with-net-snmp --with-sqlite3 --with-ssh2
To configure the sources for a Zabbix agent, you may run:
./configure --enable-agent
You may use the --enable-static flag 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.
Using --enable-static option is not recommended when building server.
In order to build the server statically you must have a static version of every external library needed. There is no strict check for that in configure script.
Command-line utilities zabbix_get and zabbix_sender are compiled if --enable-agent option is used.
Add optional path to the MySQL configuration file --with-mysql=/<path_to_the_file>/mysql_config to select the desired MySQL client library when there is a need to use one that is not located in the default location. #(可以更换MySQL路径)
It is useful when there are several versions of MySQL installed or MariaDB installed alongside MySQL on the same system.
Use --with-ibm-db2 flag to specify location of the CLI API.
Use --with-oracle flag to specify location of the OCI API.
For encryption support see Compiling Zabbix with encryption support.
5 Make and install everything #编译和安装
If installing from SVN, it is required to run first:
$ make dbschema
make install
This step should be run as a user with sufficient permissions (commonly ‘root‘, or by using sudo
).
Running make install
will by default install the daemon binaries (zabbix_server, zabbix_agentd, zabbix_proxy) in /usr/local/sbin and the client binaries (zabbix_get, zabbix_sender) in /usr/local/bin.
To specify a different location than /usr/local, use a --prefix key in the previous step of configuring sources, for example --prefix=/home/zabbix. In this case daemon binaries will be installed under <prefix>/sbin, while utilities under <prefix>/bin. Man pages will be installed under <prefix>/share.
6 Review and edit configuration files #检查编译文件
- edit the Zabbix agent configuration file /usr/local/etc/zabbix_agentd.conf
You need to configure this file for every host with zabbix_agentd installed.
You must specify the Zabbix server IP address in the file. Connections from other hosts will be denied.
- edit the Zabbix server configuration file /usr/local/etc/zabbix_server.conf
You must specify [?sp?s??fa?] (指定) the database name, user and password (if using any).
With SQLite the full path to database file must be specified; DB user and password are not required.
The rest of the parameters will suit you with their defaults if you have a small installation (up to ten monitored hosts). You should change the default parameters if you want to maximize the performance of Zabbix server (or proxy) though. See the performance tuningsection for more details.
- if you have installed a Zabbix proxy, edit the proxy configuration file /usr/local/etc/zabbix_proxy.conf
You must specify the server IP address and proxy [?prɑ:ksi] (代理) hostname (must be known to the server), as well as the database name, user and password (if using any).(指定服务器的ip地址和数据库的名称)
With SQLite the full path to database file must be specified [‘spes?fa?d] (指定); DB user and password are not required [r?‘kwa??d] (必须、需要).
7 Start up the daemons #启动进程服务
Run zabbix_server on the server side.
shell> zabbix_server
Make sure that your system allows allocation of 36MB (or a bit more) of shared memory, otherwise the server may not start and you will see “Cannot allocate shared memory for <type of cache>.” in the server log file. This may happen on FreeBSD, Solaris 8.
See the "See also" section at the bottom of this page to find out how to configure shared [?erd] (共享) memory.
Run zabbix_agentd on all the monitored [‘m?n?t?d] (检测、监控) machines.
shell> zabbix_agentd
Make sure that your system allows allocation of 2MB of shared memory, otherwise the agent may not start and you will see “Cannot allocate shared memory for collector.” in the agent log file. This may happen on Solaris 8.
(确保有2m的共享内存、如果没有可能无法启动服务)
If you have installed Zabbix proxy, run zabbix_proxy.
shell> zabbix_proxy
2 Installing Zabbix web interface
Copying PHP files #复制PHP文件
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 from frontends/php to the webserver HTML documents directory.
Common locations of HTML documents directories for Apache web servers 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)
It is suggested to use a subdirectory instead of the HTML root. To create a subdirectory and copy Zabbix frontend files into it, execute the following commands, replacing the actual directory:
mkdir <htdocs>/zabbix cd frontends/php cp -a . <htdocs>/zabbix
If installing from SVN and planning to use any other language than English, you must generate [?d??n??ret] (生成) translation files. To do so, run:
locale/make_mo.sh
msgfmt
utility from gettext package is required.
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.
Installing frontend #安装前端 使用web
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 [?s?:ftwer] (软件)prerequisites [pri:‘rekw?z?ts] (前提)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: IBM DB2, MySQL, Oracle, PostgreSQL, SQLite | One of the following modules must be installed: ibm_db2, mysql, oci8, pgsql, sqlite3 |
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 [‘di:te?lz] (细节).
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.
See also
How to/configure shared memory #如何配置共享内存
Contents
[hide]
- 1Configuration of shared memory for zabbix_server daemon
- 1.1General information
- 1.2Linux
- 1.3FreeBSD
Configuration of shared memory for zabbix_server daemon
General information
If you need to use significantly increased values of caches (CacheSize, HistoryCacheSize, HistoryTextCacheSize, TrendCacheSize) for zabbix_server daemon then you have to configure (increase) kernel parameters.
Some operating systems, like FreeBSD, require increased kernel parameters to start zabbix_server daemon even with the default configuration file. For example: zabbix_server requires 36 Mbytes total (defaulf Zabbix caches), but FreeBSD by default allows to allocate only 8192*4096 = 32 Mbytes
Note that if other programs are using shared memory as well (PostgreSQL for example), you will have to coordinate the size settings between them. Note that the amount of total size of shared memory (shmall) is measured in Pages and one page size is the value of PAGE_SIZE (normally 4096 bytes).
If zabbix_server will not be able to allocate configured memory, it will not start and will write to the zabbix_server.log these lines:
cannot allocate shared memory of size 114085069: [22] Invalid argument cannot allocate shared memory for <type of cache>
Linux
Check what is the Page size:
# getconf PAGE_SIZE 4096
Default values for Linux depend on the distribution used. For example, recent versions of Debian, CentOS, OpenSUSE and Slackware:
kernel.shmall = 2097152 kernel.shmmax = 33554432
OpenSUSE 11.x i386:
kernel.shmall = 268435200 kernel.shmmax = 4294967295
OpenSUSE 11.x x86_64:
kernel.shmall = 1152921504606846720 kernel.shmmax = 18446744073709551615
Description of parameters:
kernel.shmall: Maximum total size of shared memory in pages (normally 4096 bytes) kernel.shmmax: Maximum size of shared memory segment in bytes
Check current values of parameters:
# sysctl -a | grep -E "shmall|shmmax" kernel.shmmax = 33554432 kernel.shmall = 2097152
or alternative way:
# ipcs -lm ------ Shared Memory Limits -------- max number of segments = 4096 max seg size (kbytes) = 131072 max total shared memory (kbytes) = 8388608 min seg size (bytes) = 1
Need to increase kernel.shmmax=134217728 which allows to use 128M for any cache related parameter in the zabbix server configuration.
To make the configuration persistent, need to add this line to the /etc/sysctl.conf:
kernel.shmmax=134217728
which means 128 Mbytes
To apply changes in the /etc/sysctl.conf immediately, execute:
# sysctl -p kernel.shmmax = 134217728
FreeBSD
Check what is the Page size:
# getconf PAGE_SIZE 4096
Default values for FreeBSD:
kern.ipc.shmall: 8192 kern.ipc.shmmax: 33554432
Description of parameters:
kern.ipc.shmall: Maximum number of pages (normally 4096 bytes) available for shared memory kern.ipc.shmmax: Maximum shared memory segment size in bytes
Check current values of parameters:
# sysctl -a | grep -E "shmall|shmmax" kern.ipc.shmall: 8192 kern.ipc.shmmax: 33554432
or alternative way:
# ipcs -M shminfo: shmmax: 33554432 (max shared memory segment size) shmmin: 1 (min shared memory segment size) shmmni: 192 (max number of shared memory identifiers) shmseg: 128 (max shared memory segments per process) shmall: 8192 (max amount of shared memory in pages)
Need to increase kern.ipc.shmall=2097152 which allows to allocate 8 Gbytes of shared memory for OS.
And increase kern.ipc.shmmax=134217728 which allows to use 128M for any cache related parameter in the Zabbix server configuration.
To make the configuration persistent, need to add these lines to the /etc/sysctl.conf:
kern.ipc.shmall=2097152 kern.ipc.shmmax=134217728
which means 2097152*4096=8 Gbytes and 128 Mbytes respectively
To apply changes in the /etc/sysctl.conf immediately, execute:
# service sysctl restart
1 Repository installation #库安装
For Red Hat Enterprise Linux / CentOS
Supported versions
- RHEL 7
- Oracle Linux 7
- CentOS 7
Some packages (agent, proxy, etc.) are available for RHEL 5 and RHEL 6 (in http://repo.zabbix.com/zabbix/3.2/rhel/5/x86_64/ and http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/directories respectively).
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.
For Debian
Supported versions
- Debian 9 (codename: stretch)
- Debian 8 (codename: jessie)
- Debian 7 (codename: wheezy)
Installing repository configuration package
Install the repository configuration package, which contains apt (software package manager) configuration files. Shell commands for Debian 9 (stretch):
# wget http://repo.zabbix.com/zabbix/3.2/debian/pool/main/z/zabbix-release/zabbix-release_3.2-1+stretch_all.deb # dpkg -i zabbix-release_3.2-1+stretch_all.deb # apt-get update
For Debian 8 change ‘stretch‘ to ‘jessie‘. For Debian 7 change ‘stretch‘ to ‘wheezy‘.
Now you are ready to install Zabbix server with MySQL or server with PostreSQL, agent and proxy.
For Ubuntu
Supported versions
- Ubuntu 16.04 LTS (codeame: xenial)
- Ubuntu 14.04 LTS (codename: trusty)
Installing repository configuration package
Install the repository configuration package, which contains apt (software package manager) configuration files. Shell commands for Ubuntu 16.04 LTS (xenial):
# wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb # dpkg -i zabbix-release_3.2-1+xenial_all.deb # apt-get update
For Ubuntu 14.04 LTS change ‘xenial‘ to ‘trusty‘.
Now you are ready to install Zabbix server with MySQL or server with PostreSQL, agent and proxy.