zabbix 安装

关闭防火墙:
systemctl stop firewalld.service
systemctl disable firewalld.service


 

关闭selinux:
setenforce 0
sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config


 

安装vim编辑器

yum -y install vim*


 

配置yun源

rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm

yum clean all


 

安装服务器端包
yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb-server


 

启动mariadb
systemctl start mariadb
systemctl enable mariadb


创建zabbix数据库

mysql

create database zabbix character set utf8 collate utf8_bin;

grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix2016';//zabbix2016密码

flush privileges;
exit


导入初始模式和数据
cd /usr/share/doc/zabbix-server-mysql*/
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz |mysql -uzabbix -p zabbix

输入 刚才设置的数据库密码zabbix2016


配置数据库zabbix

vi /etc/zabbix/zabbix_server.conf
DBHost=zabbix  //去掉前面#号
DBPassword=zabbix2016   //去掉前面#号输入数据库密码


启动zabbix服务设置开机启动

systemctl start zabbix-server 

systemctl enable zabbix-server


配置php内部参数

vim /etc/httpd/conf.d/zabbix.conf
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 Europe/Riga  //修改此行 php_value date.timezone Asia/Shanghai



重新启动 httpd,刷新配置

systemctl start httpd

开始安装

http://10.0.0.252/zabbix/setup.php

 

posted @ 2018-07-18 17:07  啊扁他干爹  阅读(78)  评论(0编辑  收藏  举报