Zabbix 3.0.3 Installation

Source: Internet
Author: User
Tags snmp

Zabbix v3.0.3

Required:
MySQL version: 5.0.3 or later
Oracle version: 10g or later
PHP Version: 5.4.0 or later
GD version: 2.0 or later
LibXML version: 2.6.15 or later

Official Note: https://www.zabbix.com/documentation/3.0/manual/installation/requirements


Installation:

[[Email protected] ~]# useradd -s /sbin/nologin nginxnginx Installation slightly [[email  protected] ~]# yum -y install gcc gcc-c++ make[[email protected]  ~]# yum -y install libxml2 libxml2-devel libjpeg-devel libpng-devel  bzip2-devel libcurl-devel gd-devel[[email protected] ~]# tar -zxf  PHP-5.5.0.TAR.GZ[[EMAIL PROTECTED] ~]# CD PHP-5.5.0[[EMAIL PROTECTED] PHP-5.5.0] # ./configure --prefix=/usr/local/php --with-bz2 --with-curl --enable-ftp -- Enable-sockets --enable-bcmath --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local/photo  --with-png-dir=/usr/local/photo --with-freetype-dir=/usr/local --enable-gd-native-ttf -- with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext -- With-libxml-dir=/usr/local --with-zlib --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd --enable-dom -- Enable-xml --enable-fpm --with-libdir=lib64[[email protected] php-5.5.0]# make[[email  protected] php-5.5.0]# make test[[email protected] php-5.5.0]# make  install[[email protected] php-5.5.0]# cp php.ini-production /usr/local/php/lib/ php.ini[[email protected] ~]# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/ php/etc/php-fpm.conf    [[email protected] ~]# sed -i  '/max_ Execution_time/s/30/300/'  /usr/local/php/lib/php.ini[[email protected] ~]# sed -i   '/post_max_size/s/8/16/'  /usr/local/php/lib/php.ini[[email protected] ~]# sed - i  '/max_input_time/s/60/300/'  /usr/local/php/lib/php.ini[[email protected] ~]# sed  -i  '/^;d ate.timezone/aDate.timezone \= \ "Asia\/shanghai\" '  /usr/local/php/lib/php.ini[[email protected] ~]#  sed -i  '/run\/php-fpm.pid/s/^;//g '  /usr/local/php/etc/php-fpm.conf[[email protected]  ~]# sed -i  '/^;p m.min_spare_servers/s/^;//g '  /usr/local/php/etc/php-fpm.conf[[email  protected] ~]# sed -i  '/^;p m.max_spare_servers/s/^;//g '  /usr/local/php/etc/ php-fpm.conf[[email protected] ~]# sed -i  '/^;p m.start_servers/s/^;//g '  /usr/ local/php/etc/php-fpm.conf[[email protected] ~]# /usr/local/php/sbin/php-fpm[[email  protected] ~]# echo  "/USR/LOCAL/PHP/SBIN/PHP-FPM"  >>/etc/rc.local


PHP Yum Installation:

[Email protected] ~]# yum-y install php55w php55w-mysql php55w-gd libjpeg* php55w-imap php55w-ldap php55w-odbc php55w-pe Ar php55w-xml php55w-xmlrpc php55w-mbstring php55w-mcrypt php55w-bcmath php55w-mhash libmcrypt libmcrypt-devel PHP55W-FPM php55w-cli php55w-pdo php55w-tidy php55w-pecl-memcache php55w-eaccelerator


MySQL Installation:

[[email protected] ~]# yum -y install  mysql mysql-server mysql-devel[[email protected] ~]# cp /usr/share/mysql/ my-medium.cnf /etc/my.cnf[[email protected] ~]# chkconfig mysqld on[[email  protected] ~]# /etc/init.d/mysqld start[[email protected] ~]# mysqladmin - uroot password  "Redhat" [[Email protected] ~]# mysql_secure_installation 
[[email protected] ~]# yum -y install  Net-snmp net-snmp-devel libxml2-devel libcurl-devel[[email protected] ~]# tar  -zxf zabbix-3.0.3.tar.gz[[email protected] ~]# cd zabbix-3.0.3[[email  protected] zabbix-3.0.3]# ./configure --prefix=/usr/local/zabbix --enable-server -- enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2  -- Enable-java[[email protected] zabbix-3.0.3]# make && make install[[email  protected] zabbix-3.0.3]# useradd -s /sbin/nologin zabbix 
[[email protected] ~]# mysql -uroot - predhatmysql> create database zabbix default charset utf8;mysql>  grant all privileges on zabbix.* to [email protected] identified  by  ' Zabbix ';mysql> grant all privileges on zabbix.* to [email  protected] identified by  ' Zabbix '; mysql> flush privileges; 
[[email protected] zabbix-3.0.3]# mysql -uzabbix -pzabbix zabbix <  Database/mysql/schema.sql[[email protected] zabbix-3.0.3]# mysql -uzabbix -pzabbix  zabbix < database/mysql/images.sql[[email protected] zabbix-3.0.3]# mysql  -uzabbix -pzabbix zabbix < database/mysql/data.sql[[email protected]  zabbix-3.0.3]# cp misc/init.d/fedora/core/zabbix_* /etc/init.d/[[email protected]  zabbix-3.0.3]# chmod 775 /etc/init.d/zabbix_*[[email protected] zabbix-3.0.3]#  sed -i  '/logfile/s/tmp/var\/log\/zabbix/'  /usr/local/zabbix/etc/zabbix_server.conf[[email  protected] zabbix-3.0.3]# sed -i  '/^dbuser\=/s/root/zabbix/'  /usr/local/zabbix/etc/ zabbix_server.conf[[email protected] zabbix-3.0.3]# sed -i  '/DBPassword\=$/s/^#//g '  /usr/local/zabbix/etc/zabbix_server.conf[[email protected] zabbix-3.0.3]# sed -i  '/DBPassword\=$/s/^[  \t]//g '  /usr/local/zabbix/etc/zabbix_server.conf[[email protected] zabbix-3.0.3]#  sed -i  '/dbpassword\=$/s/\=/&zabbix/g '  /usr/local/zabbix/etc/zabbix_server.conf[[email  protected] zabbix-3.0.3]# sed -i -e  '/dbport\=/s/^#//g '  /usr/local/zabbix/ etc/zabbix_server.conf -e  '/dbport\=/s/^[ \t]//g '  /usr/local/zabbix/etc/zabbix_server.conf [[email protected] zabbix-3.0.3]# sed -i  '/^server/s/127.0.0.1/192.168.70.193/g '  /usr/local/zabbix/etc/zabbix_agentd.conf[[email protected] zabbix-3.0.3]# sed -i   "/^serveractive/s/127.0.0.1/192.168.70.193:10051/g"  /usr/local/zabbix/etc/zabbix_agentd.conf[[email  protected] zabbix-3.0.3]# sed -i  "/^hostname/s/zabbix server/192.168.70.193/g"  /usr/local/zabbix/etc/zabBix_agentd.conf 
[[Email protected] zabbix-3.0.3]# mkdir /usr/local/nginx-1.6.3/html/zabbix -p[[email  protected] zabbix-3.0.3]# cp frontends/php/* /usr/local/nginx-1.6.3/html/zabbix/  -r[[email protected] zabbix-3.0.3]# chown zabbix:zabbix /usr/local/nginx-1.6.3/ html/zabbix/ -r[[email protected] zabbix-3.0.3]# chmod o+w /usr/local/ Nginx-1.6.3/html/zabbix/conf[[email protected] zabbix-3.0.3]# ln -s /usr/local/zabbix /sbin/* /usr/local/sbin/[[email protected] zabbix-3.0.3]# mkdir -p /var/log/ Zabbix[[email protected] zabbix-3.0.3]# touch /var/log/zabbix/zabbix_server.log[[email  protected] zabbix-3.0.3]# chown zabbix:zabbix /var/log/zabbix/ -R[[email  protected] ~]# /etc/init.d/zabbix_server startstarting zabbix_server:                                      [  ok  ][[email protected]  ~]# /etc/init.d/zabbix_agentd startStarting zabbix_agentd:                                      [  ok  ][[ Email protected] ~]#[[email protected] ~]# chkconfig --add zabbix_server  && chkconfig zabbix_server on[[email protected] ~]# chkconfig  --add zabbix_agentd && chkconfig zabbix_agentd on


Zabbix nginx Configuration:

[[email protected] ~]# touch /usr/local/nginx-1.6.3/logs/zabbix_access.log         location /zabbix {                 root /usr/local/nginx-1.6.3/html;                 index index.php;                 access_log       /usr/local/nginx-1.6.3/logs/zabbix_access.log;                 try_files  $uri   $uri/ / index.php? $args;        }         location ~ ^ (. +.php) (. *) $ {                 root /usr/local/nginx-1.6.3/html;                 fastcgi_buffer_size 128k;                 fastcgi_buffers 32 32k;                 fastcgi_split_path_info ^ (. +.php) (. *) $;                 include  fastcgi.conf;                 fastcgi_pass  127.0.0.1:9000;                 fastcgi_index index.php;                 fastcgi_param  PATH_INFO            $fastcgi_path_info;        } 


After the configuration is complete, start PHP, MySQL, Zabbix, nginx

Access http://IP/zabbix/index.php

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/84/3B/wKioL1eIz9HDEWHIAAC0N_MOMzc967.jpg "title=" 0.jpg " alt= "Wkiol1eiz9hdewhiaac0n_momzc967.jpg"/>

If the point next browser does not reflect, nginx and Zabbix are not reported error, you can modify the configuration file to bypass the installation wizard

[Email protected] ~]# cd/opt/server/nginx-1.2.5/html/zabbix/conf

[email protected] conf]# CP zabbix.conf.php.example zabbix.conf.php

Then modify the inside of the configuration, open again can be directly logged in, the default password is Admin/zabbix

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/84/3B/wKiom1eI0giRRA9bAAWj44xqvf0626.png "title=" 0.png " alt= "Wkiom1ei0girra9baawj44xqvf0626.png"/>

Installation is complete.

This article from "Pengcheng-soy sauce bottle" blog, declined reprint!

Zabbix 3.0.3 Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.