1,装机后修改系统设置php
[root@localhost ~]# systemctl stop firewalld.service [root@localhost ~]# systemctl disable firewalld.service Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service
2,安装MariaDBhtml
yum install mariadb-server mariadb前端
mariadb数据库的相关命令是:java
systemctl start mariadb #启动MariaDB
systemctl stop mariadb #中止MariaDB
systemctl restart mariadb #重启MariaDB
systemctl enable mariadb #设置开机启动
[root@zabbix_test ~]# mysqladmin -u root password "password" #更改密码为password
create database zabbix character set utf8 collate utf8_bin; grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
3, 安装zabbix3.4 https://www.zabbix.com/downloadmysql
4,导入数据linux
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbixweb
5,配置zabbix的数据库设置sql
vim /etc/zabbix/zabbix_server.conf 主要配置数据库的用户名,库名,密码,端口等,其它设置也能够安装状况配置数据库
6,启动zabbix 并设置开机启动vim
systemctl enable zabbix-server systemctl start zabbix-server
systemctl enable zabbix-agent systemctl start zabbix-agent
7, 编辑Zabbix前端PHP配置,主要是更改时区
vim /etc/httpd/conf.d/zabbix.conf
修改此行:php_value date.timezone Asia/Shanghai
8,启动httpd并设置开机启动
systemctl start httpd
systemctl enable httpd
9,浏览器访问并配置
http://IP/zabbix/
这里的Name待安装完成后显示在页面的右上角
使用Admin/zabbix初始管理员密码登陆
10 ,修改成中文界面
在Adminstration-->Users下面找到对应的用户,点进去,找到Language,选择Chinese(zh_CN),更新后,刷新页面便可切换为中文界面。
11,中文显示乱码问题
一种缘由是数据库建立的时候须要设置为支持utf8
第二种状况以下:
缘由是zabbix前端默认的字体对中文的支持很差,须要替换下
在本身的windows电脑上,打开C:\Windows\Fonts,里面全是字体文件,找到想要的,我这里选择是常规楷体。
将此字体文件C:\Windows\Fonts\simkai.ttf 上传到zabbix服务器的zabbix的fonts路径下,我这里路径为:/usr/share/zabbix/fonts。
以下图,graphfont.ttf是原来默认的字体文件
在切换到路径/usr/share/zabbix/include下,修改defines.inc.php 文件
文件里的 ZBX_GRAPH_FONT_NAME', 'graphfont' 就是指默认的字体文件是graphfont 对应/usr/share/zabbix/fonts里的graphfont.ttf文件
使用命令 sed -i 's/graphfont/simkai/g' defines.inc.php 所有替换为simkai文件
从新加载下配置文件:systemctl reload httpd.service
再刷新下网页, 发现乱码解决了