Zabbix Documentation 3.4

3.04.04.45.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:installation:install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:installation:install [2015/08/05 07:50]
martins-v updating screenshot
manual:installation:install [2019/01/21 09:27] (current)
martins-v formatting change
Line 1: Line 1:
-==== Installation from sources ====+==== Installation from sources ====
  
 You can get the very latest version of Zabbix by compiling it from the sources. You can get the very latest version of Zabbix by compiling it from the sources.
Line 9: Line 9:
 == 1 Download the source archive == == 1 Download the source archive ==
  
-Go to the [[http://​www.zabbix.com/​download.php|Zabbix download page]] and download the source archive. Once downloaded, extract the sources, by running:+Go to the [[http://​www.zabbix.com/​download_sources|Zabbix download page]] and download the source archive. Once downloaded, extract the sources, by running:
  
-  $ tar -zxvf zabbix-3.0.0.tar.gz+  $ tar -zxvf zabbix-3.4.0.tar.gz
    
 <note tip>​Enter the correct Zabbix version in the command. It must match the name of the downloaded archive.</​note>​ <note tip>​Enter the correct Zabbix version in the command. It must match the name of the downloaded archive.</​note>​
Line 19: Line 19:
 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.  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 systemsrun:+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"​),​
  
-  ​groupadd zabbix +on a RedHat-based system, run: 
-  useradd -g zabbix zabbix+ 
 +  ​groupadd ​--system ​zabbix 
 +  useradd ​--system ​-g zabbix ​-d /usr/lib/zabbix ​-s /​sbin/​nologin -c "​Zabbix Monitoring System"​ zabbix 
 + 
 +on a Debian-based system, run: 
 + 
 +  addgroup --system --quiet zabbix 
 +  adduser --quiet --system --disabled-login --ingroup zabbix --home /​var/​lib/​zabbix --no-create-home zabbix 
 + 
 +<note important>​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 
 + 
 +On Debian-based systems, run: 
 + 
 +  mkdir -m u=rwx,​g=rwx,​o= -p /​var/​lib/​zabbix 
 +  chown zabbix:​zabbix /​var/​lib/​zabbix 
 +</​note>​
  
 A separate user account is not required for Zabbix frontend installation. A separate user account is not required for Zabbix frontend installation.
Line 50: Line 70:
   ./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2   ./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
  
-<​note><​nowiki>​--with-libxml2</​nowiki>​ configuration option is required for virtual machine monitoring, supported since Zabbix 2.2.0.</​note>​+<​note><​nowiki>​--with-libcurl</​nowiki>​ configuration option ​with cURL 7.20.0 or higher ​is required for SMTP authentication,​ supported since Zabbix 3.0.0.\\ <​nowiki>​--with-libcurl</​nowiki>​ and <​nowiki>​--with-libxml2</​nowiki>​ configuration options are required for virtual machine monitoring, supported since Zabbix 2.2.0.</​note>​ 
 + 
 +<note important>​Since version 3.4 Zabbix will always compile with the PCRE library; installing it is not optional. %%--with-libpcre=[DIR]%% only allows pointing to a specific base install directory, instead of searching through a number of common places for the libpcre files.</​note>​
  
 To configure the sources for a Zabbix server (with PostgreSQL etc.), you may run: To configure the sources for a Zabbix server (with PostgreSQL etc.), you may run:
Line 67: Line 89:
  
 <note important>​ <note important>​
-Using <​nowiki>​--enable-static</​nowiki>​ option is not recommended when building server.// //  +Using <​nowiki>​--enable-static</​nowiki>​ 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.
- +
-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.+
 </​note>​ </​note>​
  
 <​note>​Command-line utilities zabbix_get and zabbix_sender are compiled if %%--enable-agent%% option is used.</​note>​ <​note>​Command-line utilities zabbix_get and zabbix_sender are compiled if %%--enable-agent%% option is used.</​note>​
 +
 +<​note>​
 +Add optional path to the MySQL configuration file <​nowiki>​--with-mysql=/<​path_to_the_file>/​mysql_config</​nowiki>​ to select the desired
 +MySQL client library when there is a need to use one that is not located in the default location.
 +
 +It is useful when there are several versions of MySQL installed or MariaDB installed alongside MySQL on the same system.
 +</​note>​
  
 <​note>​Use <​nowiki>​--with-ibm-db2</​nowiki>​ flag to specify location of the CLI API.\\ Use <​nowiki>​--with-oracle</​nowiki>​ flag to specify location of the OCI API.</​note>​ <​note>​Use <​nowiki>​--with-ibm-db2</​nowiki>​ flag to specify location of the CLI API.\\ Use <​nowiki>​--with-oracle</​nowiki>​ flag to specify location of the OCI API.</​note>​
  
-For encryption support see [[manual:​encryption?&#​compiling_zabbix_with_encryption_support|Compiling Zabbix with encryption support]]+For encryption support see [[manual:​encryption#​compiling_zabbix_with_encryption_support|Compiling Zabbix with encryption support]].
 == 5 Make and install everything == == 5 Make and install everything ==
  
Line 103: Line 130:
  
 You must specify the database name, user and password (if using any). You must specify the database name, user and password (if using any).
- 
-<​note>​With SQLite the full path to database file must be specified; DB user and password are not required.</​note>​ 
  
 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 [[manual:​appendix:​performance_tuning|performance tuning]] section for more details. 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 [[manual:​appendix:​performance_tuning|performance tuning]] section for more details.
Line 142: Line 167:
   * /​usr/​local/​apache2/​htdocs (default directory when installing Apache from source)   * /​usr/​local/​apache2/​htdocs (default directory when installing Apache from source)
   * /​srv/​www/​htdocs (OpenSUSE, SLES)   * /​srv/​www/​htdocs (OpenSUSE, SLES)
-  * /​var/​www/​html (Fedora, RHEL, CentOS+  * /​var/​www/​html (Debian, Ubuntu, ​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: 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:
Line 182: Line 206:
 |//PHP max_execution_time option// ​ | 300 seconds (values 0 and -1 are allowed) |In php.ini:\\ max_execution_time = 300  | |//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 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 | +|//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 ​ |+|//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 ​ | |//​bcmath// ​ |  |php-bcmath ​ |
 |//​mbstring// ​ |  |php-mbstring ​ | |//​mbstring// ​ |  |php-mbstring ​ |
-|//PHP mbstring.func_overload option// ​ |must be disabled ​ |In php.ini:\\ mbstring.func_overload = 0 | +|//PHP mbstring.func_overload option// ​ |must be disabled ​ |In php.ini:\\ mbstring.func_overload = 0  | 
-|//PHP always_populate_raw_post_data option// ​ |must be set to -1 |Required only for PHP versions 5.6.0 or newer.\\ In php.ini:\\ always_populate_raw_post_data = -1 |+|//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. ​  | |//​sockets// ​ |  |php-net-socket. Required for user script support. ​  |
 |//​gd// ​ |2.0 or higher ​ |php-gd. PHP GD extension must support PNG images (//<​nowiki>​--with-png-dir</​nowiki>//​),​ JPEG (//<​nowiki>​--with-jpeg-dir</​nowiki>//​) images and FreeType 2 (//<​nowiki>​--with-freetype-dir</​nowiki>//​). | |//​gd// ​ |2.0 or higher ​ |php-gd. PHP GD extension must support PNG images (//<​nowiki>​--with-png-dir</​nowiki>//​),​ JPEG (//<​nowiki>​--with-jpeg-dir</​nowiki>//​) images and FreeType 2 (//<​nowiki>​--with-freetype-dir</​nowiki>//​). |
Line 212: Line 236:
 {{install_4.png?​550|}} {{install_4.png?​550|}}
  
 +Entering a name for Zabbix server is optional, however, if submitted, it will be displayed in the menu bar and page titles.
 == Step 5 == == Step 5 ==
  
Line 220: Line 245:
 == Step 6 == == Step 6 ==
  
-Download the configuration file and place it under conf/.+Download the configuration file and place it under conf/ in the webserver HTML documents subdirectory where you copied Zabbix PHP files to.
  
 {{install_6.png?​550|}} {{install_6.png?​550|}}
Line 240: Line 265:
  
 Proceed to [[manual:​quickstart:​login|getting started with Zabbix]]. Proceed to [[manual:​quickstart:​login|getting started with Zabbix]].
- 
-==== Troubleshooting ==== 
- 
-See the section on [[manual:​appendix:​install:​troubleshooting|installation-specific issue troubleshooting]]. 
  
 ==== See also ==== ==== See also ====
   - [[http://​www.zabbix.org/​wiki/​How_to/​configure_shared_memory|How to configure shared memory for Zabbix daemons]]   - [[http://​www.zabbix.org/​wiki/​How_to/​configure_shared_memory|How to configure shared memory for Zabbix daemons]]