zabbix二进制软件包安装

关闭selinux和firewalld

关闭selinux开机自启

vim /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled								#改成disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

关闭selinux

[root@localhost ~]# setenforce 0

检查selinux状态

[root@localhost ~]# getenforce 
Permissive

关闭firewalld并且关闭开机自启

[root@localhost ~]# systemctl disable --now firewalld

检查firewalld状态

[root@localhost ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

3月 31 17:10:35 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
3月 31 17:10:35 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: ICMP type 'beyond-scope' is not supported by the kerne...pv6.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: beyond-scope: INVALID_ICMPTYPE: No supported ICMP type...ime.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: ICMP type 'failed-policy' is not supported by the kern...pv6.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: failed-policy: INVALID_ICMPTYPE: No supported ICMP typ...ime.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: ICMP type 'reject-route' is not supported by the kerne...pv6.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: reject-route: INVALID_ICMPTYPE: No supported ICMP type...ime.
3月 31 09:53:05 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...
3月 31 09:53:07 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.
Hint: Some lines were ellipsized, use -l to show in full.

安装web服务、php依赖包、mariadb数据库、zabbix软件包

安装httpd服务

[root@localhost ~]# yum install httpd
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: hkg.mirror.rackspace.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 httpd.x86_64.0.2.4.6-97.el7.centos 将被 安装
--> 正在处理依赖关系 httpd-tools = 2.4.6-97.el7.centos,它被软件包 httpd-2.4.6-97.el7.centos.x86_64 需要
--> 正在处理依赖关系 /etc/mime.types,它被软件包 httpd-2.4.6-97.el7.centos.x86_64 需要
--> 正在处理依赖关系 libaprutil-1.so.0()(64bit),它被软件包 httpd-2.4.6-97.el7.centos.x86_64 需要
--> 正在处理依赖关系 libapr-1.so.0()(64bit),它被软件包 httpd-2.4.6-97.el7.centos.x86_64 需要
--> 正在检查事务
---> 软件包 apr.x86_64.0.1.4.8-7.el7 将被 安装
---> 软件包 apr-util.x86_64.0.1.5.2-6.el7 将被 安装
---> 软件包 httpd-tools.x86_64.0.2.4.6-97.el7.centos 将被 安装
---> 软件包 mailcap.noarch.0.2.1.41-2.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

=============================================================================================================================
 Package                      架构                    版本                                    源                        大小
=============================================================================================================================
正在安装:
 httpd                        x86_64                  2.4.6-97.el7.centos                     updates                  2.7 M
为依赖而安装:
 apr                          x86_64                  1.4.8-7.el7                             base                     104 k
 apr-util                     x86_64                  1.5.2-6.el7                             base                      92 k
 httpd-tools                  x86_64                  2.4.6-97.el7.centos                     updates                   93 k
 mailcap                      noarch                  2.1.41-2.el7                            base                      31 k

事务概要
=============================================================================================================================
安装  1 软件包 (+4 依赖软件包)

总下载量:3.0 M
安装大小:10 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): apr-util-1.5.2-6.el7.x86_64.rpm                                                                |  92 kB  00:00:00     
(2/5): mailcap-2.1.41-2.el7.noarch.rpm                                                                |  31 kB  00:00:00     
(3/5): apr-1.4.8-7.el7.x86_64.rpm                                                                     | 104 kB  00:00:00     
(4/5): httpd-tools-2.4.6-97.el7.centos.x86_64.rpm                                                     |  93 kB  00:00:00     
(5/5): httpd-2.4.6-97.el7.centos.x86_64.rpm                                                           | 2.7 MB  00:00:06     
-----------------------------------------------------------------------------------------------------------------------------
总计                                                                                         506 kB/s | 3.0 MB  00:00:06     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : apr-1.4.8-7.el7.x86_64                                                                                   1/5 
  正在安装    : apr-util-1.5.2-6.el7.x86_64                                                                              2/5 
  正在安装    : httpd-tools-2.4.6-97.el7.centos.x86_64                                                                   3/5 
  正在安装    : mailcap-2.1.41-2.el7.noarch                                                                              4/5 
  正在安装    : httpd-2.4.6-97.el7.centos.x86_64                                                                         5/5 
  验证中      : httpd-2.4.6-97.el7.centos.x86_64                                                                         1/5 
  验证中      : apr-1.4.8-7.el7.x86_64                                                                                   2/5 
  验证中      : mailcap-2.1.41-2.el7.noarch                                                                              3/5 
  验证中      : httpd-tools-2.4.6-97.el7.centos.x86_64                                                                   4/5 
  验证中      : apr-util-1.5.2-6.el7.x86_64                                                                              5/5 

已安装:
  httpd.x86_64 0:2.4.6-97.el7.centos                                                                                         

作为依赖被安装:
  apr.x86_64 0:1.4.8-7.el7             apr-util.x86_64 0:1.5.2-6.el7        httpd-tools.x86_64 0:2.4.6-97.el7.centos       
  mailcap.noarch 0:2.1.41-2.el7       

完毕!

安装php-fpm php-mysql php-cli

建议使用较低版本的php安装包,过高的php版本可能会在后续配置中产生报错

[root@localhost ~]# yum list php
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: hkg.mirror.rackspace.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
可安装的软件包
php.x86_64                                                 5.4.16-48.el7                                                 bas

安装php-fpm php-mysql php-cli

[root@localhost yum.repos.d]# yum install php-fpm php-mysql php-cli
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: hkg.mirror.rackspace.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 php-cli.x86_64.0.5.4.16-48.el7 将被 安装
--> 正在处理依赖关系 php-common(x86-64) = 5.4.16-48.el7,它被软件包 php-cli-5.4.16-48.el7.x86_64 需要
---> 软件包 php-fpm.x86_64.0.5.4.16-48.el7 将被 安装
---> 软件包 php-mysql.x86_64.0.5.4.16-48.el7 将被 安装
--> 正在处理依赖关系 php-pdo(x86-64) = 5.4.16-48.el7,它被软件包 php-mysql-5.4.16-48.el7.x86_64 需要
--> 正在检查事务
---> 软件包 php-common.x86_64.0.5.4.16-48.el7 将被 安装
--> 正在处理依赖关系 libzip.so.2()(64bit),它被软件包 php-common-5.4.16-48.el7.x86_64 需要
---> 软件包 php-pdo.x86_64.0.5.4.16-48.el7 将被 安装
--> 正在检查事务
---> 软件包 libzip.x86_64.0.0.10.1-8.el7 将被 安装
--
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
以下是在Linux系统上使用二进制安装部署Zabbix并进行重启的步骤: 1. 下载最新版本的Zabbix二进制安装包并解压缩: ``` wget https://cdn.zabbix.com/zabbix/sources/stable/5.4/zabbix-5.4.3.tar.gz tar xvfz zabbix-5.4.3.tar.gz ``` 2. 安装Zabbix server和agent: ``` cd zabbix-5.4.3 ./configure --enable-server --enable-agent --with-postgresql make install ``` 其中,`--enable-server` 表示安装Zabbix server,`--enable-agent` 表示安装Zabbix agent,`--with-postgresql` 表示使用PostgreSQL数据库,如果你想使用MySQL或MariaDB,可以使用 `--with-mysql` 或 `--with-mariadb` 选项。 3. 配置Zabbix server和agent: ``` cp misc/init.d/debian/zabbix-server /etc/init.d/ cp misc/init.d/debian/zabbix-agent /etc/init.d/ chmod +x /etc/init.d/zabbix-* ``` 将Zabbix server和agent的启动脚本拷贝到 `/etc/init.d/` 目录下,并将其加上可执行权限。 4. 启动Zabbix server和agent: ``` /etc/init.d/zabbix-server start /etc/init.d/zabbix-agent start ``` 5. 配置Zabbix Web界面: 将Zabbix Web界面拷贝到Web服务器目录下: ``` cp -a frontends/php /var/www/html/zabbix ``` 6. 打开Web浏览器并输入URL访问Zabbix Web界面: ``` http://服务器IP/zabbix ``` 7. 在Zabbix Web界面中进行配置,例如添加主机、监控项、触发器等。 8. 重启Zabbix server和agent: ``` /etc/init.d/zabbix-server restart /etc/init.d/zabbix-agent restart ``` 完成以上步骤后,你的Zabbix就已经部署完成了。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值