debian 10 安装apache2 zabbix

nginx 可以略过,改为apache2

复制代码
apt update

apt-get install nginx -y

nginx -v
nginx version: nginx/1.14.2
  1. mysql 安装参考linux debian10 安装mysql5.7_debian apt install mysql5.7-CSDN博客
Install and configure Zabbix for your platform
a. Install Zabbix repository

Documentation

复制代码
   wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1+buster_all.deb
   dpkg -i zabbix-release_5.0-1+buster_all.deb
   apt update
b. Install Zabbix server, frontend, agent
复制代码
   apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent
c. Create initial database

Documentation

Make sure you have database server up and running.

Run the following on your database host.

复制代码
   mysql -uroot -p
   password
   mysql> create database zabbix character set utf8 collate utf8_bin;
   mysql> create user zabbix@localhost identified by 'password';
   mysql> grant all privileges on zabbix.* to zabbix@localhost;
   mysql> set global log_bin_trust_function_creators = 1;
   mysql> quit;

On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.

复制代码
   zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

Disable log_bin_trust_function_creators option after importing database schema.

复制代码
   mysql -uroot -p
   password
   mysql> set global log_bin_trust_function_creators = 0;
   mysql> quit;
d. Configure the database for Zabbix server

Edit file /etc/zabbix/zabbix_server.conf

复制代码
   DBPassword=password
e. Configure PHP for Zabbix frontend

Edit file /etc/zabbix/apache.conf uncomment and set the right timezone for you.

复制代码
   php_value date.timezone Europe/Riga
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 apache2
   systemctl enable zabbix-server zabbix-agent apache2
Start using Zabbix

如果没有其它应用占用80端口 此步略过

vim /etc/apache2/ports.conf

Listen 81

systemctl restart apache2

vim /etc/php/7.3/apache2/php.ini

复制代码
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Shanghai

systemctl restart zabbix-server zabbix-agent apache2

相关推荐
gs8014019 小时前
避坑指南:Nginx 多层代理下的“404”与“重定向死循环”深度排查
运维·nginx
相思难忘成疾19 小时前
RHCE 综合实验:基于 Nginx 实现 openlab 多站点部署、用户访问控制与 HTTPS 加密访问
linux·运维·nginx·http·https·rhel
Q_45828386819 小时前
基于 JTT1078MediaServer 的集群方案实践(Nginx + 溯源模式)轻量级车联网音视频集群
运维·服务器·nginx·架构·音视频·交通物流
程序员老邢1 天前
【技术底稿 32】Nginx 经典大坑复盘:本机公网域名自环代理,导致接口返回首页 / 404 实战排障
java·运维·nginx·前后端分离·技术底稿·后端部署
相思难忘成疾2 天前
Nginx 子目录多站点配置实验(HTTP/HTTPS 分离部署)
linux·运维·nginx·http·https·vim
閞杺哋笨小孩3 天前
面向「机构按域名访问、同一套前端」的 Nginx 示例
nginx
源远流长jerry3 天前
Linux 本机网络通信机制深度解析:Loopback 设备原理
linux·运维·服务器·网络·tcp/ip·nginx·负载均衡
spmcor3 天前
一文搞定 Nginx 开机自启:Windows / Linux / macOS 全平台指南
nginx
fred_kang3 天前
Windows 下 Nginx 启动报错 10013 / OpenEvent 完整排查指南
运维·windows·nginx
imuliuliang4 天前
五大编程语言核心对比:特性与应用全解析
运维·spring boot·nginx