zabbix
关闭防火墙
systemctl stop firewalld.service
关闭selinux
sestatus
setenforce 0
vi /etc/selinux/config
SELINUX=disabled
1:
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
确认yum源
ll /etc/yum.repos.d/
2
yum install zabbix-server-mysql zabbix-web-mysqly
安装数据库
yum install mariadb-server
启动数据库
systemctl start mariadb
显示库
show databases;
3
建库
create database zabbix character set utf8 collate utf8_bin;
授权
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
flush privileges;
quit;
导入表
zcat /usr/share/doc/zabbix-server-mysql-3.2.6/create.sql.gz | mysql -uzabbix -p zabbix
[
cp /etc/zabbix/zabbix_server.conf /etc/zabbix/zabbix_server.conf.oldboy.ori
sed -i 's@# DBPassword=@DBPassword=zabbix@g' /etc/zabbix/zabbix_server.conf
]
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=<password>
启动服务
systemctl start zabbix-server
PHP
vim /etc/php.ini
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
设置时区
sed -i 's#\# php_value date.timezone Europe/Riga#php_value date.timezone Asia/Shanghai#g' /etc/httpd/conf.d/zabbix.conf
启动 php
systemctl start httpd
systemctl start zabbix-server
systemctl start httpd
systemctl start mariadb