nginxのインストール
sudo apt-get install nginx
sudo systemctl start nginx
PHPのインストール
sudo apt install php7.3-fpm php7.3-mysql
56行明くらいを修正
sudo nano /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;
}
以下検索して修正
sudo /etc/php/7.3/fpm/php.ini
cgi_pathinfo=0にする
dbのインストール
sudo apt install mariadb-server
sudo mysql_secure_installation
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のインストール
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
パスワード設定
/etc/zabbix/zabbix_server.conf
DBPassword=password
nginxコンフィグファイル
/etc/zabbix/nginx.conf
listen 80;