CentOS6搭建zabbix3.0
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS6搭建zabbix3.0相关的知识,希望对你有一定的参考价值。
1.1环境准备
[[email protected] ~]# cat/etc/redhat-release CentOS release 6.5 (Final) [[email protected] ~]#/etc/init.d/iptables stop [[email protected] ~]# getsebool getsebool: SELinux is disabled [[email protected] ~]# ifconfig eth0|awk -F "[ :]+" ‘NR==2{print $4}‘ 192.168.199.10
1.2server端安装
rpm -ihvhttp://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm yum install httpd zabbixzabbix-server zabbix-web zabbix-server-mysql zabbix-web-mysql mysql-server -y
1.3php安装
rpm -ivhhttp://mirror.webtatic.com/yum/el6/latest.rpm wget -O/etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo yum install php55wphp55w-mysql php55w-common php55w-gd php55w-mbstring php55w-mcrypt php55w-develphp55w-xml php55w-bcmath -y yum removezabbix-server-pgsql -y cp -R /usr/share/zabbix//var/www/html/ #这里有必要说一下zabbix3.0必须要php5.4以上因此需要安装特殊源,才能够安装php5.5
1.4MySQL配置
cp/usr/share/mysql/my-medium.cnf /etc/my.cnf 启动MySQL /etc/init.d/mysqld start 创建用户并授权 mysql create database zabbixcharacter set utf8 collate utf8_bin; grant all on zabbix.* [email protected]‘localhost‘ identified by ‘123456‘; flush privileges; exit
1.5 导入数据文件
cd/usr/share/doc/zabbix-server-mysql-3.0.3 zcat create.sql.gz |mysql-uzabbix -p123456 zabbix
1.6 相关数据修改
修改php配置文件
vim /etc/php.ini post_max_size = 16M max_execution_time = 300 max_input_time = 300 date.timezone =Asia/shanghai
修改zabbix_server配置文件
vim/etc/zabbix/zabbix_server.conf
修改数据库地址、数据库名、 用户、密码 分别对应 DBHost= DBName= DBUser= DBPassword= DBSocket=/var/lib/mysql/mysql.sock
文件授权
chmod -R 755/etc/zabbix/web chown -R apache.apache/etc/zabbix/web 启动apache&& zabbix /etc/init.d/httpd start /etc/init.d/zabbix-serverstart
1.7 登录web进行安装
访问http://192.168.199.10/zabbix
右边必须全部OK
至此zabbix搭建完毕,可以尽情的去玩耍它了。
本文出自 “陈荣华的linux运维之路” 博客,请务必保留此出处http://ronghuachen.blog.51cto.com/10543403/1915432
以上是关于CentOS6搭建zabbix3.0的主要内容,如果未能解决你的问题,请参考以下文章
CentOS6.5 编译安装zabbix3.0.5,编译安装zabbix_agent客户端