温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

基于Yum安装zabbix3.0

发布时间:2020-04-14 01:29:46 来源:网络 阅读:1352 作者:huangzhijun 栏目:web开发

一、安装环境介绍

操作系统:CentOS6.5

Mysql: 5.1

php: 官方要求5.4以上,php7暂不支持,本文选择使用php5.6

Apache: httpd2.2

zabbix: 3.0


二、安装httpd

yum -y install httpd httpd-devel


三、安装php

a.添加repo源(二选一)

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm


b.安装php及相关组件

yum install  php56w php56w-cli php56w-common php56w-devel php56w-pear php56w-gd php56w-mbstring php56w-mysql php56w-xml php56w-bcmath



四、安装mysql

yum -y install mysql-server mysql


启动数据库并设置密码

service mysqld start

/usr/bin/mysqladmin -u root password '123456'


五、安装zabbix

a.添加repo源

vi /etc/yum.repo.d/zabbix.repo

[zabbix]

name=Zabbix Official Repository - $basearch

baseurl=http://repo.zabbix.com/zabbix/3.0/rhel/6/$basearch/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX

[zabbix-non-supported]

name=Zabbix Official Repository non-supported - $basearch

baseurl=http://repo.zabbix.com/non-supported/rhel/6/$basearch/

enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX

gpgcheck=1


b.安装相关组件

yum install OpenIPMI libssh3 fping libcurl libiksemel net-snmp


c.安装zabbix

yum install -y zabbix-release.noarch

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway


d.创建初始化数据库

mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>'; mysql> quit;

zcat /usr/share/doc/zabbix-server-mysql-3.0.*/create.sql.gz | mysql -uzabbix -p zabbix


e.修改zabbix配置文件

# vi /etc/zabbix/zabbix_server.conf 

DBHost=localhost 

DBName=zabbix 

DBUser=zabbix 

DBPassword=<password>


六、启动zabbix-server

service zabbix-server start


七、添加httpd的zabbix.conf文件

cp /usr/share/doc/zabbix-web-3.0.7/httpd22-example.conf /etc/httpd/conf.d/zabbix.conf

修改文件里的date.timezone Asia/ShangHai


重启httpd服务

service httpd restart


访问

http://172.0.0.1/zabbix

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI