{"id":4634,"date":"2019-12-20T23:32:26","date_gmt":"2019-12-20T14:32:26","guid":{"rendered":"https:\/\/kumapress.com\/?p=4634"},"modified":"2019-12-20T23:32:32","modified_gmt":"2019-12-20T14:32:32","slug":"zabbix4-2%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%83%a1%e3%83%a2","status":"publish","type":"post","link":"https:\/\/kumapress.com\/?p=4634","title":{"rendered":"Zabbix4.2\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30e1\u30e2"},"content":{"rendered":"\n<p>\u30b5\u30fc\u30d0\u30fc\u306e\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3068\u3057\u3066Zabbix\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u306e\u596e\u6226\u8a18(^^)<\/p>\n<p>\u305d\u306e\u69cb\u6210<\/p>\n<p>\u30fbCentOS Linux release 7.7.1908 (Core)<br>\u30fbZabbix 4.2<br>\u30fbNginx (OS\u540c\u68b1\u306e\u30d1\u30c3\u30b1\u30fc\u30b8)<br>\u30fbPostgreSQL 12<\/p>\n<p>Nginx\u306f\u307e\u3041\u305d\u3046\u3068\u3057\u3066\u3001\u306a\u3093\u3067PostgreSQL\u306a\u306e\u304b\uff1f<\/p>\n<p>\u666e\u6bb5\u958b\u767a\u3067\u4f7f\u3063\u3066\u308b\u306e\u304cPostgreSQL\u306a\u3093\u3067\u3001\u63a1\u7528\u3057\u305f\u3060\u3051\u3063\u3066\u3053\u3068\u3067\u6df1\u3044\u610f\u5473\u306f(^^;<\/p>\n<p>\u3082\u3046\u3072\u3068\u3064\u3002\u3002\u3002<\/p>\n<p>\u5b9f\u306f\u3001<a href=\"https:\/\/www.zabbix.com\/jp\/download?zabbix=4.4&amp;os_distribution=centos&amp;os_version=7&amp;db=postgresql&amp;ws=nginx\" target=\"_blank\" rel=\"noopener noreferrer\">Zabbix\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30b5\u30a4\u30c8<\/a>\u304b\u3089\u3084\u3063\u3066\u305f\u3089\u3001PostgreSQL\u3084Nginx\u3092\u8003\u616e\u3057\u305f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d1\u30c3\u30af\u3092\u6848\u5185\u3057\u3066\u304f\u308c\u3066\u308b\u3093\u3067\u3059\u304c\u3001\u3042\u308b\u7a0b\u5ea6\u3084\u3063\u3066\u304b\u3089\u6c17\u304c\u3064\u3044\u305f\u3093\u3067\u3001\u4eca\u56de\u306f\u30d0\u30e9\u30d0\u30e9\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059(^^;<\/p>\n\n\n<h2>\u25a0SELINUX\u306e\u7121\u52b9\u5316<\/h2>\n<p># getenforce<br>Disabled<\/p>\n<p>\u3042\u3089\u3001\u6700\u521d\u304b\u3089\u7121\u52b9\u306b\u306a\u3063\u3066\u307e\u3057\u305f\u3002\u3002<\/p>\n<h2>\u25a0Nginx\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h2>\n<h3>1.Nginx\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>1)\u30ea\u30dd\u30b8\u30c8\u30ea\u8ffd\u52a0<br># vi \/etc\/yum.repos.d\/nginx.repo<\/p>\n<p>[nginx]<br>name=nginx repo<br>baseurl=http:\/\/nginx.org\/packages\/mainline\/centos\/7\/$basearch\/<br>gpgcheck=0<br>enabled=1<\/p>\n<p>2)\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br># yum install nginx<\/p>\n<h3><span style=\"font-weight: 400;\">2.PHP\u95a2\u9023\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><\/h3>\n<p>1)php \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br># yum install php<\/p>\n<p>2)php\u95a2\u9023\u30e2\u30b8\u30e5\u30fc\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br># yum install php-mbstring php-pdo php-xml php-zip php-fpm php-pgsql php-bcmath php-gettext php-gd<\/p>\n<p>3)PHP-fpm\u306e\u8a2d\u5b9a\u7de8\u96c6<br>user = nginx<br>group = nginx<\/p>\n<p>4)\u30bb\u30c3\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u30fb\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u5909\u66f4<br># chown -R nginx:nginx \/var\/lib\/php\/session\/<\/p>\n<p>5)PHP-fpm\u306e\u8d77\u52d5<br># systemctl start php-fpm<br># systemctl enable php-fpm<\/p>\n<p>6)\/etc\/php.ini\u306e\u7de8\u96c6<br>date.timezone = &#8220;Asia\/Tokyo&#8221;<br>post_max_size = 16M<\/p>\n<h3>3.<span style=\"font-weight: 400;\">Nginx\u8a2d\u5b9a\u7de8\u96c6<\/span><\/h3>\n<h4>1)zabbix\u7528\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002<\/h4>\n<p>\u30aa\u30ea\u30b8\u30ca\u30eb\u306f\u30ea\u30cd\u30fc\u30e0\u3057\u3066\u4fdd\u5b58\u3057\u3066\u304a\u304f<br># cp default.conf zabbix.conf<br># mv default.conf default.org<\/p>\n<h4>2)zabbix.conf\u3092\u7de8\u96c6\u3059\u308b<\/h4>\n<p>Zabbix\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306f\u201d\/zabix\u201d\u3067\u884c\u3046(^^;<\/p>\n<p><strong>a)zabbix\u7528\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002\u30aa\u30ea\u30b8\u30ca\u30eb\u306f\u30ea\u30cd\u30fc\u30e0\u3059\u308b<\/strong><br># cp default.conf zabbix.conf<br># mv default.conf default.org<\/p>\n<p><strong>b)\/etc\/nginx\/conf.d\/zabbix.conf\u3092\u7de8\u96c6\u3059\u308b<\/strong><\/p>\n<p>listen 80;<br>server_name hogehoge.com;<\/p>\n<p>#charset koi8-r;<br>access_log \/var\/log\/nginx\/zabbix.access.log main;<br>error_log \/var\/log\/nginx\/zabbix.error.log warn;<\/p>\n<p>location \/ {<br>\u3000root \/usr\/share\/nginx\/html;<br>\u3000index index.html index.htm;<br>}<\/p>\n<p>location \/zabbix {<br>\u3000alias \/usr\/share\/zabbix;<br>\u3000index index.php;<br>\u3000if (!-e $request_filename) {<br>\u3000\u3000rewrite ^\/zabbix(.+)$ \/zabbix\/index.php?q=$1 last;<br>\u3000\u3000break;<br>\u3000}<br>}<\/p>\n<p>location ~ ^\/zabbix\/.+\\.php$ {<br>\u3000fastcgi_pass 127.0.0.1:9000;<br>\u3000fastcgi_index index.php;<br>\u3000fastcgi_split_path_info ^\/zabbix(.+\\.php)(.*)$;<br>\u3000fastcgi_param SCRIPT_FILENAME \/usr\/share\/zabbix$fastcgi_script_name;<br>\u3000include fastcgi_params;<br>}<\/p>\n<p><strong>c)\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u3092\u5909\u66f4\u3059\u308b<\/strong><br>\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u753b\u9762\u3092\u52d5\u304b\u3059\u3068\u3001nginx\u306e\u30a8\u30e9\u30fc\u30ed\u30b0\u306b\u300cupstream sent too big header while reading response header from upstream\u300d<br>\u3063\u3066\u306e\u304c\u30d0\u30f3\u30d0\u30f3\u51fa\u308b\u3002<br>\u300c\u30ec\u30b9\u30dd\u30f3\u30b9\u30d8\u30c3\u30c0\u30fc\u304c\u5927\u304d\u3059\u304e\u308b\u300d\u3068\u3044\u3046\u3053\u3068\u3067\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>nginx.conf\u306b\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3059\u308b\u3002<br>fastcgi_buffers 8 16k;<br>fastcgi_buffer_size 32k;<\/p>\n<p>nginx\u3092\u518d\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<p><code><\/code><\/p>\n\n\n<h2 class=\"wp-block-heading\">Zabbix\u30b5\u30fc\u30d0\u30fc\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>\u203b\u53c2\u8003\u306fZabbix\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30b5\u30a4\u30c8\u304b\u3089<\/p>\n<p>PostgreSQL\u306f\u3059\u3067\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3055\u308c\u3066\u3044\u3066\u201dzabbix\u201d\u3063\u3066DB\u304c\u3067\u304d\u3066\u308b\u3082\u306e\u3068\u3057\u307e\u3059<\/p>\n<h3>1.<span style=\"font-weight: 400;\">Zabbix\u30b5\u30fc\u30d0\u30fc\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8<\/span><span style=\"font-weight: 400;\">\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/span><\/h3>\n<p># rpm -ivh https:\/\/repo.zabbix.com\/zabbix\/4.2\/rhel\/7\/x86_64\/zabbix-release-4.2-2.el7.noarch.rpm<br \/># yum install zabbix-server-pgsql zabbix-web-pgsql zabbix-web-japanese zabbix-agent<\/p>\n<h3>2.Zabbix\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u521d\u671f\u8a2d\u5b9a\u3092\u884c\u3046<\/h3>\n<p># zcat \/usr\/share\/doc\/zabbix-server-pgsql-4.2.8\/create.sql.gz | sudo -u zabbix psql zabbix<br \/>Enter password for new role: DB\u30aa\u30fc\u30ca\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9<\/p>\n<h3>3.<span style=\"font-weight: 400;\">Zabbix\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u305f\u3081\u306e\u8a2d\u5b9a\u3059\u308b<\/span><\/h3>\n<p># vi \/etc\/zabbix\/zabbix_server.conf<\/p>\n<p>DBName=zabbix<br \/>DBUser=zabbix<br \/>DBPassword=DB\u30aa\u30fc\u30ca\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9<\/p>\n<h3>4.\u6240\u6709\u8005\u306e\u5909\u66f4<\/h3>\n<p>apache\u3068\u306a\u3063\u3066\u3044\u308b\u306e\u3092nginx\u306b\u5909\u66f4\u3059\u308b<\/p>\n<p># <span style=\"font-weight: 400;\">chown -R nginx. \/etc\/zabbix\/web<\/span><\/p>\n<h3>5.\u3042\u308c\u3053\u308c\u8d77\u52d5\u3059\u308b<\/h3>\n<p># systemctl start nginx<br \/># systemctl enable nginx<br \/># systemctl start zabbix-server<br \/># systemctl enable zabbix-server<\/p>\n<p>\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Zabbix\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h2>\n\n\n<p>http:\/\/hogehoge.com\/zabix\u3067\u8d77\u52d5\u3059\u308b\u3068Zabbix\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u753b\u9762\u304c\u8d77\u52d5\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><strong>1)\u30c8\u30d3\u30e9\u306e\u753b\u9762<\/strong><\/p>\n<p>&#8220;Next step&#8221;\u3057\u307e\u3057\u3087\u3046\uff01<\/p>\n<p><strong>2)\u300cCheck of pre-requisites\u300d<\/strong><\/p>\n<p>\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30c1\u30a7\u30c3\u30af\u753b\u9762\u3067\u3059\u3002<\/p>\n<p>\u30a8\u30e9\u30fc\u304c\u7121\u304f\u306a\u308b\u307e\u3067\u7de8\u96c6\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>php.ini\u3092\u4fee\u6b63\u3057\u3066\u518d\u63cf\u753b\u3057\u3066\u3082\u30a8\u30e9\u30fc\u304c\u7121\u304f\u306a\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u7d50\u5c40\u306f\u30b5\u30fc\u30d0\u30fc\u3092\u518d\u8d77\u52d5\u3057\u307e\u3057\u305f(^^;<\/p>\n<p>&#8220;Next step&#8221;\u3057\u307e\u3057\u3087\u3046\uff01<\/p>\n<p><strong>3)\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u63a5\u7d9a\u753b\u9762\u3060\u3063\u305f\u3093\u3067\u3059\u304c\u3002\u3002<\/strong><br \/>\u30b3\u30d4\u30fc\u5fd8\u308c\u307e\u3057\u305forz<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u63a5\u7d9a\u30d1\u30e9\u30e1\u30fc\u30bf\u30bb\u30c3\u30c8\uff01<\/p>\n<p>&#8220;Next step&#8221;\u3057\u307e\u3057\u3087\u3046\uff01<\/p>\n<p><strong>4)\u300cZabbix server details\u300d<\/strong><\/p>\n<p>Zabbix\u30b5\u30fc\u30d0\u30fc\u3068\u306e\u63a5\u7d9a\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<p>Host\uff1alocalhost<br \/>Port\uff1a10051\u00a0 Zabbix\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30dd\u30fc\u30c8<br \/>Name\uff1a\u9069\u5f53(\u79c1\u306fzabix\u3068\u3057\u307e\u3057\u305f)<\/p>\n<p>&#8220;Next step&#8221;\u3057\u307e\u3057\u3087\u3046\uff01<\/p>\n<p><strong>5)\u300cPre-installation Summary\u300d<\/strong><\/p>\n<p>\u8a2d\u5b9a\u78ba\u8a8d\u753b\u9762\u3067\u3059\u3002<\/p>\n<p>OK\u306a\u3089\u3001&#8221;Next step&#8221;\u3057\u307e\u3057\u3087\u3046\uff01<\/p>\n<p><strong>6)\u300cInstall\u300d<\/strong><\/p>\n<p>OK\u306a\u3089\u3001&#8221;Finish&#8221;\u3057\u307e\u3057\u3087\u3046\uff01<\/p>\n\n\n\n\n<h2 class=\"wp-block-heading\">\u30a8\u30d4\u30ed\u30fc\u30b0\u3002\u3002<\/h2>\n\n\n<p>\u306f\u3044\u3001\u304a\u75b2\u308c\u3055\u307e\u3067\u3057\u305f\uff01<\/p>\n<p>\u3053\u308c\u3067\u3001Zabbix\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u304c\u898b\u308c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u30ed\u30b0\u30a4\u30f3\u753b\u9762\u304c\u51fa\u307e\u3059\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u304c\u6c7a\u307e\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30e6\u30fc\u30b6\u30fc\uff1aAdmin<\/p>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\uff1azabbix<\/p>\n<p>\u3053\u308c\u304c\u308f\u304b\u3089\u305a\u53f3\u5f80\u5de6\u5f80\u3057\u307e\u3057\u305f(^^;<\/p>\n<p>\u305d\u308c\u3068\u6700\u521d\u306f\u82f1\u8a9e\u753b\u9762\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u753b\u9762\u53f3\u4e0a\u306e\u4eba\u5f62\u30de\u30fc\u30af\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30e6\u30fc\u30b6\u30fc\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u8a2d\u5b9a\u753b\u9762\u958b\u304d\u307e\u3059\u3002<\/p>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5909\u66f4\u3068\u8a00\u8a9e\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p><aside class=\"row veu_insertAds after\"><div class=\"col-md-6\"><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u7b2c 1 \u9762 - 2\uff08www.kumapress.com\uff09 -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-5987681888830890\"\r\n     data-ad-slot=\"5379270693\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><\/div><div class=\"col-md-6\"><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u7b2c 1 \u9762 - 1\uff08www.kumapress.com\uff09 -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-5987681888830890\"\r\n     data-ad-slot=\"7353370294\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><\/div><\/aside>","protected":false},"excerpt":{"rendered":"<p>\u30b5\u30fc\u30d0\u30fc\u306e\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3068\u3057\u3066Zabbix\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002 \u305d\u306e\u596e\u6226\u8a18(^^) \u305d\u306e\u69cb\u6210 \u30fbCentOS Linux release 7.7.1908 (Core)\u30fbZabbix 4.2\u30fbNginx (OS\u540c\u68b1\u306e\u30d1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"vkexunit_cta_each_option":"","footnotes":""},"categories":[126],"tags":[158],"class_list":["post-4634","post","type-post","status-publish","format-standard","hentry","category-blog-memo","tag-zabbix"],"_links":{"self":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts\/4634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4634"}],"version-history":[{"count":15,"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts\/4634\/revisions"}],"predecessor-version":[{"id":4649,"href":"https:\/\/kumapress.com\/index.php?rest_route=\/wp\/v2\/posts\/4634\/revisions\/4649"}],"wp:attachment":[{"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kumapress.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}