CentOS 751804安装Zabbix 34.docx

上传人:b****6 文档编号:7739695 上传时间:2023-01-26 格式:DOCX 页数:12 大小:839.53KB
下载 相关 举报
CentOS 751804安装Zabbix 34.docx_第1页
第1页 / 共12页
CentOS 751804安装Zabbix 34.docx_第2页
第2页 / 共12页
CentOS 751804安装Zabbix 34.docx_第3页
第3页 / 共12页
CentOS 751804安装Zabbix 34.docx_第4页
第4页 / 共12页
CentOS 751804安装Zabbix 34.docx_第5页
第5页 / 共12页
点击查看更多>>
下载资源
资源描述

CentOS 751804安装Zabbix 34.docx

《CentOS 751804安装Zabbix 34.docx》由会员分享,可在线阅读,更多相关《CentOS 751804安装Zabbix 34.docx(12页珍藏版)》请在冰豆网上搜索。

CentOS 751804安装Zabbix 34.docx

CentOS751804安装Zabbix34

CentOS7.5.1804安装Zabbix3.4

ByToperLv

2018.8.7

1安装环境

1.1CentOS版本

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

CentOSLinuxrelease7.5.1804(Core)

1.2数据库版本

下面两种数据库任选一种即可

MySQL版本:

MySQLCommunityServer5.7.23

MariaDB版本:

MariaDB5.5.56

1.3Zabbix版本

Zabbix版本:

Zabbix3.4

1.4主机名和IP

主机名:

centos

IP:

192.168.80.160

1.5SELinux

禁用SELinux

[root@centos~]#setenforce0设置SELinux为被动模式

[root@centos~]#getenforce查看SELinux当前模式

Permissive

[root@centos~]#vi/etc/selinux/config修改SELinux模式,重启后生效

修改前SELinux=enforcing

修改后SELinux=disabled

1.6防火墙

[root@centos~]#systemctlstopfirewalld关闭防火墙

[root@centos~]#systemctldisablefirewalld禁用防火墙自启动

Removedsymlink/etc/systemd/system/multi-user.target.wants/firewalld.service.

Removedsymlink/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

2Zabbix安装

2.1RPM包安装

[root@centos~]#rpm-i安装zabbixyum源

[root@centos~]#yuminstall-yzabbix-server-mysqlzabbix-web-mysqlzabbix-agent安装zabbix3.4,安装过程需要可以连接外网

2.2数据库配置

[root@centos~]#mysql-uroot-p进入数据库

Enterpassword:

mysql>createdatabasezabbixcharactersetutf8collateutf8_bin;

创建zabbix数据库,设置字符集为utf8

mysql>grantallprivilegesonzabbix.*tozabbix@localhostidentifiedby'Root:

123';

创建zabbix用户,并允许通过本机登录,密码为Root:

123

mysql>quit

[root@centos~]#zcat/usr/share/doc/zabbix-server-mysql*/create.sql.gz|mysql-uzabbix-pZabbix向数据库中导入zabbix所需的数据表等内容

Enterpassword:

输入数据库zabbix用户的密码Root:

123

2.3时区配置

[root@centos~]#vi/etc/httpd/conf.d/zabbix.conf修改zabbix时区设置

修改前

修改后

2.4服务配置

[root@centos~]#systemctlrestartzabbix-serverzabbix-agenthttpd

重启zabbix和httpd服务

[root@centos~]#systemctlenablezabbix-serverzabbix-agenthttpd

设置zabbix和httpd服务开机自启动

2.5初始化安装

使用浏览器登录如下地址http:

//ip/zabbix

确认检查项全部OK,下一步

输入数据库用户zabbix的密码,下一步

Name非必填项,直接下一步

点击完成安装

使用浏览器登录zabbixhttp:

//ip/zabbix

默认用户名/密码Admin/zabbix

登陆成功后界面如下

2.6修改语言

Zabbix安装完成后默认为英文,可以按下面步骤修改为中文

2.7Zabbixserverisnotrunning

在上一步成功安装zabbix并登陆后,发现首页底栏有告警提示如下:

Zabbixserverisnotrunning:

theinformationdisplayedmaynotbecurrent.

[root@centos~]#tailf/var/log/zabbix/zabbix_server.log

查询日志发现报错:

连接数据库失败,未使用密码连接数据库(但数据库用户zabbix设置了密码Root:

123,看来zabbixweb页面的初始化过程中ConfigureDatabaseConnection步骤指定的password并未生效)

[root@centos~]#vi/etc/zabbix/zabbix_server.conf

修改zabbixserver配置文件,输入/dbpassword\c查找指定zabbix连接数据库密码的配置项

可以看到如下位置并未指定zabbix连接数据库的密码

将上一图配置修改为下图配置,指定数据库密码

[root@centos~]#systemctlrestartzabbix-server

重启zabbix-server服务,再次登录zabbixweb页面将不再报错。

2.8设置zabbix登录页面为首页

默认情况下访问http:

//ip为Apache欢迎页面,可将其修改为zabbix登录页面,而无需登录时手动指定/zabbix

[root@centos~]#vi/etc/httpd/conf/httpd.conf

编辑http配置,将DocumentRoot指定的目录修改为zabbix目录,配置如下:

DocumentRoot"/usr/share/zabbix"

[root@centosconf]#systemctlrestarthttpd重启httpd服务

此时直接用访问http:

//ip,默认已经是zabbix登录页面

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 节日庆典

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1