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

相关推荐
Fireworkitte9 小时前
Ubuntu 系统 tar 包源码安装 Nginx
linux·nginx·ubuntu
Agome9911 小时前
Docker之nginx安装
java·nginx·docker
努力买辣条16 小时前
基于Docker的高可用WordPress集群部署:Nginx负载均衡+Mysql主从复制+ProxySQL读写分离
nginx·docker·负载均衡
苹果醋31 天前
Java并发编程-Java内存模型(JMM)
java·运维·spring boot·mysql·nginx
程序员不迷路1 天前
Nginx学习
运维·nginx
童先生2 天前
Nginx + Vue/React 前端 + API:防止路径混淆漏洞与跨域问题实战分享
前端·vue.js·nginx
2501_920047032 天前
nginx-自制证书实现
运维·windows·nginx·https
Gavin_9153 天前
从零开始部署经典开源项目管理系统最新版redmine6-Linux Debian12
linux·ruby on rails·开源·debian·ruby·redmine
天朝八阿哥3 天前
Debian从12升到13的翻车记
debian
鹧鸪yy3 天前
认识Node.js及其与 Nginx 前端项目区别
前端·nginx·node.js