zabbix快速入门安装
Zabbix基础入门
zabbix快速入门安装
1.下载zabbix的yum源
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
2.安装zabbix服务端和客户端
yum install zabbix-server-mysql zabbix-agent -y
3.下载zabbix前端web界面的yum源
yum install centos-release-scl -y
4.打开zabbix的yumm源中的前端仓库
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/frontend
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
5.安装zabbix前端页面
yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl -y
6.初始化数据库
1.创建zabbix数据库
mysql> create database zabbix character set utf8 collate utf8_bin;
2.创建zabbix用户
mysql> grant all on zabbix.* to zabbix@'172.16.1.%' identified by '123';
3.将zabbix的建表语句sql文件发送到数据库上
[root@zabbix ~]# scp /usr/share/doc/zabbix-server-mysql-5.0.26/create.sql.gz 172.16.1.54:/tmp
4.导入SQL文件
[root@db04 ~]# zcat /tmp/create.sql.gz |mysql -uzabbix -p123 -h172.16.1.54 zabbix
7.修改zabbix服务端的配置文件
DBHost=172.16.1.54
DBName=zabbix
DBUser=zabbix
DBPassword=123
8.修改zabbix的nginx配置文件
[root@zabbix ~]# vim /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf
server {
listen 80;
server_name zabbix.jl.com;
9.修改zabbix的php配置文件
user = nginx
group = nginx
listen.acl_users = nginx
php_value[date.timezone] = Asia/Shanghai
10.授权
[root@zabbix ~]# chown -R root.nginx /var/opt/rh/rh-php72/lib/php/session
[root@zabbix ~]# chown -R nginx.nginx /etc/zabbix/web/
11.启动
[root@zabbix ~]# systemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm
[root@zabbix ~]# systemctl enable zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm
12.浏览器访问
汉化zabbix
解决图形界面下汉字无法显示问题
1.咋windows中找到中文字体
C:\Windows\Fonts
2.进入zabbix字体路径
[root@zabbix ~]# cd /usr/share/zabbix/assets/fonts/
3.备份zabbix默认字体
[root@zabbix /usr/share/zabbix/assets/fonts]# mv graphfont.ttf graphfont.ttf.bak
4.上传字体到linux中
rz
5.改名
[root@zabbix /usr/share/zabbix/assets/fonts]# mv MSYH.TTC graphfont.ttf