zabbix安装---yum

centos7.5+mariadb

进入数据库

mysql -p

创建库

create database zabbix;

创建用户

create user 'zabbix'@'%' identified by 'zabbix';  

设置权限

grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix';

刷新

flush privileges;

 

下载rpm并yum安装

rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

安装3大组件,agent默认会自动安装,独立机器独立安装

yum -y install zabbix-server-mysql zabbix-web-mysql

创建zabbix的表

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

更改zabbix的配置文件

vim /etc/zabbix/zabbix_server.conf

---------------------------------------------------------

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
---------------------------------------------------------

vim /etc/httpd/conf.d/zabbix.conf  修改下面地址

php_value date.timezone Asia/Shanghai

---------------------------------------------------------

 

systemctl restart httpd

systemctl enable httpd

systemctl restart zabbix-server

如果提示pid文件问题重启即可解决

systemctl enable zabbix-server

 

访问ip/zabbix

输入密码

默认登陆用户密码:admin/zabbix

你可能感兴趣的:(zabbix安装---yum)