zabbix的搭建
1.两台的机器
关闭防火墙 ,selinux ,同步时间
systemctl stop firewalld setenforece 0
ntpdate.pool.ntp.org
2.安装zabbix
安装zabbix源
rpm -ivh http://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm
安装软件
yum -y install zabbix-web-mysql httpd zabbix-agent mariadb mariadb-server zabbix-server-mysql
3,开启mysql,启动mysql、并创建数据库、授权用户、刷新权限
systemctl start mariadb.service create database zabbix character set utf8 collate utf8_bin; grant all on zabbix.* to zabbix@localhost identified by 'zabbix'; flush privileges
导入数据库数据
[root@localhost ~]# zcat /usr/share/doc/zabbix-server-mysql-4.4.10/create.sql.gz | mysql -uzabbix -pzabbix zabbix
4.修改配置文件
vim /etc/zabbix/zabbix_server.conf DBPassword=zabbix
5.修改时间
vim /etc/php.ini date.timezone = Asia/Shanghai
6.启动httpd,zabbix-server zabbix-agent
[root@192 yum.repos.d]# systemctl start httpd [root@192 yum.repos.d]# systemctl start zabbix-agent zabbix-server
查看相关端口是否监听:
#netstat -ntlp | grep 10051 (server监听)
# netstat -ntlp | grep 10050 (client监听)
7.登入zabbix
ip+/zabbix
使用默认管理员登录
账号:Admin 大写的
密码:zabbix
改变中文乱码路径:
将我们选择的字体文件上传到zabbix web服务,/usr/share/zabbix/assets/fonts目录下(rpm安装目录)
rm -rf graphfont.ttf
mv simkai.ttf graphfont.ttf
权限是644
chmod 644 graphfont.ttf