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
再刷新下網頁, 發現亂碼解決了