Zabbix Documentation 4.4

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


manual:installation:install_from_packages:rhel_centos

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_from_packages:rhel_centos [2018/09/11 08:18]
dimir [Zabbix frontend configuration] add php value max_input_vars
manual:installation:install_from_packages:rhel_centos [2019/08/12 08:44] (current)
martins-v apache -> httpd on rhel
Line 13: Line 13:
 RHEL 7: RHEL 7:
  
-  # rpm -ivh https://​repo.zabbix.com/​zabbix/​3.5/​rhel/​7/​x86_64/​zabbix-release-3.5-1.el7.noarch.rpm+  # rpm -ivh https://​repo.zabbix.com/​zabbix/​4.4/​rhel/​7/​x86_64/​zabbix-release-4.4-1.el7.noarch.rpm
  
 RHEL 6: RHEL 6:
  
-  # rpm -ivh https://​repo.zabbix.com/​zabbix/​3.5/​rhel/​6/​x86_64/​zabbix-release-3.5-1.el6.noarch.rpm+  # rpm -ivh https://​repo.zabbix.com/​zabbix/​4.4/​rhel/​6/​x86_64/​zabbix-release-4.4-1.el6.noarch.rpm
  
 RHEL 5: RHEL 5:
  
-  # rpm -ivh https://​repo.zabbix.com/​zabbix/​3.5/​rhel/​5/​x86_64/​zabbix-release-3.5-1.noarch.rpm+  # rpm -ivh https://​repo.zabbix.com/​zabbix/​4.4/​rhel/​5/​x86_64/​zabbix-release-4.4-1.noarch.rpm
  
 === Frontend installation prerequisites === === Frontend installation prerequisites ===
Line 40: Line 40:
  
   # yum install zabbix-proxy-mysql   # yum install zabbix-proxy-mysql
 +
 +Substitute '​mysql'​ in the commands with '​pgsql'​ to use PostgreSQL, or with '​sqlite3'​ to use SQLite3 (proxy only).
  
 To install Zabbix frontend (available for RHEL 7, [[manual/​installation/​install_from_packages/​rhel_centos#​zabbix_frontend_and_server_on_rhel_6|deprecated on RHEL 6]]) with MySQL support: To install Zabbix frontend (available for RHEL 7, [[manual/​installation/​install_from_packages/​rhel_centos#​zabbix_frontend_and_server_on_rhel_6|deprecated on RHEL 6]]) with MySQL support:
  
-  # yum install zabbix-web-mysql+  # yum install zabbix-web-mysql ​zabbix-apache-conf
  
-Substitute 'mysql' in the commands ​with 'pgsql' ​to use PostgreSQL, or with '​sqlite3'​ to use SQLite3 (proxy ​only).+Substitute 'apache' in the command ​with 'nginx' ​if using the Nginx web server. Note that Nginx is available [[:​manual/​appendix/​install/​nginx|only in EPEL]].
  
 === Creating database === === Creating database ===
  
-For Zabbix [[manual:​concepts:​server|server]] and [[manual:​concepts:​proxy|proxy]] daemons a database is required. It is not needed to run Zabbix [[manual:​concepts:​agent|agent]]. ​+For Zabbix [[manual:​concepts:​server|server]] and [[manual:​concepts:​proxy|proxy]] daemons a database is required. It is not needed to run Zabbix [[manual:​concepts:​agent|agent]].
  
-<note warning>If Zabbix server and proxy are installed on the same host, their databases must be created with different names!</​note>​+<note warning>Separate databases are needed for Zabbix server and Zabbix ​proxy; they cannot use the same database. Therefore, if they are installed on the same host, their databases must be created with different names!</​note>​
  
 Create the database using the provided instructions for [[manual:​appendix:​install:​db_scripts#​mysql|MySQL]] or [[manual:​appendix:​install:​db_scripts#​postgresql|PostgreSQL]]. Create the database using the provided instructions for [[manual:​appendix:​install:​db_scripts#​mysql|MySQL]] or [[manual:​appendix:​install:​db_scripts#​postgresql|PostgreSQL]].
Line 57: Line 59:
 === Importing data === === Importing data ===
  
-Now import initial schema and data for the server with MySQL:+Now import initial schema and data for the **server** with MySQL:
  
   # zcat /​usr/​share/​doc/​zabbix-server-mysql*/​create.sql.gz | mysql -uzabbix -p zabbix   # zcat /​usr/​share/​doc/​zabbix-server-mysql*/​create.sql.gz | mysql -uzabbix -p zabbix
Line 67: Line 69:
   # zcat /​usr/​share/​doc/​zabbix-server-pgsql*/​create.sql.gz | sudo -u <​username>​ psql zabbix   # zcat /​usr/​share/​doc/​zabbix-server-pgsql*/​create.sql.gz | sudo -u <​username>​ psql zabbix
  
-For proxy, import initial schema:+With TimescaleDB,​ in addition to the previous command, also run: 
 + 
 +  # zcat /​usr/​share/​doc/​zabbix-server-pgsql*/​timescaledb.sql.gz | sudo -u <​username>​ psql zabbix 
 + 
 +<note warning>​TimescaleDB is supported with Zabbix server only.</​note>​ 
 + 
 +For **proxy**, import initial schema:
  
   # zcat /​usr/​share/​doc/​zabbix-proxy-mysql*/​schema.sql.gz | mysql -uzabbix -p zabbix   # zcat /​usr/​share/​doc/​zabbix-proxy-mysql*/​schema.sql.gz | mysql -uzabbix -p zabbix
Line 78: Line 86:
 === Configure database for Zabbix server/​proxy === === Configure database for Zabbix server/​proxy ===
  
-Edit zabbix_server.conf ​or zabbix_proxy.conf to use the created database. For example:+Edit zabbix_server.conf ​(and zabbix_proxy.confto use their respective databases. For example:
  
   # vi /​etc/​zabbix/​zabbix_server.conf   # vi /​etc/​zabbix/​zabbix_server.conf
Line 94: Line 102:
 It's time to start Zabbix server process: It's time to start Zabbix server process:
  
-  # service zabbix-server start+  # service zabbix-server ​httpd start 
 + 
 +or (with Nginx) 
 + 
 +  # service zabbix-server nginx php-fpm ​start
  
 and make it start at system boot: and make it start at system boot:
  
 RHEL 7 and later: RHEL 7 and later:
-  # systemctl enable zabbix-server+  # systemctl enable zabbix-server ​httpd 
 + 
 +or (with Nginx) 
 + 
 +  # systemctl enable zabbix-server nginx php-fpm
  
 RHEL prior to 7: RHEL prior to 7:
Line 108: Line 124:
 === Zabbix frontend configuration === === Zabbix frontend configuration ===
  
-For RHEL 7 and later the Apache configuration file for Zabbix frontend ​is located in /​etc/​httpd/​conf.d/​zabbix.conf. +Depending on the web server used (Apache/Nginx) edit the corresponding ​configuration file for Zabbix frontend:
- +
-If you use RHEL 6 please read the section about [[manual/​installation/​install_from_packages/​rhel_centos#​zabbix_frontend_and_server_on_rhel_6|using Zabbix frontend on RHEL 6]] on how to configure the frontend.+
  
-Some PHP settings are already configured. But it's necessary to uncomment the "​date.timezone"​ setting and [[http://​php.net/​manual/​en/​timezones.php|set the right timezone]] for you.+  * For Apache in RHEL 7 and later the configuration file is located in ''/​etc/​httpd/​conf.d/​zabbix.conf''​. ​Some PHP settings are already configured. But it's necessary to uncomment the %%"%%date.timezone%%"%% setting and [[http://​php.net/​manual/​en/​timezones.php|set the right timezone]] for you.
  
   php_value max_execution_time 300   php_value max_execution_time 300
Line 122: Line 136:
   php_value always_populate_raw_post_data -1   php_value always_populate_raw_post_data -1
   # php_value date.timezone Europe/Riga   # php_value date.timezone Europe/Riga
 +
 +  * For Nginx the configuration file is located in ''/​etc/​nginx/​conf.d/​zabbix.conf''​. Some PHP settings are already configured. But it's necessary to uncomment and set ''​listen''​ and/or ''​server_name''​ directives, as well as the %%"​%%date.timezone%%"​%% setting and [[http://​php.net/​manual/​en/​timezones.php|set the right timezone]] for you.
 +
 +  # listen 80;
 +  # server_name example.com;​
 +  # date.timezone = Europe/Riga
  
 Now you are ready to proceed with [[manual/​installation/​install#​installing_frontend|frontend installation steps]] which will allow you to access your newly installed Zabbix. Now you are ready to proceed with [[manual/​installation/​install#​installing_frontend|frontend installation steps]] which will allow you to access your newly installed Zabbix.
 +
 +Note that a Zabbix proxy does not have a frontend; it communicates with Zabbix server only.
  
 <​note>​Zabbix official repository provides fping, iksemel, libssh2 packages as well. These packages are located in the //​[[https://​repo.zabbix.com/​non-supported/​|non-supported]]//​ directory.</​note>​ <​note>​Zabbix official repository provides fping, iksemel, libssh2 packages as well. These packages are located in the //​[[https://​repo.zabbix.com/​non-supported/​|non-supported]]//​ directory.</​note>​
 +
 +If you use RHEL 6 please read the section about [[manual/​installation/​install_from_packages/​rhel_centos#​zabbix_frontend_and_server_on_rhel_6|using Zabbix frontend on RHEL 6]] on how to configure the frontend.
 +
  
 === SELinux configuration === === SELinux configuration ===
Line 178: Line 203:
 ==== Java gateway installation ==== ==== Java gateway installation ====
  
-It is required to install [[:​manual/​concepts/​java|Java gateway]] if you want to monitor JMX applications. Java gateway is lightweight and does not require a database.+It is required to install [[:​manual/​concepts/​java|Java gateway]] ​only if you want to monitor JMX applications. Java gateway is lightweight and does not require a database.
  
 Once the required [[#​adding_zabbix_repository|repository]] is added, you can install Zabbix Java gateway by running: Once the required [[#​adding_zabbix_repository|repository]] is added, you can install Zabbix Java gateway by running:
Line 184: Line 209:
   # yum install zabbix-java-gateway   # yum install zabbix-java-gateway
  
-Configuration parameters of Zabbix Java gateway may be tuned in the file: +Proceed to [[:​manual/​concepts/​java/​from_rhel_centos|setup]] for more details ​on configuring ​and running ​Java gateway.
- +
-  /​etc/​zabbix/​zabbix_java_gateway.conf +
- +
-For more details, see Zabbix Java gateway configuration [[:​manual:​appendix:​config:​zabbix_java|parameters]]. +
- +
-To start Zabbix Java gateway: +
- +
-  # service zabbix-java-gateway restart +
- +
-<note important>​Note that Zabbix server ​[[:​manual/​concepts/​java#​configuring_server_for_use_with_java_gateway|must be configured]] to work with Java gateway.</​note>​ +
- +
-To automatically start Zabbix Java gateway ​on boot: +
- +
-RHEL 7 and later: +
-  # systemctl enable zabbix-java-gateway +
- +
-RHEL prior to 7: +
-  # chkconfig --level 12345 zabbix-java-gateway on +
- +
-Zabbix ​Java gateway ​log file is: +
- +
-  /​var/​log/​zabbix/​zabbix_java_gateway.log +
- +
-If you like to increase the logging, edit the file: +
- +
-  /​etc/​zabbix/​zabbix_java_gateway_logback.xml +
- +
-and change ''​level=%%"​%%info%%"​%%''​ to %%"​%%debug%%"​%% or even %%"​%%trace%%"​%% (for deep troubleshooting):​ +
- +
-  <​configuration scan="​true"​ scanPeriod="​15 seconds">​ +
-  [...] +
-        <root level="​info">​ +
-                <​appender-ref ref="​FILE"​ /> +
-        </​root>​ +
-   +
-  </​configuration>​ +