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 [2017/10/06 15:13]
sasha 3.4 => 4.0
manual:installation:install [2019/08/13 05:24]
martins-v punctuation fix
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-4.0.0.tar.gz+  $ tar -zxvf zabbix-4.2.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-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</nowikiconfiguration options are required for virtual machine monitoring, supported since Zabbix 2.2.0.</​note>​+<​note>​For virtual machine monitoring ''​<​nowiki>​--with-libcurl</​nowiki>​''​ and ''<​nowiki>​--with-libxml2</​nowiki>'' ​configuration ​options are required; ''<​nowiki>​--with-libcurl</​nowiki>''​ is also required for SMTP authentication and ''​web.page.*''​ Zabbix agent [[:​manual/​config/​items/​itemtypes/​zabbix_agent|items]]. Note that cURL 7.20.0 or higher is [[:​manual/​installation/​requirements|required]] with the ''​<​nowiki>​--with-libcurl</​nowiki>​''​ configuration option.</note> 
 + 
 +<note important>Since version 3.4.0, 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>​
  
Line 163: Line 183:
 <​note>​Additionally,​ to use any other language than English, its locale should be installed on the web server. See the [[manual:​web_interface:​user_profile#​see_also|"​See also"​]] section in the "User profile"​ page to find out how to install it if required.</​note>​ <​note>​Additionally,​ to use any other language than English, its locale should be installed on the web server. See the [[manual:​web_interface:​user_profile#​see_also|"​See also"​]] section in the "User profile"​ page to find out how to install it if required.</​note>​
  
 +<​note>​In Zabbix 4.2.2 (only) the web server user requires //write// permissions to the ''​assets''​ directory.</​note>​
 == Installing frontend == == Installing frontend ==
  
Line 171: Line 192:
 You should see the first screen of the frontend installation wizard. You should see the first screen of the frontend installation wizard.
  
-{{install_1.png?550|}}+{{install_1_a.png?550|}}
  
 == Step 2 == == Step 2 ==
Line 193: Line 214:
 |//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 | |//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.28 |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>//​). |
 |//​libxml// ​ |2.6.15 ​ |php-xml or php5-dom ​ | |//​libxml// ​ |2.6.15 ​ |php-xml or php5-dom ​ |
 |//​xmlwriter// ​ |  |php-xmlwriter ​ | |//​xmlwriter// ​ |  |php-xmlwriter ​ |
Line 216: Line 237:
 {{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 245: Line 267:
 Proceed to [[manual:​quickstart:​login|getting started with Zabbix]]. Proceed to [[manual:​quickstart:​login|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 [[:​manual/​installation/​install#​download_the_source_archive|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 [[:​manual/​concepts/​java#​overview_of_files_in_java_gateway_distribution|Java gateway]]. Otherwise, make sure you have enough privileges and run ''​make install''​.
 +
 +  $ make install
 +
 +Proceed to [[:​manual/​concepts/​java/​from_sources|setup]] for more details on configuring and running Java gateway.
 ==== 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]]