0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

zabbix5.0をRaspbianに構築する手順

Last updated at Posted at 2023-02-17

作業環境

OS・ハード バージョン
Raspberry Pi 3 Model B +
Raspbian Buster

nginxをインストールする

$ sudo apt-get install nginx
$ sudo systemctl start nginx

php-fpm

php-fpmのインストール

$ sudo apt install php7.3-fpm php7.3-mysql

コメントアウトの解除
※php-fpm.sockは該当バージョンを指定

$ sudo vi /etc/nginx/sites-available/default
location ~ \.php$ {
  include snippets/fastcgi-php.conf;
  # With php-fpm (or other unix sockets):
  fastcgi_pass unix:/run/php/php7.3-fpm.sock;
  # With php-cgi (or other tcp sockets):
  #fastcgi_pass 127.0.0.1:9000;
}

php.iniの設定を修正

$ sudo vi /etc/php/7.3/fpm/php.ini
cgi.fix_pathinfo=0

mysql(mariadb)

mysqlのインストール

$ sudo apt install mariadb-server
$ sudo mysql_secure_installation

zabbix用のDBを準備

$ 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> quit;

ZABBIX

zabbixのインストール

wget https://repo.zabbix.com/zabbix/5.0/raspbian/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
apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-agen
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

DBパスワードの設定

$ vi /etc/zabbix/zabbix_server.conf
DBPassword=password

nginx用のconfファイルを修正

$ vi /etc/zabbix/nginx.conf
listen 80;
server_name zabbix.;
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?