zabbix-server部署安装

zabbix-server安装步骤
1.配置zabbix yum源

[root@kafka02 fonts] vim /etc/yum.repos.d/zabbix.repo
[root@kafka02 fonts] cat /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/7/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
 
[zabbix-debuginfo]
name=Zabbix Official Repository debuginfo - $basearch
baseurl=http://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/7/$basearch/debuginfo/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
gpgcheck=0
 
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://mirrors.aliyun.com/zabbix/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=0
[root@kafka02 fonts] yum clean all #刷新yum库

2.安装zabbix web端

[root@kafka02 fonts] yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb mariadb-server

3.启动mysql 创建用户,数据库

[root@localhost ~] systemctl enable mariadb
[root@localhost ~] systemctl start mariadb
[root@localhost ~] mysql

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; #创建zabbix库,字符集utf8
MariaDB [(none)]> grant all on zabbix.* to zabbix@localhost identified by 'zabbix'; #创建zabbix授权用户
MariaDB [(none)]> flush privileges; #刷新

4.从zabbix导入mysql

zcat /usr/share/doc/zabbix-server-mysql-4.4.8/create.sql.gz | mysql -uzabbix -pzabbix zabbix

5.修改zabbix用户,密码并且修改时区

[root@kafka02 fonts] vim /etc/zabbix/zabbix_server.conf 
[root@kafka02 fonts] cat /etc/zabbix/zabbix_server.conf | grep 'DB' | sed '/^#/d'
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
[root@localhost ~] vim /etc/httpd/conf.d/zabbix.conf 
[root@localhost ~] cat /etc/httpd/conf.d/zabbix.conf|sed -n '20p'
        php_value date.timezone Asia/Shanghai #更改时区为-亚洲/上海

6.启动zabbix和httpd

#zabbix-web-mysql为自带httpd
[root@localhost ~] systemctl enable zabbix-server zabbix-agent httpd
[root@localhost ~] systemctl start zabbix-server zabbix-agent httpd
#查看端口是否启动
[root@localhost ~] netstat -nuptl|egrep "80|10050|10051"

7.修改乱码 如果没有则不用修改

[root@kafka02 fonts] cd /usr/share/zabbix/assets/fonts/
[root@kafka02 fonts] ls
graphfont.ttf
[root@kafka02 fonts] rm -rf *#删除原先的字体包
[root@kafka02 fonts] rz#上传字体包 可在电脑D盘搜到

[root@kafka02 fonts] ls
simkai.ttf
[root@kafka02 fonts] mv simkai.ttf graphfont.ttf#改成原先字体包名称即可
[root@kafka02 fonts] ls
graphfont.ttf

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
如果不是中文可在这里修改
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值