Centos6.4下源码安装zabbix3.4.4
来源:互联网 发布:java rsa 公钥 私钥 编辑:程序博客网 时间:2024/05/29 18:37
安装文档参考官方文档:
https://www.zabbix.com/documentation/3.4/zh/manual/installation/install#installation_from_sources
安装之前先看一下安装要求:
https://www.zabbix.com/documentation/3.4/zh/manual/installation/requirements
主要是PHP支持需要5.4以上等等.
[root@zabbix_server zabbix]# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built: Feb 22 2013 11:19:58
[root@zabbix_server mysql]# php -v
PHP 5.3.3 (cli) (built: Feb 22 2013 02:51:11)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
我这里apache版本够,但是php版本需要升级.升级办法可以问度娘.
1.下载解压缩
下载地址https://www.zabbix.com/download选择源码下载.
[root@zabbix_server zabbix-3.4.4]# tar -zxvf zabbix-3.4.0.tar.gz
drwxr-xr-x 1001/1001 0 2017-11-09 18:37 zabbix-3.4.4/
drwxr-xr-x 1001/1001 0 2017-11-09 18:37 zabbix-3.4.4/include/
-rw-r--r-- 1001/1001 17737 2017-11-09 18:37 zabbix-3.4.4/include/config.h.in
-rw-r--r-- 1001/1001 31 2017-11-09 18:37 zabbix-3.4.4/include/stamp-h1
-rw-r--r-- 1001/1001 1092 2017-11-09 18:37 zabbix-3.4.4/include/alias.h
-rw-r--r-- 1001/1001 3623 2017-11-09 18:37 zabbix-3.4.4/include/memalloc.h
-rw-r--r-- 1001/1001 1469 2017-11-09 18:37 zabbix-3.4.4/include/zbxicmpping.h
-rw-r--r-- 1001/1001 3542 2017-11-09 18:37 zabbix-3.4.4/include/zbxserver.h
-rw-r--r-- 1001/1001 1299 2017-11-09 18:37 zabbix-3.4.4/include/telnet.h
-rw-r--r-- 1001/1001 1903 2017-11-09 18:37 zabbix-3.4.4/include/zbxmodules.h
...
...
...
-rw-r--r-- 1001/1001 857 2017-11-09 18:37 zabbix-3.4.4/upgrades/dbpatches/2.0/mysql/rc4_rc5.sql
drwxr-xr-x 1001/1001 0 2017-11-09 18:37 zabbix-3.4.4/upgrades/dbpatches/2.0/oracle/
-rw-r--r-- 1001/1001 123000 2017-11-09 18:37 zabbix-3.4.4/upgrades/dbpatches/2.0/oracle/patch.sql
-rw-r--r-- 1001/1001 1095 2017-11-09 18:37 zabbix-3.4.4/upgrades/dbpatches/2.0/oracle/rc4_rc5.sql
drwxr-xr-x 1001/1001 0 2017-11-09 18:37 zabbix-3.4.4/upgrades/dbpatches/2.0/postgresql/
-rw-r--r-- 1001/1001 124954 2017-11-09 18:37 zabbix-3.4.4/upgrades/dbpatches/2.0/postgresql/patch.sql
-rw-r--r-- 1001/1001 1107 2017-11-09 18:37 zabbix-3.4.4/upgrades/dbpatches/2.0/postgresql/rc4_rc5.sql
drwxr-xr-x 1001/1001 0 2017-11-09 18:37 zabbix-3.4.4/upgrades/dbpatches/2.2/
-rw-r--r-- 1001/1001 630 2017-11-09 18:37 zabbix-3.4.4/upgrades/dbpatches/2.2/README
2.添加操作系统用户zabbix
[root@zabbix_server zabbix-3.4.4]# groupadd zabbix
[root@zabbix_server zabbix-3.4.4]# useradd -g zabbix zabbix
3.创建zabbix数据库,初始化数据
这里使用mysql数据库.mysql的安装就不介绍了,
zabbix数据库创建官方详细文档见:https://www.zabbix.com/documentation/3.4/zh/manual/appendix/install/db_scripts
[root@zabbix_server Packages]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 10.1.28-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
#创建数据库和用户名密码
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all on *.* to 'zabbix'@'%' identified by 'zabbix';
Query OK, 0 rows affected (0.01 sec)
[root@zabbix_server mysql]# pwd
/data/soft/zabbix-3.4.4/database/mysql
#导入三个初始化脚本.如果只安装代理则只需要导入第一个
[root@zabbix_server mysql]# ls
data.sql images.sql schema.sql
[root@zabbix_server mysql]# mysql -u zabbix -pzabbix -S /data/log/mysql.sock zabbix <schema.sql
[root@zabbix_server mysql]# mysql -u zabbix -pzabbix -S /data/log/mysql.sock zabbix < images.sql
[root@zabbix_server mysql]# mysql -u zabbix -pzabbix -S /data/log/mysql.sock zabbix < data.sql
4.编译安装zabbix
一.创建zabbix的安装目录,这里放在/data/zabbix下
[root@zabbix_server zabbix-3.4.4]# mkdir -p /data/zabbix
二.配置zabbix源码包
配置之前系统可能会缺少一些lib库文件,主要是一些devel开发包.可能需要的如下:
可能需要安装一些软件包:
yum install unixODBC-devel
yum install Curl-devel
yum install net-snmp-devel
yum install OpenIPMI-devel
yum install openmpi-devel
yum install libevent-devel
yum install libpcre-devel
--prefix指定安装目录,--with-mysql指定数据库类型,--enable-server指定需要安装的类型.其它的指定的是一些安装选项
[root@zabbix_server zabbix-3.4.4]# ./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-openipmi --with-unixodbc --prefix=/data/zabbix
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
...
...
...
Configuration:
Detected OS: linux-gnu
Install path: /data/zabbix
Compilation arch: linux
Compiler: gcc
Compiler flags: -g -O2
Library-specific flags:
database: -I/usr/local/mysql/include/mysql -I/usr/local/mysql/include/mysql/..
libXML2: -I/usr/include/libxml2
unixODBC: -I/usr/include
Net-SNMP: -I/usr/include/rpm -I/usr/local/include -I/usr/lib64/perl5/CORE -I. -I/usr/include
Enable server: yes
Server details:
With database: MySQL
WEB Monitoring: cURL
Native Jabber: no
SNMP: yes
IPMI: no
SSH: no
TLS: no
ODBC: yes
Linker flags: -L/usr/local/mysql/lib -L/usr/lib64 -L/usr/lib64 -rdynamic
Libraries: -lmysqlclient -lxml2 -lodbc -lnetsnmp -levent -lcurl -lm -ldl -lrt -lresolv -lpcreposix -lpcre
Enable proxy: no
Enable agent: yes
Agent details:
TLS: no
Linker flags: -rdynamic
Libraries: -lcurl -lm -ldl -lrt -lresolv -lpcreposix -lpcre
Enable Java gateway: no
LDAP support: no
IPv6 support: yes
***********************************************************
* Now run 'make install' *
* *
* Thank you for using Zabbix! *
* <http://www.zabbix.com> *
***********************************************************
三.编译和安装
使用make和make install来安装:
[root@zabbix_server zabbix-3.4.4]# make
Making all in src
make[1]: Entering directory `/data/soft/zabbix-3.4.4/src'
Making all in libs
make[2]: Entering directory `/data/soft/zabbix-3.4.4/src/libs'
Making all in zbxcrypto
make[3]: Entering directory `/data/soft/zabbix-3.4.4/src/libs/zbxcrypto'
gcc -DHAVE_CONFIG_H -I. -I../../../include -g -O2 -MT libzbxcrypto_a-md5.o -MD -MP -MF .deps/libzbxcrypto_a-md5.Tpo -c -o libzbxcrypto_a-md5.o `test -f 'md5.c' || echo './'`md5.c
mv -f .deps/libzbxcrypto_a-md5.Tpo .deps/libzbxcrypto_a-md5.Po
gcc -DHAVE_CONFIG_H -I. -I../../../include -g -O2 -MT libzbxcrypto_a-base64.o -MD -MP -MF .deps/libzbxcrypto_a-base64.Tpo -c -o libzbxcrypto_a-base64.o `test -f 'base64.c' || echo './'`base64.c
mv -f .deps/libzbxcrypto_a-base64.Tpo .deps/libzbxcrypto_a-base64.Po
gcc -DHAVE_CONFIG_H -I. -I../../../include -g -O2 -MT libzbxcrypto_a-tls.o -MD -MP -MF .deps/libzbxcrypto_a-tls.Tpo -c -o libzbxcrypto_a-tls.o `test -f 'tls.c' || echo './'`tls.c
mv -f .deps/libzbxcrypto_a-tls.Tpo .deps/libzbxcrypto_a-tls.Po
rm -f libzbxcrypto.a
ar cru libzbxcrypto.a libzbxcrypto_a-md5.o libzbxcrypto_a-base64.o libzbxcrypto_a-tls.o
...
...
...
Making all in misc
make[1]: Entering directory `/data/soft/zabbix-3.4.4/misc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/data/soft/zabbix-3.4.4/misc'
Making all in upgrades
make[1]: Entering directory `/data/soft/zabbix-3.4.4/upgrades'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/data/soft/zabbix-3.4.4/upgrades'
make[1]: Entering directory `/data/soft/zabbix-3.4.4'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/data/soft/zabbix-3.4.4'
[root@zabbix_server zabbix-3.4.4]# make install
....
make[2]: Entering directory `/data/soft/zabbix-3.4.4/upgrades'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/data/soft/zabbix-3.4.4/upgrades'
make[1]: Leaving directory `/data/soft/zabbix-3.4.4/upgrades'
make[1]: Entering directory `/data/soft/zabbix-3.4.4'
make[2]: Entering directory `/data/soft/zabbix-3.4.4'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/data/soft/zabbix-3.4.4'
make[1]: Leaving directory `/data/soft/zabbix-3.4.4'
5.修改zabbix配置文件
安装完成后,安装目录在上面指定的/data/zabbix下,其中sbin存放的是守护进程,bin放的是工具.etc存放的是配置文件,share存放的是帮助和一些脚本.lib是库文件
可以将zabbix的执行目录添加到PATH环境变量中.
可以将zabbix的执行目录添加到PATH环境变量中.
[root@zabbix_server sbin]# env |grep PATH
PATH=/data/zabbix/bin:/data/zabbix/sbin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin
MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles
[root@zabbix_server zabbix]# pwd
/data/zabbix
[root@zabbix_server zabbix]# ls -l
total 20
drwxr-xr-x 2 root root 4096 Dec 2 21:16 bin
drwxr-xr-x 4 root root 4096 Dec 2 21:16 etc
drwxr-xr-x 2 root root 4096 Dec 2 21:16 lib
drwxr-xr-x 2 root root 4096 Dec 2 21:16 sbin
drwxr-xr-x 4 root root 4096 Dec 2 21:16 share
我们先创建一个log目录来存放zabbix的日志,由于zabbix server启动的时候会以zabbix用户启动,所以此log目录需要赋予zabbix的权限:
[root@zabbix_server zabbix]# mkdir log
[root@zabbix_server zabbix]# chown -R zabbix.zabbix /data/zabbix/log
[root@zabbix_server zabbix]# ls
bin etc lib log sbin share
再到etc下修改zabbix_server.conf.主要修改数据库的连接信息:数据库名,用户名,密码.日志文件目录等,其它的一些暂时都是默认的
[root@zabbix_server etc]# vi zabbix_server.conf
[root@zabbix_server etc]# grep -v '^#' zabbix_server.conf |grep -v '^$'
LogFile=/data/zabbix/log/zabbix_server.log
LogFileSize=10
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBSocket=/data/log/mysql.sock
DBPort=3306
Timeout=4
LogSlowQueries=3000
6.启动zabbix server
启动进程只需要执行相应的可执行文件即可:
[root@zabbix_server zabbix]# zabbix_server
[root@zabbix_server zabbix]# ps -ef |grep zabbix
zabbix 30198 1 0 22:00 ? 00:00:00 zabbix_server
zabbix 30199 30198 0 22:00 ? 00:00:00 zabbix_server: configuration syncer [waiting 60 sec for processes]
zabbix 30200 30198 0 22:00 ? 00:00:00 zabbix_server: alerter #1 started
zabbix 30201 30198 0 22:00 ? 00:00:00 zabbix_server: alerter #2 started
zabbix 30202 30198 0 22:00 ? 00:00:00 zabbix_server: alerter #3 started
zabbix 30203 30198 0 22:00 ? 00:00:00 zabbix_server: housekeeper [startup idle for 30 minutes]
zabbix 30204 30198 0 22:00 ? 00:00:00 zabbix_server: timer #1 [processed 0 triggers, 0 events in 0.000000 sec, 0 maintenances in 0.000000 sec, idle 30 sec]
zabbix 30205 30198 0 22:00 ? 00:00:00 zabbix_server: http poller #1 [got 0 values in 0.087634 sec, idle 5 sec]
zabbix 30206 30198 0 22:00 ? 00:00:00 zabbix_server: discoverer #1 [processed 0 rules in 0.001495 sec, idle 60 sec]
zabbix 30207 30198 0 22:00 ? 00:00:00 zabbix_server: history syncer #1 [synced 0 items in 0.000001 sec, idle 1 sec]
zabbix 30208 30198 0 22:00 ? 00:00:00 zabbix_server: history syncer #2 [synced 0 items in 0.000001 sec, idle 1 sec]
zabbix 30209 30198 0 22:00 ? 00:00:00 zabbix_server: history syncer #3 [synced 0 items in 0.000001 sec, idle 1 sec]
zabbix 30210 30198 0 22:00 ? 00:00:00 zabbix_server: history syncer #4 [synced 0 items in 0.000001 sec, idle 1 sec]
zabbix 30211 30198 0 22:00 ? 00:00:00 zabbix_server: escalator #1 [processed 0 escalations in 0.000368 sec, idle 3 sec]
zabbix 30212 30198 0 22:00 ? 00:00:00 zabbix_server: proxy poller #1 [exchanged data with 0 proxies in 0.000009 sec, idle 5 sec]
zabbix 30213 30198 0 22:00 ? 00:00:00 zabbix_server: self-monitoring [processed data in 0.000003 sec, idle 1 sec]
zabbix 30214 30198 0 22:00 ? 00:00:00 zabbix_server: task manager [started, idle 5 sec]
zabbix 30215 30198 0 22:00 ? 00:00:00 zabbix_server: poller #1 [got 0 values in 0.000008 sec, idle 5 sec]
zabbix 30216 30198 0 22:00 ? 00:00:00 zabbix_server: poller #2 [got 0 values in 0.000008 sec, idle 5 sec]
zabbix 30217 30198 0 22:00 ? 00:00:00 zabbix_server: poller #3 [got 0 values in 0.000008 sec, idle 5 sec]
zabbix 30218 30198 0 22:00 ? 00:00:00 zabbix_server: poller #4 [got 0 values in 0.000012 sec, idle 5 sec]
zabbix 30219 30198 0 22:00 ? 00:00:00 zabbix_server: poller #5 [got 0 values in 0.000008 sec, idle 5 sec]
zabbix 30228 30198 0 22:00 ? 00:00:00 zabbix_server: unreachable poller #1 [got 0 values in 0.000009 sec, idle 5 sec]
zabbix 30229 30198 0 22:00 ? 00:00:00 zabbix_server: trapper #1 [processed data in 0.000000 sec, waiting for connection]
zabbix 30230 30198 0 22:00 ? 00:00:00 zabbix_server: trapper #2 [processed data in 0.000000 sec, waiting for connection]
zabbix 30231 30198 0 22:00 ? 00:00:00 zabbix_server: trapper #3 [processed data in 0.000000 sec, waiting for connection]
zabbix 30232 30198 0 22:00 ? 00:00:00 zabbix_server: trapper #4 [processed data in 0.000000 sec, waiting for connection]
zabbix 30233 30198 0 22:00 ? 00:00:00 zabbix_server: trapper #5 [processed data in 0.000000 sec, waiting for connection]
zabbix 30234 30198 0 22:00 ? 00:00:00 zabbix_server: icmp pinger #1 [got 0 values in 0.000017 sec, idle 5 sec]
zabbix 30235 30198 0 22:00 ? 00:00:00 zabbix_server: alert manager #1 started
zabbix 30236 30198 0 22:00 ? 00:00:00 zabbix_server: preprocessing manager #1 started
zabbix 30237 30198 0 22:00 ? 00:00:00 zabbix_server: preprocessing worker #1 started
zabbix 30238 30198 0 22:00 ? 00:00:00 zabbix_server: preprocessing worker #2 started
zabbix 30245 30198 0 22:00 ? 00:00:00 zabbix_server: preprocessing worker #3 sta
查看一下日志:
[root@zabbix_server log]# vi zabbix_server.log
30198:20171202:220059.447 Starting Zabbix Server. Zabbix 3.4.4 (revision 74338).
30198:20171202:220059.447 ****** Enabled features ******
30198:20171202:220059.447 SNMP monitoring: YES
30198:20171202:220059.447 IPMI monitoring: NO
30198:20171202:220059.447 Web monitoring: YES
30198:20171202:220059.447 VMware monitoring: YES
30198:20171202:220059.447 SMTP authentication: NO
30198:20171202:220059.447 Jabber notifications: NO
30198:20171202:220059.447 Ez Texting notifications: YES
30198:20171202:220059.447 ODBC: YES
30198:20171202:220059.447 SSH2 support: NO
30198:20171202:220059.447 IPv6 support: YES
30198:20171202:220059.447 TLS support: NO
30198:20171202:220059.448 ******************************
30198:20171202:220059.448 using configuration file: /data/zabbix/etc/zabbix_server.conf
30198:20171202:220059.990 current database version (mandatory/optional): 03040000/03040005
30198:20171202:220059.990 required mandatory version: 03040000
30198:20171202:220100.076 server #0 started [main process]
30201:20171202:220100.079 server #3 started [alerter #2]
30202:20171202:220100.080 server #4 started [alerter #3]
30203:20171202:220100.080 server #5 started [housekeeper #1]
30204:20171202:220100.080 server #6 started [timer #1]
30205:20171202:220100.080 server #7 started [http poller #1]
30206:20171202:220100.081 server #8 started [discoverer #1]
30207:20171202:220100.081 server #9 started [history syncer #1]
30208:20171202:220100.082 server #10 started [history syncer #2]
30209:20171202:220100.082 server #11 started [history syncer #3]
30210:20171202:220100.082 server #12 started [history syncer #4]
30211:20171202:220100.082 server #13 started [escalator #1]
30212:20171202:220100.083 server #14 started [proxy poller #1]
30213:20171202:220100.083 server #15 started [self-monitoring #1]
30214:20171202:220100.083 server #16 started [task manager #1]
30215:20171202:220100.083 server #17 started [poller #1]
30216:20171202:220100.084 server #18 started [poller #2]
30217:20171202:220100.084 server #19 started [poller #3]
30218:20171202:220100.084 server #20 started [poller #4]
30200:20171202:220100.085 server #2 started [alerter #1]
30219:20171202:220100.085 server #21 started [poller #5]
30199:20171202:220100.087 server #1 started [configuration syncer #1]
30229:20171202:220100.090 server #23 started [trapper #1]
30230:20171202:220100.091 server #24 started [trapper #2]
30231:20171202:220100.094 server #25 started [trapper #3]
30232:20171202:220100.094 server #26 started [trapper #4]
30233:20171202:220100.095 server #27 started [trapper #5]
30234:20171202:220100.095 server #28 started [icmp pinger #1]
30235:20171202:220100.095 server #29 started [alert manager #1]
30236:20171202:220100.096 server #30 started [preprocessing manager #1]
30237:20171202:220100.096 server #31 started [preprocessing worker #1]
30228:20171202:220100.096 server #22 started [unreachable poller #1]
30238:20171202:220100.097 server #32 started [preprocessing worker #2]
30245:20171202:220100.099 server #33 started [preprocessing worker #3]
7.安装zabbix web界面
一.复制PHP文件
Zabbix前端使用PHP写的,所以必须运行在PHP支持的Web服务器上。只需要简单的从frontends/php路径下复制PHP文件到Web服务器的HTML文件目录,就可以完成安装。
Apache Web服务器的HTML文件目录的一般包括:
/usr/local/apache2/htdocs (从源代码安装Apache的默认目录)
/srv/www/htdocs (OpenSUSE, SLES)
/var/www/html (Fedora, RHEL, CentOS)
/var/www (Debian, Ubuntu)
:
建议使用子目录替代HTML根目录。我们这里是redhat6使用的rpm安装的httpd.所以是在/var/www/html下,这里我们在html下新建一个zabbix目录,然后将解压缩文件中的php目录下的所有文件拷贝到新建的zabbix下
[root@zabbix_server html]# pwd
/var/www/html
[root@zabbix_server html]# mkdir zabbix
[root@zabbix_server html]# cp -rf /data/soft/zabbix-3.4.4/frontends/php/* zabbix
[root@zabbix_server html]# ls zabbix/
actionconf.php adm.regexps.php applications.php chart3.php conf graphs.php host_screen.php imgstore.php latest.php popup_httpstep.php report4.php search.php sysmap.php triggers.php
adm.gui.php adm.triggerdisplayoptions.php audio chart4.php conf.import.php history.php hosts.php include local popup_media.php robots.txt services.php sysmaps.php tr_logform.php
adm.housekeeper.php adm.triggerseverities.php auditacts.php chart5.php correlation.php host_discovery.php httpconf.php index.php locale popup.php screenconf.php setup.php templates.php tr_status.php
adm.iconmapping.php adm.valuemapping.php auditlogs.php chart6.php discoveryconf.php hostgroups.php httpdetails.php items.php maintenance.php popup_trexpr.php screenedit.php slideconf.php toptriggers.php tr_testexpr.php
adm.images.php adm.workingtime.php authentication.php chart7.php disc_prototypes.php hostinventoriesoverview.php image.php js map.import.php profile.php screen.import.php slides.php tr_comments.php usergrps.php
adm.macros.php api_jsonrpc.php browserwarning.php chart.php favicon.ico hostinventories.php images jsLoader.php map.php queue.php screens.php srv_status.php tr_events.php users.php
adm.other.php app
二.安装前端
首先启动http:
[root@zabbix_server ~]# service httpd status
httpd (pid 30396) is running...
[root@zabbix_server ~]#
登录web界面访问:http://192.168.56.131/zabbix
如果出错或者无显示,查看http的日志:tail -f /var/log/httpd/error_log,如果出现如下信息说明php版本过低
[root@zabbix_server zabbix]# tail -f /var/log/httpd/error_log
[Sat Dec 02 22:28:07 2017] [notice] Digest: generating secret for digest authentication ...
[Sat Dec 02 22:28:07 2017] [notice] Digest: done
[Sat Dec 02 22:28:07 2017] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured -- resuming normal operations
[Sat Dec 02 22:28:07 2017] [warn] ./mod_dnssd.c: No services found to register
[Sat Dec 02 22:28:23 2017] [error] [client 192.168.56.1] PHP Parse error: syntax error, unexpected '[' in /var/www/html/zabbix/index.php on line 32
[Sat Dec 02 22:28:26 2017] [error] [client 192.168.56.1] PHP Parse error: syntax error, unexpected '[' in /var/www/html/zabbix/index.php on line 32
[Sat Dec 02 22:28:27 2017] [error] [client 192.168.56.1] PHP Parse error: syntax error, unexpected '[' in /var/www/html/zabbix/index.php on line 32
[Sat Dec 02 22:28:27 2017] [error] [client 192.168.56.1] PHP Parse error: syntax error, unexpected '[' in /var/www/html/zabbix/index.php on line 32
正常应该出现如下setup:
点击next step,进入预检查,发现有一些php的配置失败:
修改相关的php配置,在/etc/php.ini中,其中date.timezone = Asia/Shanghai 使用yum来安装php56w-bcmath包.完成之后重启httpd然后查看保证全部都是ok:
这里下一步的时候可能会报错,那是因为httpd用户即apache用户没有权限对/var/www/html/zabbix/conf写权限.直接将zabbix/conf赋予777权限即可.也可以下载conf文件然后上传到指定目录:
Zabbix前端已经就绪!地址:http://192.168.56.131/zabbix 默认的用户名是Admin,密码是zabbix
阅读全文
0 0
- Centos6.4下源码安装zabbix3.4.4
- CentOS7 下 Zabbix3.4 源码安装
- Centos6.5 安装Zabbix3.4
- Centos6.5 安装zabbix3
- Centos6.5 安装zabbix3
- Centos6.5 安装zabbix3
- CentOS6.7下LNMP环境安装zabbix3.0
- centos6.8安装zabbix3.2
- centos6.5 zabbix3.2.7安装
- centos6.8安装zabbix3.2
- 源码安装zabbix3.0.0
- zabbix3.0源码安装
- CentOS6.4下源码安装MySQL5.6.15
- CentOS6下源码安装php7
- centos6.5下zabbix3.26搭建
- centos6.5 zabbix3.0服务端安装
- zabbix3.0源码安装 亲测
- centos7安装zabbix3.4
- 手把手教新手小白在window把自己的项目上传到github
- CF Round# 449 Div2 B. Chtholly's request
- PhotoShop CC 2017软件工具面板使用---污点修复画笔工具
- CentOS 7安装图形界面
- JAVA学习笔记17——Spring框架第四章
- Centos6.4下源码安装zabbix3.4.4
- 运维小结之dhcp服务配置
- Python Data Analysis Cookbook.pdf 英文原版 免费下载
- UVALive 6631|Jingle Balls|树形DP
- openCV3.X+VS2015+Windows10环境配置详解
- hadoop中使用MapReduce编程实例(转---超级实用)
- CSS 初印象【一】
- 资源整理
- VMware下使用Gparted对系统盘扩容