Centos7下搭建zabbix5

1.关闭防火墙

systemctl stop firewalld

systemctl disable firewalld

setenforce 0

vim /etc/sysconfig/selinux

selinux=disabled

reboot

2.安装并设置zabbix的yum源

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

vim /etc/yum.repos.d/zabbix.repo

[zabbix]

name=Zabbix Official Repository - $basearch

baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

[zabbix-frontend]

name=Zabbix Official Repository frontend - $basearch

baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/frontend

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

[zabbix-debuginfo]

name=Zabbix Official

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,下面是 CentOS 7 搭建 Zabbix 的步骤: 1. 安装 EPEL 和 Zabbix 源 ``` yum -y install epel-release rpm -ivh https://repo.zabbix.com/zabbix/5.2/rhel/7/x86_64/zabbix-release-5.2-1.el7.noarch.rpm ``` 2. 安装 Zabbix Server、Agent 和 Web ``` yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent ``` 3. 安装数据库 ``` yum -y install mariadb mariadb-server systemctl start mariadb systemctl enable mariadb mysql_secure_installation ``` 4. 创建 Zabbix 数据库和用户 ``` mysql -u root -p MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'password'; MariaDB [(none)]> quit; ``` 5. 导入初始数据 ``` cd /usr/share/doc/zabbix-server-mysql-5.2.3/ zcat create.sql.gz | mysql -u zabbix -p zabbix ``` 6. 修改 Zabbix Server 配置文件 ``` vi /etc/zabbix/zabbix_server.conf DBPassword=password ``` 7. 修改 PHP 配置 ``` vi /etc/php.ini date.timezone = Asia/Shanghai max_execution_time = 300 max_input_time = 300 memory_limit = 128M post_max_size = 16M upload_max_filesize = 2M ``` 8. 启动服务并设置开机自启 ``` systemctl start zabbix-server systemctl enable zabbix-server systemctl start zabbix-agent systemctl enable zabbix-agent systemctl start httpd systemctl enable httpd ``` 9. 访问 Web 界面 在浏览器中输入 http://服务器IP/zabbix,用户名和密码默认为 Admin/zabbix。 以上就是 CentOS 7 搭建 Zabbix 的步骤,希望对你有所帮助。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值