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

相关推荐
枫叶轻语1 天前
【Nginx 从入门到实战 09】前后端统一入口:部署页面与接口的完整配置
nginx·全栈
无言听风雨丶1 天前
Nginx 深度实战:从架构原理到生产排错
运维·nginx·架构
xxwl5852 天前
Nginx 基础学习笔记
笔记·学习·nginx
fb_123452 天前
K8s StatefulSet五大有状态集群实战_Nginx_Etcd_Redis_Cassandra_MySQL
nginx·kubernetes·etcd
acd120092 天前
域名解析缓存带来的隐性故障,很多排查都漏掉了这一层
java·运维·nginx
jiecy2 天前
在 ARM 的 UOS 系统里布署 WebDav
arm开发·docker·debian
枫叶轻语2 天前
【Nginx 从入门到实战 07】root 与 alias:资源路径到底怎样对应?
nginx·全栈
acd120092 天前
Nginx 反向代理的缓冲区坑:后端响应大时接口偶发 502
java·运维·nginx
Thanks_ks2 天前
常见 HTTP 状态码的坑:301/302、401/403、500/502 之间差的那一个词
计算机网络·nginx·http·面试·状态码·后端开发·浏览器缓存
Lsetea3 天前
Certbot webroot申请SSL证书总是404:Nginx挑战目录与路径映射检查
运维·nginx·https·ssl证书·certbot