Centos7.3安装部署zabbix3.0

1.初始化环境
#setenforce 0
#sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
#yum install epel-release.noarch wget vim gcc gcc-c++ lsof chrony tree nmap unzip rsync -y
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

2.LAMP环境安装
#yum install httpd mariadb mariadb-server mariadb-client php php-mysql -y

3.安装zabbix服务
#rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
#yum install zabbix-server-mysql zabbix-web-mysql zabbix-get zabbix-agent -y

4.创建数据库
重启maria服务
#systemctl start mariadb.service
#systemctl enable mariadb.service
#mysql -uroot -p
#CREATE DATABASE zabbix DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
#GRANT ALL ON zabbix.* TO 'zabbix'@'%' IDENTIFIED BY 'zabbix';
#SET PASSWORD FOR 'root'@'localhost'=PASSWORD('123456'); 
#grant all privileges on zabbix.* to zabbix@'%' identified by 'zabbix';
#show grants for zabbix;

5.导入数据
#cd /usr/share/doc/zabbix-server-mysql-3.0.22/
#zcat create.sql.gz | mysql -uroot -p123456 zabbix

6.配置zabbix_server
#vim /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=root
DBPassword=123456
DBPort=3306

    6.1启动zabbix_server 
    #systemctl start zabbix-server.service
    #systemctl enable zabbix-server.service
    默认端口10051

7.配置zabbix_agent客户端配置
#vim /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=Zabbix server 

    7.1启动zabbix_agent
    #systemctl start zabbix-agent.service
    #systemctl enable zabbix-agent.service
    默认端口10050

8.确保以下服务开启成功
#systemctl status httpd 
#systemctl status zabbix-server.service 
#systemctl status zabbix-agent.service 
#systemctl status mariadb.service 

9.访问zabbix图形界面 http://ip/zabbix 
打开zabbix配置界面,提示Time zone for PHP is not set (configuration parameter "date.timezone").
解决方法:
    1.查看并修改php.ini配置文件的配置:
    更改php.ini配置文件的设置,去掉date.timezone的注释,将时区改为Asia/Shanghai
    #vi /etc/php.ini
    [Date]
    ; Defines the default timezone used by the date functions
    ; http://php.net/date.timezone
    date.timezone = Asia/Shanghai #将前面的分号去掉,注意=需要空格,切记
    
    2.查看并修改vi /etc/httpd/conf.d/zabbix.conf配置文件的配置
    # php_value date.timezone Asia/Shanghai  #去除注释,修改

    3.php需求检查

   4.MySql配置

    5.zabbix服务端详情信息

    6.登陆zabbix

默认用户名:Admin  密码:zabbix

如下是zabbix首页

     已完成安装配置……

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值