1、添加 Zabbix 軟體倉庫 2、啟用可選 rpms 的軟體倉庫 3、安裝 Server/前端/agent 4、安裝mariaDB資料庫 5、創建資料庫 6、創建賬戶並授權 7、導入數據 (導入需要一點時間,不要以為卡住按ctrl+c停止) 8、修改Zabbix server配置文件 9、為Za ...
1、添加 Zabbix 軟體倉庫
rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
2、啟用可選 rpms 的軟體倉庫
yum -y install yum-utils yum-config-manager --enable rhel-7-server-optional-rpms
3、安裝 Server/前端/agent
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
4、安裝mariaDB資料庫
yum install -y mariadb mariadb-server
5、創建資料庫
mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
6、創建賬戶並授權
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; mysql> quit;
7、導入數據 (導入需要一點時間,不要以為卡住按ctrl+c停止)
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -pzabbix zabbix
8、修改Zabbix server配置文件
vim /etc/zabbix/zabbix_server.conf
DBPassword=zabbix
9、為Zabbix前端配置PHP
vim /etc/httpd/conf.d/zabbix.conf php_value date.timezone Asia/Shanghai
10、關閉selinux
永久關閉
vim /etc/selinux/config
SELINUX=disabled
臨時關閉
setenforce 0
11、關閉防火牆
永久關閉
systemctl disable firewalld.service
臨時關閉
systemctl stop firewalld.service
12. 啟動Zabbix server和httpd服務
啟動服務,並設置開機自啟
systemctl restart zabbix-server httpd
systemctl enable zabbix-server httpd
13、配置Zabbix前端
瀏覽器訪問 http://server_ip/zabbix
前端安裝嚮導
![](https://img2018.cnblogs.com/blog/1126217/201903/1126217-20190302225539553-1696934190.png)
![](https://img2018.cnblogs.com/blog/1126217/201903/1126217-20190302225628090-650759764.png)
輸入資料庫密碼,前面步驟已設置密碼為zabbix
![](https://img2018.cnblogs.com/blog/1126217/201903/1126217-20190302225705060-2145005440.png)
![](https://img2018.cnblogs.com/blog/1126217/201903/1126217-20190302225722890-959692083.png)
![](https://img2018.cnblogs.com/blog/1126217/201903/1126217-20190302230006100-1150272097.png)
14、設置中文語言 點擊右上角用戶圖標
修改Language
![](https://img2018.cnblogs.com/blog/1126217/201903/1126217-20190302230346542-652315672.png)
15、解決Zabbix中文亂碼問題
![](https://img2018.cnblogs.com/blog/1126217/201903/1126217-20190302230407510-853594795.png)
在windows系統上挑選一款中文字體
![](https://img2018.cnblogs.com/blog/1126217/201903/1126217-20190302230432441-422499546.png)
先備份原有字體文件graphfont.ttf,再把字體文件名修改為graphfont.ttf 拷貝到/usr/share/zabbix/fonts/ 目錄下替換字體
![](https://img2018.cnblogs.com/blog/1126217/201903/1126217-20190302230443186-495071170.png)