博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
centos 7 安装zabbix2.4
阅读量:6476 次
发布时间:2019-06-23

本文共 3484 字,大约阅读时间需要 11 分钟。

1 Installing repository configuration package

Install the repository configuration package. This package contains yum configuration files.

-- 查看centos 版本cat /etc/redhat-release rpm -q centos-release-- Zabbix 2.4 for RHEL7, Oracle Linux 7, CentOS 7:sudo rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
2 Installing Zabbix packages

Install Zabbix packages. Example for Zabbix server and web frontend with mysql database.

Zabbix official repository provides fping, iksemel, libssh2 packages as well. These packages are located in the non-supported directory.

sudo yum install zabbix-server-mysql zabbix-web-mysqlsudo yum install zabbix-agent
3 Creating initial database
ls /usr/share/doc/zabbix-server-mysql-2.4.8/create/此目录下有三个数据库脚步文件:schema.sql, images.sql and data.sql** 注意 :For a Zabbix proxy database, only schema.sql should be imported (no images.sql nor data.sql)shell> mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '
';mysql> quit;shell> mysql -uzabbix -p
zabbix < database/mysql/schema.sql=>mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/schema.sql ( shell 提示 Enter password: )** 注意 :stop here if you are creating database for Zabbix proxyshell> mysql -uzabbix -p
zabbix < database/mysql/images.sqlshell> mysql -uzabbix -p
zabbix < database/mysql/data.sql
3 Starting Zabbix server process

Edit database configuration in zabbix_server.conf

sudo vi /etc/zabbix/zabbix_server.confDBHost=localhostDBName=zabbixDBUser=zabbixDBPassword=zabbixStart Zabbix server process:sudo service zabbix-server start或者sudo systemctl start zabbix-server.service查看服务状态 systemctl status  zabbix-server
4 Editing PHP configuration for Zabbix frontend

Apache configuration file for Zabbix frontend is located in /etc/httpd/conf.d/zabbix.conf.

php_value max_execution_time 300php_value memory_limit 128Mphp_value post_max_size 16Mphp_value upload_max_filesize 2Mphp_value max_input_time 300#php_value date.timezone Europe/Riga -- 去掉注释,本地化为PRC

按照官网配置以上内容,启动zabbix服务,即搭建完成zabbix(zabbix站点);在浏览器访问。

问题汇总

1、参考手册完成安装后,在浏览器访问http://zabbix-serser-hostname(ip)/zabbix ,出现 “Forbidden ->You don't have permission to access /zabbix/ on this server.”;访问http://zabbix-serser-hostname(ip)/zabbix/index.php时,页面显示php源码。分析:apache 无法解析php网页解决方案:sudo vi /etc/httpd/conf.d/zabbix.conf添加如下配置
# If php is turned on, we respect .php and .phps files.AddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps# Since most users will want index.php to work we# also automatically enable index.php
DirectoryIndex index.html index.php
重启apache** 2、/etc/httpd/conf.d/zabbix.conf 文件**Alias /zabbix /usr/share/zabbix (zabbix php 文件目录)
Options FollowSymLinksAllowOverride NoneRequire all granted
# If php is turned on, we respect .php and .phps files. AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
php_value max_execution_time 300    php_value memory_limit 128M    php_value post_max_size 16M    php_value upload_max_filesize 2M    php_value max_input_time 300    php_value date.timezone PRC    # 
# DirectoryIndex index.html index.php #
Require all denied
Require all denied

相关截图

Installing repository configuration package

Installing Zabbix packages

dbscript

start zabbix server

转载地址:http://esqko.baihongyu.com/

你可能感兴趣的文章
五子棋.html
查看>>
Day1 Spring初识(一)
查看>>
css pseudo classes
查看>>
深入浅出的webpack构建工具---webpack基本配置(一)
查看>>
rac各节点实例需设置为相同的一些参数
查看>>
acdream 1031 Component(树中一个大小为k的节点集最小权值)
查看>>
一些服务器客户端的c例子
查看>>
Font Creator Program 字库修改合并软件
查看>>
数值计算程序-特征值和特征向量 [转]
查看>>
setup_irq和request_irq(转)
查看>>
ORACLE中将一个值赋值到另一个表的值
查看>>
IE11将支持SPDY
查看>>
I.MX6 android mkuserimg.sh
查看>>
jQuery序列化后的表单值转换成Json
查看>>
linux添加开机启动项的方法介绍
查看>>
MonoTouch绑定CocoaTouch类库
查看>>
Oracle 11g Release 1 (11.1) PL/SQL_了解静态和动态 SQL
查看>>
算法学习坚持、努力——记录acm破200
查看>>
二叉查找树
查看>>
职场之KPI
查看>>