This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
manual:installation:install [2016/02/15 09:47] martins-v removing link to non-existing section |
manual:installation:install [2020/06/26 13:45] (current) yuriii replaced svn with git |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== 4 Installation from sources ==== | + | ==== 3 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.0.0.tar.gz | ||
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 systems, run: | + | 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 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><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> |
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 73: | Line 93: | ||
<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> | ||
Line 79: | Line 106: | ||
== 5 Make and install everything == | == 5 Make and install everything == | ||
- | <note>If installing from SVN, it is required to run first: | + | <note>If installing from git, it is required to run first: |
''$ make dbschema'' | ''$ make dbschema'' | ||
Line 151: | Line 178: | ||
cp -a . <htdocs>/zabbix | cp -a . <htdocs>/zabbix | ||
- | If installing from SVN and planning to use any other language than English, you must generate translation files. To do so, run: | + | If installing from git and planning to use any other language than English, you must generate translation files. To do so, run: |
locale/make_mo.sh | locale/make_mo.sh | ||
Line 182: | Line 209: | ||
|//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: IBM DB2, MySQL, Oracle, PostgreSQL, SQLite |One of the following modules must be installed:\\ ibm_db2, mysql, oci8, pgsql, sqlite3 | | ||
|//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 239: | ||
{{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 == | ||