1.Добавление репозитария Zabbix Отсюда скачиваем и устанавливаем пакет для добавления репозитария http://repo.zabbix.com/zabbix/ Centos 6 64-бит(x86_64)
|
# wget http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm |
32-бит(i386)
|
# wget http://repo.zabbix.com/zabbix/2.4/rhel/6/i386/zabbix-release-2.4-1.el6.noarch.rpm |
Centos7
|
# wget http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm |
В моем случае Centos 6 x86_64
|
# wget http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm |
|
# rpm –Uhv zabbix-release-2.4-1.el6.noarch.rpm |
2.Установка Zabbix-сервера и Zabbix-агента(клиента)
|
# yum install zabbix-agent zabbix-server-mysql zabbix-web-mysql |
Будет использоваться связка Nginx+PHP-FPM 3.Настройка PHP-FPM Используем отдельный пул с пользователем zabbix
|
# egrep -v '(^;|^$)' /etc/php-fpm.d/zabbix.conf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
[zabbix] listen = /var/run/php5-fpm-zabbix.sock listen.allowed_clients = 127.0.0.1 listen.owner = zabbix listen.group = nginx listen.mode = 0660 user = zabbix group = zabbix pm = dynamic pm.max_children = 10 pm.start_servers = 2 pm.min_spare_servers = 2 pm.max_spare_servers = 5 pm.max_requests = 500 pm.status_path = /status-zabbix ping.path = /ping-zabbix ping.response = pong request_terminate_timeout = 300 request_slowlog_timeout = 3s slowlog = /var/log/php-fpm/zabbix-slow.log catch_workers_output = yes php_admin_value[error_log] = /var/log/php-fpm/zabbix-error.log php_admin_flag[log_errors] = on php_admin_value[memory_limit] = 128M php_admin_value[max_execution_time] = 300 php_admin_value[post_max_size] = 16M php_admin_value[upload_max_filesize] = 2M php_admin_value[max_input_time] = 300 php_value[session.save_handler] = files php_value[session.save_path] = /var/lib/php/session-zabbix |
|
# mkdir /var/lib/php/session-zabbix |
|
# chown -R zabbix:zabbix /var/lib/php/session-zabbix |
|
date.timezone = Europe/Kiev |
[…]