zabbix的安装
1. 安装步骤
1.1 yum源的优化
官方:
https://www.zabbix.com/documentation/4.0/manual/installation/install_from_packages/rhel_centos
清华源:https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/
复制链接地址:
执行
rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
即可,也可以使用官方的源
1.2 下载安装相关的软件
yum install -y zabbix-server-mysql zabbix-web-mysql httpd php mariadb-server
1.3 软件配置
vim /etc/zabbix/zabbix_server.conf
126 DBPassword=zabbix
vim /etc/httpd/conf.d/zabbix.conf
21 php_value date.timezone Asia/Shanghai
1.4 数据库的配置
systemctl start mariadb.service
systemctl status mariadb.service
创建zabbix数据库--zabbix
create database zabbix character set utf8 collate utf8_bin;
创建数据库管理用户
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
在zabbix数据库中导入相应的表信息
cd /usr/share/doc/zabbix-server-mysql-4.0.35
进入到自己这个目录查看自己的版本,然后进行操作,不要盲目的复制
zcat /usr/share/doc/zabbix-server-mysql-4.0.35/create.sql.gz|mysql -uzabbix -pzabbix zabbix
zgrep
1.5 服务的启动
数据库服务 zabbix服务 httpd服务
systemctl start zabbix-server.service httpd mariadb.service
systemctl enable zabbix-server.service httpd mariadb.service
说明: 至此zabbix-server命令行操作结束
LNMP: nginx php mysql
LAMP: apache(php模块) mysql
1.6 web页面的访问
192.168.80.71/zabbix
进行安装即可
默认的账户密码
(注意大大小写)
Admin
密码:zabbix
1.7 修改中文
点击登录进去以后,点击右上角的人物头像,进去设置中文
1.8 web页面图形显示乱码
解决办法:
yum install wqy-microhei-fonts -y
rpm -ql wqy-microhei-fonts
cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/zabbix/assets/fonts/graphfont.ttf
解决后如上图所示