Centos8下安裝Zabbix5.0教程

Centos8 為最小安裝模式

一、關(guān)閉防火墻:

systemctl stop firewalld.service      #停止firewalld服務(wù)
systemctl disable firewalld.service    #設(shè)置開機(jī)默認(rèn)不啟動(dòng)

#生產(chǎn)環(huán)境單獨(dú)在防火墻上開啟端口和策略
#firewall-cmd --permanent --zone=public --add-port=80/tcp
# firewall-cmd --reload

二、關(guān)閉selinux

getenforce    #查看狀態(tài)
vi /etc/sysconfig/selinux    #開機(jī)不啟動(dòng)
     SELINUX=disabled

三、安裝zabbix5.0源

rpm -Uvh https://repo.zabbix.com/zabbix/5.1/rhel/8/x86_64/zabbix-release-5.1-1.el8.noarch.rpm
#官方5.1的源
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
#官方5.0的源
dnf clean all                        *清理yum緩存

四、安裝zabbix5.0服務(wù)端和客戶端

dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent

#五、安裝CentOS SCLo RH存儲(chǔ)庫:
安裝 Software Collections,便于后續(xù)安裝高版本的 php

dnf install centos-release-scl

編輯配置文件

vi /etc/yum.repos.d/zabbix.repo

image.png

六、配置數(shù)據(jù)庫

1.安裝MariaDB

dnf install -y mariadb-server    # yum安裝MariaDB
systemctl start mariadb.service    #啟動(dòng)mariadb
systemctl enable mariadb.service   #設(shè)置開機(jī)啟動(dòng)
mysqladmin -uroot password '********';    #創(chuàng)建管理員密碼   *自己更改

2.創(chuàng)建初始數(shù)據(jù)庫

 mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;

3.導(dǎo)入初始架構(gòu)和數(shù)據(jù)

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

提示輸入的密碼為:password
mysql> create user zabbix@localhost identified by 'password';


4.Zabbix server配置數(shù)據(jù)庫

vi /etc/zabbix/zabbix_server.conf
image.png

七、安裝配置PHP

dnf install -y php

vi /etc/opt/php-fpm.d/zabbix.conf


image.png

八、啟動(dòng)Zabbix5.0

systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm

九、配置向?qū)?/h1>
image.png

和zabbix4相同,不再累述

附:
web界面設(shè)置為中文亂碼解決


image.png

還是字體問題
查看配置文件


image.png

復(fù)制windowns系統(tǒng)下面 仿宋字體文件到 /usr/share/zabbix/assets/fonts/
改名為:graphfont.ttf
刷新頁面,字體正常
image.png

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容