centos7 安装配置zabbix
Posted 日拱一卒,功不唐捐
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos7 安装配置zabbix相关的知识,希望对你有一定的参考价值。
创建用户账号
groupadd zabbix useradd -g zabbix zabbix
安装mysql数据库
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpm yum install mysql-community-server
新建mysql用户
mysql -uroot create database zabbix character set utf8 collate utf8_bin; grant all privileges on zabbix.* to zabbix@localhost identified by \'12\'; quit
导入sql数据
cd database/mysql mysql -u zabbix -p 12 use zabbix; source schema.sql source images.sql source data.sql
安装httpd、php
yum -y install php httpd
配置httpd,添加php模块
vim /etc/httpd/conf/httpd.conf
添加
LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
重启httpd,设置开机启动
service httpd restart systemctl enable httpd
添加zabbix源
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
安装zabbix
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
修改zabbix 数据库配置
vim /etc/zabbix/zabbix_server.conf
修改
DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=12
启动zabbix,设置开机启动
service zabbix_server start systemctl enable zabbix-server
修改php配置
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 always_populate_raw_post_data -1 php_value date.timezone Asia/Shanghai
安装时间同步ntpdate
yum -y install ntpdate
访问http://ip/zabbix,填写配置,安装完成
以上是关于centos7 安装配置zabbix的主要内容,如果未能解决你的问题,请参考以下文章