1、环境准备
系统版本 CentOS Linux release 7.3.1611 (Core)IP 192.168.10.60
2、zabbix安装
2.1 安装阿里云yum配置文件
rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
2.2 安装zabbix-server、zabbix-agent、mariadb
1 yum install zabbix-server zabbix-get zabbix-agent zabbix-web zabbix-server-mysql zabbix-web-mysql mariadb-server mariadb -y
2.3 修改php时区
sed -i 's@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g' /etc/httpd/conf.d/zabbix.conf
2.4 创建zabbix数据库
启动mariadb,并创建zabbix数据库。
systemctl start mariadb
mysql
MariaDB [(none)]> create database zabbix character set uft8 collate utf8_bin;
ERROR 1115 (42000): Unknown character set: 'uft8'
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all on zabbix.* to zabbix@'localhost' identified by '123456';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit;
cd /usr/share/doc/zabbix-server-mysql-3.2.6/
zcat create.sql.gz|mysql -uzabbix -p123456 zabbix
2.5 修改zabbix配置
修改zabbix数据库密码
sed -i '116a DBPassword=123456' /etc/zabbix/zabbix_server.conf
2.6 启动zabbix和httpd
systemctl start zabbix-server
systemctl start zabbix-agent
systemctl start httpd
下一步
下一步
输入zabbix数据库的密码
输入zabbix server的name,例如zabbis-server
完成
登录,用户名密码为Admin/zabbix
2.8 修改中文字体,防止监控图乱码
1)在控制面板中找到一个字体,例如黑体
2)上传到/usr/share/zabbix/fonts
注:可以用lrzsz工具上传。
3)把大写字体改为小写
mv SIMHEI.TTF simhei.ttf
4)修改defines.inc.php
sed -i 's#graphfont#simhei#g' /usr/share/zabbix/include/defines.inc.php
2.9 打开zabbix-server本机监控
2.10 修改为中文
完成zabbix3.2的安装!
更多Zabbix相关教程集合:
Ubuntu 14.04下Zabbix2.4.5 源码编译安装 .com/Linux/2015-05/117657.htm