「Zabbix」- 安装(CentOS) @20210405
本笔记整理在 CentOS 中部署 Zabbix 的过程,大致步骤如下:
1)安装 Nginx 服务;
2)安装 PHP-FPM 环境;
3)安装 MySQL/MariaDB 数据库;
4)安装 Zabbix Server、Agent、Frontend 服务;
5)配置 MySQL 用户,导入数据库表结构,并启动数据库服务;
6)配置 Zabbix Server 数据库连接,并启动服务以验证配置正确;
7)配置 PHP 环境参数,并启动 PHP-FPM 服务;
8)配置 Nginx 服务,绑定域名,指定目录,并启动服务;
9)配置 Frontend 以连接数据库,访问网页以查看;
CentOS 7.0 and Zabbix 4.0.1
Zabbix Documentation 4.0/1 Red Hat Enterprise Linux/CentOS
# 添加仓库,并安装 Server、Agent、Frontend(使用 MySQL 数据库)rpm -i https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpmyum install -y zabbix-agent-4.0.1 zabbix-server-mysql-4.0.1 zabbix-web-mysql-4.0.1 \zabbix-get-4.0.1# c. Create initial database# Import initial schema and data. You will be prompted to enter your newly created password.yum groups install 'MariaDB Database Client' 'MariaDB Database Server'mysql_secure_installationmysql -uroot -ppasswordmysql> create database zabbix character set utf8 collate utf8_bin;mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';mysql> quit;zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix# d. Configure the database for Zabbix server# Edit file /etc/zabbix/zabbix_server.confDBPassword=password# e. Configure PHP for Zabbix frontend# Edit file /etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.php_value date.timezone Asis/Shanghai# f. Start Zabbix server and agent processes# Start Zabbix server and agent processes and make it start at system boot:systemctl restart zabbix-server zabbix-agent httpd mariadb.servicesystemctl enable zabbix-server zabbix-agent httpd mariadb.service# Now your Zabbix server is up and running!# g. Configure Zabbix frontend# Connect to your newly installed Zabbix frontend: http://server_ip_or_name/zabbix# Follow steps described in Zabbix documentation: \# Installing frontend: https://www.zabbix.com/documentation/4.0/manual/installation/install#installing_frontend# h. Start using Zabbix# See Quickstart guide: https://www.zabbix.com/documentation/4.0/manual/quickstart/login
CentOS 7.4 and Zabbix Agent 4.2
#!/bin/shrpm -ivh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpmyum makecacheyum install -y zabbix-agent
CentOS 7.4 and Zabbix Agent 4.4.3
Zabbix Documentation 4.4/1 Red Hat Enterprise Linux/CentOS
#!/bin/sh# 部署监控服务rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpmyum makecacheyum install -y zabbix-agent-4.4.3# 修改配置文件
CentOS 6.5 and Zabbix Agent 4.4.3
Zabbix Documentation 4.4/1 Red Hat Enterprise Linux/CentOS
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/6/x86_64/zabbix-release-4.4-1.el6.noarch.rpmyum makecache# yum info --showduplicateyum install -y zabbix-agent-4.4.3
CentOS 6.5 and Zabbix 4.2
部署过程与 CentOS and Zabbix 完全类似,参照官方文档即可。
安装 Zabbix server 服务,详细参考「Download and install Zabbix」手册。
安装Zabbix agent服务:
#!/bin/shrpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/6/x86_64/zabbix-release-4.2-2.el6.noarch.rpmyum clean allyum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agentchkconfig zabbix-agent onservice zabbix-agent start
相关文章
「Zabbix」- 关于版本升级
「Zabbix 3.2」- 使用源码安装
「Zabbix」- Debain 8.2 and Zabbix 4.0
参考文献
Home/Product/Download and install Zabbix
作者:研究林纳斯写的
来源链接:https://www.cnblogs.com/k4nz/p/14619200.html
版权声明:
1、JavaClub(https://www.javaclub.cn)以学习交流为目的,由作者投稿、网友推荐和小编整理收藏优秀的IT技术及相关内容,包括但不限于文字、图片、音频、视频、软件、程序等,其均来自互联网,本站不享有版权,版权归原作者所有。
2、本站提供的内容仅用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯相关权利人及本网站的合法权利。
3、本网站内容原作者如不愿意在本网站刊登内容,请及时通知本站(javaclubcn@163.com),我们将第一时间核实后及时予以删除。