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

相关推荐
安卓开发者10 小时前
Docker与Nginx:现代Web部署的完美二重奏
前端·nginx·docker
妹妹够啦10 小时前
宝塔部署-Nginx配置
运维·nginx·junit
MOYIXIAOWEIWEI15 小时前
rocky 9.5系统安装zabbix监控实现邮件告警
ubuntu·zabbix·rocky
stark张宇1 天前
超越 Hello World:深入小程序 Hybrid 初衷、安全配置与上线全链路
nginx·微信小程序·php
希晨er1 天前
Nginx从入门到实践:安装、配置与应用
nginx
jc06201 天前
4.5-中间件之Nginx
运维·服务器·nginx
牛奶咖啡132 天前
zabbix实现配置监控Windows设备、SNMP协议设备的全流程实操教程
zabbix·配置监控windows设备·使用snmp协议监控群晖nas·snmp监控项oid·群晖nas监控模板·配置agent端自主自动注册
青鱼入云2 天前
对比nginx、kong、apisix、zuul、gateway网关
nginx·gateway·kong
牛奶咖啡132 天前
zabbix自动发现与自动注册的实操保姆级教程
zabbix·zabbix的自动网络发现·zabbix的自动发现原理·zabbix的自动注册·zabbix客户端的主动模式·zabbix客户端的被动模式·zabbix的低级别发现
奥尔特星云大使3 天前
zabbix安装部署
zabbix