centos7灯环境安装zabbix3.0

  

zabbix3.0要求的PHP,数据库,Apache/Nginx的版本参考:

zabbix3.0对PHP,数据库,Nginx/Apache版本要求参考:https://www.zabbix.com/documentation/3.0/manual/installation/requirements


本次安装的系统环境为<强> centos7.2 强,灯。第一次安装使用的版本是centos6.6, lnmp。安装后均可正常使用。

<强> mysql版本

[root@aliyun-s2  ~] #, mysql  - v   Welcome 用,MariaDB 监控只,Commands 最终获得with ,趁机\ g。   Your  MariaDB  connection  id  is  4572年   Server 版本:5.5.52-MariaDB  MariaDB 服务器      Copyright  (c), 2000年,2016年,甲骨文,MariaDB  Corporation  Ab 以及其他信息。      Reading  history-file /根/.mysql_history   Type 帮助;”,或“\ h”, for 帮助只Type ‘\ c’,用clear 从而current  input 语句。

创建zabbix库,授权zabbix用户

create  database  zabbix  default  charset  use utf8;   grant  all  privileges 提醒zabbix。*,用zabbix@ ' localhost ', identified  by “zabbix”;   flush 特权;   MariaDB [(一)]祝辞,show 数据库;   +--------------------+   |,Database ,,, |   +--------------------+   |,information_schema |   |,mysql ,,,,, |   |,performance_schema |   |,zabbix ,,,, |   +--------------------+   4,rows  set 拷贝;(0.03,sec)

<强> php安装

yum  install  php  php-fpm  php-mysql  php-gd  libjpeg *, php-ldap  php-odbc  php-pear  php-xmlrpc  php-mbstring  php-bcmath  - y [root@djlink-aliyun-s2  ~] #, php  - v   PHP  5.4.16  (cli),(建立:Nov , 6, 2016, 00:29:02),   Copyright  (c), 1997 - 2013,从而PHP 组   Zend  Engine  v2.4.0, Copyright  (c), 1998 - 2013, Zend 技术      vim /etc/php . ini   亚洲/上海date.timezone =,   post_max_size =16米   max_execution_time =300   max_input_time  300=,

启动php-fpm

<强> apache为百胜安装

vim /etc/httpd/conf/httpd . conf   #把配置地址修改为将要安装的zabbix位置,   DocumentRoot  "/var/www/html/zabbix-3.0.9”   ServerSignature    #增加对。php的默认   DirectoryIndex  index.html  index . php      #进行部分优化   Options  Includes  ExecCGI  FollowSymLinks   Options  FollowSymLinks   AllowOverride    MaxKeepAliveRequests  500   AddDefaultCharset  GB2312   max_execution_time =300   systemctl  restart  httpd.service

创建测试。php是php验证否正常

echo “& lt; ? php  phpinfo();, ?在“,祝辞,/var/www/html/zabbix/test.php

显示phpinfo界面为正常,然后删除test.php

<强>安装zabbix

下载zabbix3.0 LTS,下载速度有点慢,建议用其他工具下载本地后,rz上传

wget  https://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.0.9/zabbix-3.0.9.tar.gz   tar  zxf  zabbix-3.0.9.tar.gz ,, cd  zabbix-3.0.9   。/configure ——prefix=/usr/地方/zabbix-3.0.9/,——enable-server ——enable-agent ——with-mysql ——with-net-snmp ——with-libcurl ——with-libxml2   make ,,, make 安装

创建zabbix用户

groupadd  zabbix   useradd  zabbix  -s /sbin/nologin  -M  -g  zabbix

导入3个sql文件到zabbix数据库

mysql  -uroot  -p  zabbix  & lt;数据库/mysql/schema.sql   mysql  -uroot  -pzabbix  & lt;数据库/mysql/p_w_picpaths.sql   mysql  -uroot  -p  zabbix  & lt;,数据库/mysql/data.sql

编辑zabbix_server。参看

vim /usr/地方/zabbix-3.0.9/etc/zabbix_server.conf   日志文件=/tmp/zabbix_server.log   PidFile=/tmp/zabbix_server.pid   DBHost=localhost   DBName=zabbix   dbus=zabbix   DBPassword=zabbix

启动zabbix_server

/usr/地方/zabbix-3.0.9/sbin/zabbix_server

访问网页进行安装,中间一个步骤需要下载文件并上,传上传后需修改所属。

centos7灯环境安装zabbix3.0