CentOS7.x yum源安装zabbix4.x | 您所在的位置:网站首页 › 浅默淡殇怎么读 › CentOS7.x yum源安装zabbix4.x |
安装zabbix: 1. 首先添加zabbix仓库(若国外源失败可以改用国内yum源)rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm 2. 安装zabbix-serveryum install zabbix-server-mysql 3. 安装zabbix-front-webyum install zabbix-web-mysql 4. 安装mariadb数据库yum install mariadb-server systemctl start mariadb #启动数据库systemctl enable mariadb #设置开机自动启动数据库服务create database zabbix character set utf8 collate utf8_bin; # 创建数据库,名称为zabbix,并且字符为utf8.grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; # 授权zabbix用户从localhost访问, # 对zabbix数据库有完全控制权限。flush privileges; # 刷新权限quit # 退出zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix # 初始化数据结构并导入数据 针对zabbix-server配置数据库:vi /etc/zabbix/zabbix_server.confDBHost=localhost # 数据库主机DBName=zabbix # 数据库名称DBUser=zabbix # 数据库用户名DBPassword= # 数据库密码 5. 启动zabbix-server(1) 设置开机自启zabbix-serversystemctl enable zabbix-server (2) 启动zabbix-server服务systemctl start zabbix-server 6. 设置zabbix-frontvi /etc/httpd/conf.d/zabbix.conf php_value date.timezone Asia/Shanghai (2) 启动前端访问的httpdsystemctl start httpdystemctl enable httpd 注意事项:关闭selinux和firwealld 7. 初始配置(1)打开http://server_ip/zabbix默认的用户名:Admin 密码:zabbix
安装zabbix-agent: 1. 添加zabbix仓库rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm 2. 使用如下命令安装zabbix-agentyum install zabbix-agent -y 3. 启动zabbix-agent服务systemctl start zabbix-agentsystemctl enable zabbix-agent 校验我们所安装的是否正常:通过以下命令进行校验: netstat -nltupss -tunlpzabbix-server监听端口为tcp 10051 |
CopyRight 2018-2019 实验室设备网 版权所有 |