zabbix 3.4 centos 7.4 install

1.check install environment

[root@VM_0_7_centos ~]# cat /etc/redhat-release

CentOS Linux release 7.4.1708 (Core)

2.close firewall and selinux

systemctl stop firewalld.service
systemctl disable firewalld.service
[root@VM_0_7_centos ~]# grep SELINUX=disabled /etc/selinux/config
SELINUX=disabled

3.install mariadb

yum install mariadb-server mariadb –y
systemctl start mariadb
systemctl stop mariadb
systemctl restart mariadb
systemctl enable mariadb

4.download zabbix 3.4

wget http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
rpm -ivh zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql
yum install zabbix-agent

5.creat datebase

[root@VM_0_7_centos ~]# mysql
 Welcome to the MariaDB monitor.  Commands end with ; or \g.
 Your MariaDB connection id is 4
 Server version: 5.5.56-MariaDB MariaDB Server

 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
MariaDB [(none)]> exit

6.import data

[root@VM_0_7_centos ~]# cd /usr/share/doc/zabbix-server-mysql-3.4.8/
[root@VM_0_7_centos zabbix-server-mysql-3.4.8]# ls
AUTHORS  ChangeLog  COPYING  create.sql.gz  NEWS  README
[root@VM_0_7_centos zabbix-server-mysql-3.4.8]# cd
[root@VM_0_7_centos ~]# zcat /usr/share/doc/zabbix-server-mysql-3.4.8/create.sql.gz | mysql -uzabbix -pzabbix zabbix
[root@VM_0_7_centos ~]#

7.check database user infomation

[root@VM_0_7_centos ~]# grep -n '^'[a-Z] /etc/zabbix/zabbix_server.conf
38:LogFile=/var/log/zabbix/zabbix_server.log
49:LogFileSize=0
72:PidFile=/var/run/zabbix/zabbix_server.pid
82:SocketDir=/var/run/zabbix
101:DBName=zabbix
117:DBUser=zabbix
330:SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
448:Timeout=4
490:AlertScriptsPath=/usr/lib/zabbix/alertscripts
500:ExternalScripts=/usr/lib/zabbix/externalscripts
536:LogSlowQueries=3000

8.add DBPassword infomation

[root@VM_0_7_centos ~]# vim /etc/zabbix/zabbix_server.conf
DBPassword=zabbix

9.start zabbix-server service and setup starting up

[root@VM_0_7_centos ~]# systemctl start zabbix-server
[root@VM_0_7_centos ~]# systemctl enable zabbix-server

Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-server.service to /usr/lib/systemd/system/zabbix-server.service.

10.change timezone Asia/Shanghai

[root@VM_0_7_centos ~]# vim /etc/httpd/conf.d/zabbix.conf

php_value date.timezone Asia/Shanghai

11.start httpd service and setup starting up

[root@VM_0_7_centos ~]# systemctl start httpd
[root@VM_0_7_centos ~]# systemctl enable httpd
 Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

12.browser access and install

http://111.231.108.211/zabbix/
在这里插入图片描述在这里插入图片描述

修改User:zabbix 设置Password:zabbix
在这里插入图片描述

在这里插入图片描述

安装完成,在/etc/zabbix/web/zabbix.conf.php生成配置文件
在这里插入图片描述
默认登录Admin/zabbix
在这里插入图片描述在这里插入图片描述

13.install zabbix-agent

download file

[root@VM_0_7_centos ~]# wget http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.8-1.el7.x86_64.rpm
[root@VM_0_7_centos ~]# rpm -ivh zabbix-agent-3.4.8-1.el7.x86_64.rpm
modify configuration file,change Server/ServerActive for client server ip

[root@VM_0_7_centos ~]# vim /etc/zabbix/zabbix_agentd.conf
Server=111.231.108.211
ServerActive=111.231.108.211

[root@VM_0_7_centos ~]# systemctl restart zabbix-agent.service
[root@VM_0_7_centos ~]# systemctl enable zabbix-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值