centos7 安装部署 zabbix5.0 (超详细) |
您所在的位置:网站首页 › centos7安装nginx详细步骤 › centos7 安装部署 zabbix5.0 (超详细) |
实验环境:
服务器操作系统版本: [root@host-137 ~]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core)关闭防火墙 systemctl stop firewalld开机禁用防火墙自启 systemctl disable firewalld设置临时关闭selinux setenforce 0设置永久关闭selinux vim /etc/sysconfig/selinux将第7行内容修改如下 官网地址>> https://www.zabbix.com/download 查看上传成功 [root@host-136 ~]# ll /etc/yum.repos.d/zabbix_Aliyun5.0.repo -rw-r--r--. 1 root root 893 Jan 21 22:21 /etc/yum.repos.d/zabbix_Aliyun5.0.repo 2.2 下载链接:https://download.csdn.net/download/m0_46674735/14933727 3. 安装zabbix所需组件 3.1 zabbix-server和代理 yum install -y zabbix-server-mysql zabbix-agent 3.2 Enable Red Hat Software Collections yum -y install centos-release-scl 3.3 安装zabbix前段所需依赖包 yum -y install zabbix-web-mysql-scl zabbix-nginx-conf-scl 4. 数据库的安装和配置 4.1 安装数据库 yum -y install mariadb mariadb-server 4.2 启动数据库 systemctl start mariadb设置开机自启 systemctl enable mariadb 4.3 进入数据库并配置 [root@host-136 ~]# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 5.5.68-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. # 创建zabbix数据库 MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; Query OK, 1 row affected (0.00 sec) # 创建zabbix用户 MariaDB [(none)]> create user zabbix@localhost identified by 'zabbix'; Query OK, 0 rows affected (0.00 sec) #给zabbix用户授权 MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost; Query OK, 0 rows affected (0.00 sec) #完成退出 MariaDB [(none)]> exit Bye 4.4 导入zabbix数据库 zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -pzabbix -Dzabbix 5. 修改zabbix-server的配置文件 vim /etc/zabbix/zabbix_server.conf将124行内容修改如下 将2、3行内容修改如下 将2、3行内容修改如下 server_name 为所在主机的IP地址 修改以下4处内容 1) |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |