Установка Zabbix на сервер

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql
yum install zabbix-agent
Источник https://www.zabbix.com/documentation/3.0/ru/manual/installation/install_from_packages

shell> mysql -uroot -p<password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<пароль>';
mysql> quit;
Источник https://www.zabbix.com/documentation/3.0/ru/manual/appendix/install/db_scripts
cd /usr/share/doc/zabbix-server-mysql-3.0.0
# zcat create.sql.gz | mysql -uroot zabbix
nano /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
systemctl start zabbix-server
mkdir /etc/ssl/private
mv zabbix.key /etc/ssl/private/
chown root:root /etc/ssl/private/zabbix.key
chmod 400 /etc/ssl/private/zabbix.key
mv zabbix.pem /etc/ssl/certs/
chown root:root /etc/ssl/certs/zabbix.pem
chmod 400 /etc/ssl/certs/zabbix.pem
Источник https://wiki.archlinux.org/index.php/Zabbix_with_NGINX_how-to_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)#.D0.9D.D0.B0.D1.81.D1.82.D1.80.D0.BE.D0.B9.D0.BA.D0.B0_NGINX
cat /etc/httpd/conf.d/zabbix.conf
#
# Zabbix monitoring system php web frontend
#
Alias /zabbix /usr/share/zabbix
<Directory "/usr/share/zabbix">
    Options FollowSymLinks
    AllowOverride None
    Require all granted
    <IfModule mod_php5.c>
        php_value max_execution_time 300
        php_value memory_limit 128M
        php_value post_max_size 16M
        php_value upload_max_filesize 2M
        php_value max_input_time 300
        php_value always_populate_raw_post_data -1
        # php_value date.timezone Europe/Riga
    </IfModule>
</Directory>
<Directory "/usr/share/zabbix/conf">
    Require all denied
</Directory>
<Directory "/usr/share/zabbix/app">
    Require all denied
</Directory>
<Directory "/usr/share/zabbix/include">
    Require all denied
</Directory>
<Directory "/usr/share/zabbix/local">
    Require all denied
</Directory>
nano /etc/nginx/conf.d/zabbix.conf
server {
        listen       host:443;
        server_name  host;
        charset  utf-8;
        access_log  /var/log/nginx/zabbix.access.log  main;
        error_log   /var/log/nginx/zabbix.error.log;
        ssl                  on;
        ssl_certificate      /etc/ssl/certs/zabbix.pem;
        ssl_certificate_key  /etc/ssl/private/zabbix.key;
        ssl_session_timeout  5m;
        ssl_protocols  SSLv3 TLSv1;
        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;
        location / {
            root   /usr/share/zabbix;
            index  index.php;
        }
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        }
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /usr/share/zabbix$fastcgi_script_name;
            fastcgi_param  PHP_VALUE  "post_max_size = 16M
    max_execution_time = 300
    max_input_time = 300";
            include        fastcgi_params;
        }
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
            deny  all;
        }
        # deny access to Zabbix files
        location ~* /(?:api|conf|include)/ {
            return 301 $server_name/index.php;
        }
    }
service nginx restart
Please make sure that /etc/zabbix/web/ is accessible for the account running the apache server (normally httpd,apache or www-data)
So also check permissions on the directories:
/etc (should be fine)
/etc/zabbix
/etc/zabbix/web
Источник https://www.zabbix.com/forum/showthread.php?t=43893
Yes! You are right! Directroy /var/lib/php/session was owner apache, I changed it to nginx.
Источник https://www.zabbix.com/forum/showthread.php?t=53105
nano /etc/php.ini
date.timezone=Europe/Moscow
chown nginx /etc/zabbix/web/
nano /etc/zabbix/zabbix_agentd.conf
systemctl start zabbix-agent
GRANT SELECT ON vk.* TO 'zabbix-agent'@'localhost' identified by 'zabba';
yum -y install unixODBC unixODBC-devel
yum install mysql-connector-odbc
odbcinst -j
Источник https://www.zabbix.com/documentation/3.0/ru/manual/config/items/itemtypes/odbc_checks
unixODBC 2.3.1
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
nano /etc/odbc.ini
[db]
Description = MySQL vk database
Driver      = mysql
Server      = 127.0.0.1
User        = zabbix-agent
Password    = zabba
Port        = 3306
Database    = db
isql db
SHOW FULL PROCESSLIST;