当前位置: 首页 > news >正文

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博客
  2. Install and configure Zabbix for your platform
  3. 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

  4. 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
 

相关文章:

  • Spring Boot发送邮件
  • Unity的碰撞检测(五)
  • 【黑马程序员】mysql进阶再进阶篇笔记
  • 2023年上半年上午易错题(软件设计师考试)
  • 了解神经网络
  • PHP聊天系统源码 在线聊天系统网站源码 后台自适应PC与移动端
  • 水声功率放大器的应用场景是什么
  • sql-50练习题0-5
  • 图神经网络及其在知识图谱的应用
  • C语言实现通讯录
  • 一台服务器最大能支持多少条 TCP 连接
  • 修改svc的LoadBalancer的IP引发的惨案
  • 分布式理论和分布式锁知识点总结
  • 【Linux】权限完结
  • linux入门---多线程的控制
  • leetCode 229. 多数元素 II + 摩尔投票法 + 进阶 + 优化空间
  • yo!这里是进程间通信
  • 苍穹外卖-01
  • Linux Ubunto Nginx安装
  • vscode中如何将cmd设置为默认终端
  • 云南省政协原党组成员、秘书长车志敏接受审查调查
  • 居委业委居民群策群力,7位一级演员来到上海一小区唱戏
  • 经济日报社论:书写新征程上奋斗华章
  • 医学统计专家童新元逝世,终年61岁
  • 长三角铁路“五一”假期运输今启动:预计发送旅客量增6%,5月1日当天有望创新高
  • 流浪猫给车主造成困扰,长春一小区拟投药应对?律师:此举欠妥