centos7 安裝配置zabbix

建立用戶帳號php

groupadd zabbix
useradd -g zabbix zabbix

安裝mysql數據庫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用戶web

mysql -uroot 
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by '12';
quit

 導入sql數據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

vim /etc/httpd/conf/httpd.conf

 添加centos

LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

 重啓httpd,設置開機啓動app

service httpd restart
systemctl enable httpd

添加zabbix源ide

 rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm

安裝zabbixpost

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,填寫配置,安裝完成

相關文章
相關標籤/搜索