In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The Zabbix3.0 interface has taken on a new look, changing the old face of more than 10 years. The update of alpha4 is recorded as follows: http://www.zabbix.com/rn3.0.0alpha4.php
What's New in 3.0.0alpha4
The installation process of Zabbix 3.0 is similar to that of 2.x, but there are a few pits that need to be paid attention to (the red ones below), otherwise they will not work.
Basic environment:
CentOS 6.6 X64
Nginx:1.9.7
Mysql:5.5.32
PHP:5.5.30 (zabbix_3.0 requires php version to be at least 5.4 +)
1. Nginx installation:
1.rpm-qa pcre pcre-devel2.yum install pcre pcre-devel openssl openssl-devel-y3.mkdir-p / usr/local/nginx-1.9.74.useradd nginx- s / sbin/nologin-M5../configure-- user=nginx-- group=nginx-- prefix=/usr/local/nginx-1.9.7-- with-http_stub_status_module-- with-http_ssl_modulemake & & make installln-s / usr/local/nginx-1.9.7 / usr/local/nginx6.ls -l / usr/local/7./usr/local/nginx/sbin/nginx8.ps-ef | grep nginx9.ss-lntup | grep nginx [root @ zabbix_3.0 conf] # egrep-v "# | ^ $" nginx.conf.default > nginx.confession [root @ zabbix_3.0 conf] # vim / usr/local/nginx/conf/nginx.confworker_processes 1 Error_log / usr/local/nginx/logs/error.log;-- add a new line events {worker_connections 1024;} http {include mime.types;default_type application/octet-stream;sendfile on;keepalive_timeout 65 position gzip on;-- add a new line server {listen 80 / serverSecretname localhost;access_log / usr/local/nginx/logs/access.log;-- add a new line root / usr/local/nginx/html;-change to / usr/local/nginx/html, the original value is html Index index.php index.html index.htm;-add an index.phperror_page 500 502 503 504 / 50x.htmltransposition location = / 50x.html {--delete this line root html;-delete this line}-delete this line-- delete this line-- below the newly added content location ~\. (php | php5)? ${# root / usr/local/nginx/html;fastcgi_pass 127.0.0.1 Fastcgi_param SCRIPT_FILENAME / usr/local/nginx/html$fastcgi_script_name;include fastcgi_params;} 10. Provide init script for nginx and create a new file / etc/rc.d/init.d/nginx Copy the following to the newly created nginx file: #! / bin/sh#nx-this script starts and stops the nginx daemon## chkconfig:-85 "description: Nginx is an HTTP (S) server, HTTP (S) reverse\ # proxy and IMAP/POP3 proxy server# processname: nginx# config: / usr/local/nginx/conf/nginx.conf# config: / etc/sysconfig/nginx# pidfile: / usr/local/nginx/logs/nginx.pid# Source function library.. / etc/rc.d/init.d/functions# Source networking configuration.. / etc/sysconfig/network# Check that networking is up. ["$NETWORKING" = "no"] & & exit 0nginx = "/ usr/local/nginx/sbin/nginx" prog=$ (basename $nginx) NGINX_CONF_FILE= "/ usr/local/nginx/conf/nginx.conf" [- f / usr/local/nginx] & &. / usr/local/nginxlockfile=/var/lock/subsys/nginxmake_dirs () {# make required directoriesuser= `nginx-V 2 > & 1 | grep "configure arguments:" | sed's / [^ *] *-user=\ ([^] *\). * /\ 1configure arguments:' g'-`options= `$ nginx-V 2 > & 1 | grep 'configure arguments:' `for opt in $options; doif [`echo $opt | grep'. *-temp-path' `]; thenvalue= `echo $opt | cut-d "="-f 2`if [!-d "$value"] Then# echo "creating" $valuemkdir-p $value & & chown-R $user $valuefifidone} start () {[- x $nginx] | | exit 5 [- f $NGINX_CONF_FILE] | | exit 6make_dirsecho-n $"Starting $prog:" daemon $nginx-c $NGINX_CONF_FILEretval=$?echo [$retval-eq 0] & & touch $lockfilereturn $retval} stop () {echo-n $"Stopping $prog:" killproc $prog-QUITretval=$?echo [$retval-eq 0] & rm-f $lockfilereturn $retval} restart () {configtest | | return $? stopsleep 1start} reload () {configtest | | return $? echo-n $"Reloading $prog:" killproc $nginx-HUPRETVAL=$?echo} force_reload () {restart} configtest () {$nginx-t-c $NGINX_CONF_FILE} rh_status () {status $prog} rh_status_q () {rh_status > / dev/null 2 > & 1} case "$1" instart) rh_status_q & exit 0 $1 ; stop) rh_status_q | | exit 0 $1x restart | configtest) $1x reload) rh_status_q | | exit 7 $1x force force reload) rh_status;;condrestart | try-restart) rh_status_q | | exit X *) echo $"Usage: $0 {start | stop | status | restart | condrestart | try-restart | reload | force-reload | configtest}" exit 2esac11. Add startup items and make the service: [root@localhost nginx-1.9.7] chmod + x / etc/rc.d/init.d/nginx [root@localhost nginx-1.9.7] chkconfig-- add nginx [root@localhost nginx-1.9.7] chkconfig nginx on [root@localhost php] # ps-A | grep nginx62878? 00:00:00 nginx62879? 00:00:00 nginx
2. MySql installation: binary package (170m)
# yum install tree nmap lrzsz dos2unix-y # mkdir-p / usr/local/mysql-5.5.32 [root@zabbix_3.0] # tar-zxvf mysql-5.5.32-linux2.6-x86_ 64.tar.gz [root @ zabbix_3.0] # mv mysql-5.5.32-linux2.6-x86_64 / usr/local/mysql-5.5.32 [root@zabbix_3.0] # ln-s / usr/local/mysql-5.5.32 / / usr/local/ MySQL [root @ zabbix_3.0] # useradd mysql-s / sbin/nologin-M [root @ zabbix_3.0] # chown-R mysql.mysql / usr/local/ MySQL [root @ zabbix_3.0] # cd / usr/local/ MySQL [root @ zabbix_3.0 mysql]-- create system table #. / scripts/mysql_install_db-- basedir=/usr/local/mysql-- datadir=/usr/local/mysql/data/-- User=mysqlcp support-files/mysql.server / etc/init.d/mysqld-- this step does not need to do sed-I's etc/init.d/mysqldcp support-files/my-small.cnf etc/init.d/mysqldcp support-files/my-small.cnf etc/my.cnfcp: does it override "/ etc/my.cnf"? Yecho 'export PATH=/usr/local/mysql/bin:$PATH' > > / etc/profile# source / etc/ profile [root @ zabbix_3.0] # echo $PATH/usr/local/mysql/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/ bin [root @ zabbix_3.0 application] # cp -a / application/mysql/bin/* / usr/local/ server [root @ zabbix_3.0 application] # service mysqld start [root @ zabbix_3.0 application] # chkconfig mysqld on [root @ zabbix_3.0 application] # mysqladmin-uroot password 123456
3. PHP installation:
1.yum-y install zlib-devel libxml2-devel libjpeg-devel libiconv-devel freetype-devel libpng-devel gd-devel curl-devel libxslt-devel2.wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gztar zxf libiconv-1.14.tar.gzmkdir-p / usr/local/libiconvcd libiconv-1.14./configure-- prefix=/usr/local/libiconvmake & & make installcd.. / 3.yum-y install libmcrypt-devel mhash mcrypt--these three rpm packages must be installed It is not available in the standard YUM source of CentOS6.6 system. You need to download and install ln-s / usr/local/mysql/lib/libmysqlclient.so.18 / usr/lib64/php 5.5.30 from the EPEL source: (--with-mysqli=mysqlnd and-- with-gettext must be added. Otherwise, when the former is not installed, database type has no option to install zabbix. By default, the database is SqLite 3 and cannot be switched, while the latter is not installed. PHP gettext warning) mkdir-p / usr/local/php-5.5.30tar-zxvf php-5.5.30.tar.gzcd php-5.5.30./configure\-- prefix=/usr/local/php-5.5.30\-- with-mysql=/usr/local/mysql/\-- with-mysqli=mysqlnd\-- with-pdo-mysql=mysqlnd\-- with-iconv-dir=/usr/local/libiconv\-- with-freetype-dir\-- with-jpeg-dir\-- -with-png-dir\-- with-zlib\-- with-libxml-dir=/usr\-- with-gettext\-- enable-xml\-- disable-rpath\-- enable-bcmath\-- enable-shmop\-- enable-sysvsem\-- enable-inline-optimization\-- with-curl\-- enable-mbregex\-enable-fpm\-enable-mbstring\-- with-mcrypt\-- with-gd\-- enable-gd-native-ttf\-- with-openssl\-- -with-mhash\-- enable-pcntl\-- enable-sockets\-- with-xmlrpc\-- enable-soap\-- enable-short-tags\-- enable-static\-- with-xsl\-with-fpm-user=nginx\-- with-fpm-group=nginx\-- enable-ftp\-- enable-opcache=no enter +-- -- + | License: | | This software is subject to the PHP License Available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | | | +-+ Thank you for using PHP.config.status: creating php5.specconfig.status: creating main/build-defs.hconfig.status: creating scripts/phpizeconfig.status: creating | Scripts/man1/phpize.1config.status: creating scripts/php-configconfig.status: creating scripts/man1/php-config.1config.status: creating sapi/cli/php.1config.status: creating sapi/fpm/php-fpm.confconfig.status: creating sapi/fpm/init.d.php-fpmconfig.status: creating sapi/fpm/php-fpm.serviceconfig.status: creating sapi/fpm/php-fpm.8config.status: creating sapi/fpm/status.htmlconfig.status: creating sapi/cgi/php-cgi.1config.status : creating ext/phar/phar.1config.status: creating ext/phar/phar.phar.1config.status: creating main/php_config.hconfig.status: executing default commands#make & & make installGenerating phar.phpGenerating phar.pharPEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.directorytreeiterator.incdirectorygraphiterator.incinvertedregexiterator.incclicommand.incpharcommand.incphar.incBuild complete.Don't forget to run 'make test'.Installing PHP CLI binary: / usr/local/php-5.5.30/bin/Installing PHP CLI Man page: / usr/local/php-5.5.30/php/man/man1/Installing PHP FPM binary: / usr/local/php-5.5.30/sbin/Installing PHP FPM config: / usr/local/php-5.5.30/etc/Installing PHP FPM man page: / usr/local/php-5.5.30/php/man/man8/Installing PHP FPM status page: / usr/local/php-5.5.30/php/php/fpm/Installing PHP CGI Binary: / usr/local/php-5.5.30/bin/Installing PHP CGI man page: / usr/local/php-5.5.30/php/man/man1/Installing build environment: / usr/local/php-5.5.30/lib/php/build/Installing header files: / usr/local/php-5.5.30/include/php/Installing helper programs: / usr/local/php-5.5.30/bin/program: phpizeprogram: php-configInstalling man pages: / usr/local/php-5.5.30/php/man/man1/page: phpize.1page: php-config.1Installing PEAR environment: / usr/local/php-5.5.30/lib/php/ [PEAR] Archive_Tar-installed: 1.3.12 [PEAR] Console_Getopt-installed: 1.3.1 [PEAR] Structures_Graph- installed: 1.0.4 [PEAR] XML_Util-installed: 1.2.3 [PEAR] PEAR-installed: 1.9.5Wrote PEAR system config file at: / usr/local/php-5.5.30/etc/pear.confYou may want to add: / usr/local/php-5.5.30/lib/php to your php.ini include_path/root/software/php-5.5.30/build/shtool install-c ext/phar/phar.phar / usr/local/php-5.5.30/binln-s-f phar.phar / usr/local/php-5.5.30/bin/pharInstalling PDO headers : / usr/local/php-5.5.30/include/php/ext/pdo/ [root@zabbix_3.0 php-5.5.30] # make test-- do not do this step Is to test [root@zabbix_3.0 php-5.5.30] # ln-s / usr/local/php-5.5.30/ / usr/local/php generate configuration php configuration file [root@zabbix_3.0 php-5.5.30] # pwd/root/software/php-5.5.30 [root@zabbix_3.0 php-5.5.30] # cp php.ini-production / usr/local/php/lib/php.ini [ Root@zabbix_3.0 php-5.5.30] # cd / usr/local/php/etc/ [root @ zabbix_3.0 etc] # pwd/usr/local/php/ ETC [root @ zabbix_3.0 etc] # cp php-fpm.conf.default php-fpm.confphp launch test [root@zabbix_3.0 etc] # / usr/local/php/sbin/php-fpm verify whether [root@zabbix_3.0 etc] # netstat-lntup is launched successfully | grep php-fpm
Verify that the LNMP installation is successful.
4. Zabbix installation:
[root@zabbix_3.0 ~] # tar-zxvf zabbix-3.0.0.tar.gz [root@zabbix_3.0 ~] # groupadd zabbix [root @ zabbix_3.0 ~] # useradd-g zabbix zabbix [root @ zabbix_3.0 ~] # ln-s / usr/local/libiconv/lib/libiconv.so.2 / usr/lib/libiconv.so.2 # add a soft connection [root@zabbix_3.0 ~] # / sbin/ldconfig # to make the configuration immediate Effective [root@zabbix_3.0 ~] # mkdir-p / usr/local/ zabbix [root @ zabbix_3.0 ~] # cd software/zabbix-3.0.0 [root@oldboy zabbix-3.0.0] #. / configure-- prefix=/usr/local/zabbix-- enable-server-- enable-agent-- with-mysql-- enable-ipv6-- with-net-snmp-- with-libcurl-- with-libxml2 parameter description-prefix=/usr/local/zabbix refers to Set the installation directory to / usr/local/zabbix-enable-server for installing zabbix server programs-enable-agent for installing agent programs-with-mysql for using mysql database-enable-ipv6 for enabling ipv6 support-with-net-snmp for enabling snmp support-with-libcurl for enabling curl-with-libxml2 compiling xml module Mainly used to monitor vm virtual machine error checking for net-snmp-config... Noconfigure: error: Invalid Net-SNMP directory-unable to find net-snmp-config [root@zabbix zabbix-3.0.0] # rpm-qa | grep net-snmp-devel-found that the package is not available. Install the package for YUM [root@zabbix zabbix-3.0.0] # yum install net-snmp-devel loaded plug-ins: fastestmirror, refresh-packagekit Security setup installation process Loading mirror speeds from cached hostfile resolves dependencies-- > perform transaction check-- > Package net-snmp-devel.x86_64 1 49.el6_5.3 will be installation-- > handle dependencies tcp_wrappers-devel It is required by package 1:net-snmp-devel-5.5-49.el6_5.3.x86_64-- > handle dependency rpm-devel, it is required by package 1:net-snmp-devel-5.5-49.el6_5.3.x86_64-- > deal with dependency lm_sensors-devel, it is required by package 1:net-snmp-devel-5.5-49.el6_5.3.x86_64-- > handle dependency elfutils-devel It was installed by the package 1:net-snmp-devel-5.5-49.el6_5.3.x86_64 need-- > perform transaction check-- > Package elfutils-devel.x86_64 0VOR 0.158-3.2.el6 will be installation-- > Package lm_sensors-devel.x86_64 0RO 3.1.1-17.el6 will be installation-> Package rpm-devel.x86_64 0RO 4.8.0-37.el6 will be Install-- > handle dependency popt-devel (x86-64) It is required by the package rpm-devel-4.8.0-37.el6.x86_64-- > handles dependencies file-devel (x86-64) It is required by the package rpm-devel-4.8.0-37.el6.x86_64-- > Package tcp_wrappers-devel.x86_64 0Package tcp_wrappers-devel.x86_64 7.6-57.el6 will be installation-- > perform transaction check-- > Package file-devel.x86_64 0Package tcp_wrappers-devel.x86_64 5.04-21.el6 will be installation-- > Package popt-devel.x86_64 0Package tcp_wrappers-devel.x86_64 1.13-7.el6 will be installation-- > complete the dependency meter. Calculate dependency resolution = package architecture version repository size = installing: net-snmp-devel x86 "64 1purl 5.5-49.el6_5.3 c6-media 304k install for dependencies: elfutils-devel x86" 64 0.158-3.2.el6 c6-media 74 kfile-devel x86 "64 5.04-21.el6 c6-media 26 klm_sensors-devel x86" 64 3.1.1-17.el6 c6-media 22 kpopt -devel x86 "64 1.13-7.el6 c6-media 21 krpm-devel x86" 64 4.8.0-37.el6 c6-media 93 ktcp_wrappers-devel x86 "64 7.6-57.el6 c6-media 15k transaction Summary = Install 7 Package (s) Total downloads: 555 kInstalled size: 1.3m are you sure? Enter y enter-- execute configure again Compiled through [root@oldboy zabbix-3.0.0] # make & & make install [root @ zabbix_3.0 ~] # chown-R zabbix:zabbix / usr/local/zabbix/ [root @ zabbix_3.0 ~] # mkdir-p / var/log/zabbix-server [root@zabbix_3.0 ~] # mkdir-p / var/log/zabbix-agentd [root@zabbix_3.0 ~] # chown-R zabbix:zabbix / var/log/zabbix-server/ [root@zabbix # chown-R zabbix:zabbix / var/log/zabbix-agentd/ [root@oldboy zabbix-3.0.0] # mysql-uroot-pmysql > create database zabbix character set utf8 collate utf8_bin Mysql > grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';mysql > flush privileges;mysql > quit
Import SQL in the order of SQL statements:
Shell > mysql-uzabbix-p zabbix
< database/mysql/schema.sql# stop here if you are creating database for Zabbix proxyshell>Mysql-uzabbix-p zabbix
< database/mysql/p_w_picpaths.sqlshell>Mysql-uzabbix-p zabbix
< database/mysql/data.sql 1.修改zabbix.conf: [root@oldboy zabbix-3.0.0]# vim /usr/local/zabbix/etc/zabbix_server.conf增加:DBName=zabbix #数据库名称DBUser=zabbix #数据库用户名DBPassword=zabbix #数据库密码ListenIP=localhost #数据库ip地址 (--根据实际情况更改)AlertScriptsPath=****/zabbix/alertscripts #zabbix运行脚本存放目录LogFile=/var/log/zabbix-server/zabbix_server.log --更改Logfile的值为/var/log/zabbix-server/zabbix_server.log,原来的默认值为/tmp/zabbix_server.log[root@oldboy zabbix-3.0.0]# vim /usr/local/zabbix/etc/zabbix_agentd.confLogFile=/var/log/zabbix-agentd/zabbix_agentd.log --更改Logfile的值为/var/log/zabbix-agentd/zabbix_agentd.log,原来的默认值为/tmp/zabbix_agentd.logHostname=test202 2.zabbix 3.0启动方式: [root@oldboy zabbix-3.0.0]# cp /root/software /zabbix-3.0.0/misc/init.d/fedora/core/zabbix_server /etc/rc.d/init.d/zabbix_server #服务端[root@oldboy zabbix-3.0.0]# cp /root/software/zabbix-3.0.0/misc/init.d/fedora/core/zabbix_agentd /etc/rc.d/init.d/zabbix_agentd #客户端[root@oldboy zabbix-3.0.0]# vi /etc/rc.d/init.d/zabbix_server# Zabbix-DirectoryBASEDIR=/usr/local/zabbix --更改BASEDIR的值为/usr/local/zabbix,原来的值为/usr/local,如果安装时不指定--prefix,就默认安装在/usr/local,因为我安装zabbix在/usr/local/zabbix同理,也把zabbix_agentd的BASEDIR的值改为/usr/local/zabbixshell>Zabbix_serverzabbix_server [15644]: cannot open "/ var/log/zabbix-server/zabbix_server.log": [13] Permission denied error reporting is a matter of permission. Set the var/log/zabbix-server directory and all its files to zabbix users and groups to which zabbix belongs
3. Write / usr/local/zabbix/sbin directory, / usr/local/nginx/sbin directory, / usr/local/php/sbin directory to the environment variable PATH of / etc/profile
# vi / etc/profileexport PATH=/usr/local/zabbix/sbin:/usr/local/nginx/sbin:/usr/local/php/sbin:/usr/local/mysql/bin:$PATH'# source / etc/profile
4. Then start php
[root@oldboy zabbix-3.0.0] # / usr/local/php/sbin/php-fpm
5. Configure the web environment:
[root@oldboy zabbix-3.0.0] # cd / root/software/zabbix-3.0.0/frontends [root@oldboy zabbix-3.0.0] # cp-rf php / usr/local/nginx/html/zabbix
6. Enter http://10.101.0.15/zabbix into the browser and enter enter.
7. Modify php.ini: (php5.5 default value is small)
Vim / usr/local/php/lib/php.ini mainly consists of the following parameters-- find the above parameter in vi, then modify its value PHP option post_max_size 16m-- change value to 16m, original value to 8MPHP option max_execution_time 300m-change value to 300m, original value to 60PHP option max_input_time 300-change value to 300, original value to 30PHP time zone Asia/Shanghai-add value to Asia/Shanghai, the original value is empty. And put the front Remove it to make it effective: X
8. It doesn't matter whether you modify the port here or not, if you don't bring it with you when compiling php-- with-mysqli=mysqlnd, you will tragically find that what appears by default here is SQLite3 and cannot be replaced.
9. You need to give zabbix.conf.php permission to / usr/local/nginx/html/zabbix/conf in this directory, otherwise install will report an error before and you need to download conf and authorize it.
10. Installation is complete at this point. The interface is as follows (it is better than before. )
If you think this article is helpful to you, you are welcome to follow the DBA study notes on Wechat official account: guestart. Your support is my greatest encouragement!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.