sudo rm /usr/share/zabbix/fonts/graphfont.ttf
sudo ln -s /usr/share/fonts/ipa-gothic/ipag.ttf /usr/share/zabbix/fonts/graphfont.ttf
sudo rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
sudo yum install zabbix-agent
sudo rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
sudo apt-get install zabbix-agent
sudo chkconfig zabbix-agent on
sudo apt-get install sysv-rc-conf sudo sysv-rc-conf zabbix-agent on
sudo service zabbix-agent stop sudo service zabbix-server stop
mysqldump -u zabbix -p zabbix > /root/zabbix.dump
mkdir /root/zabbix-backup/ cp -p /etc/zabbix/zabbix_server.conf /root/zabbix-backup/ cp -p /etc/httpd/conf.d/zabbix.conf /root/zabbix-backup/
cp -pR /usr/share/zabbix/ /root/zabbix-backup/ cp -pR /usr/share/doc/zabbix-* /root/zabbix-backup/
grep DBPassword /etc/zabbix/zabbix_server.conf
yum remove zabbix-release
rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/6/i386/zabbix-release-3.0-1.el6.noarch.rpm
yum clean all
yum install zabbix zabbix-server zabbix-server-mysql zabbix-web zabbix-web-mysql zabbix-web-japanese
cd /etc/zabbix/
mv zabbix_server.conf zabbix_server.conf.bak191207
mv zabbix_server.conf.rpmnew zabbix_server.conf
vi zabbix_server.conf
DBPassword=
DBHost=localhost DBName=zabbix DBUser=zabbix
max_execution_time 300 memory_limit 128M post_max_size 16M upload_max_filesize 2M max_input_time 300 date.timezone = Asia/Tokyo always_populate_raw_post_data -1
sudo httpd -v
sudo cp /usr/share/doc/zabbix-web-3.0.28/httpd22-example.conf /etc/httpd/conf.d/
cd /etc/httpd/conf.d/ ls mv httpd22-example.conf zabbix.conf
<IfModule mod_php5.c>
<IfModule mod_php7.c>
sudo service zabbix-server start
sudo tail -f /var/log/zabbix/zabbix_server.log
sudo service httpd start sudo service zabbix-agent start
sudo service zabbix-agent stop sudo service zabbix-server stop
mysqldump -u zabbix -p zabbix > /root/zabbix.dump
sudo mkdir /root/zabbix-backup/ sudo cp -p /etc/zabbix/zabbix_server.conf /root/zabbix-backup/ sudo cp -p /etc/httpd/conf.d/zabbix.conf /root/zabbix-backup/ ~ sudo cp -pR /usr/share/zabbix/ /root/zabbix-backup/ sudo cp -pR /usr/share/doc/zabbix-* /root/zabbix-backup/
grep DBPassword /etc/zabbix/zabbix_server.conf
sudo yum remove zabbix-release
sudo rpm -ivh zabbix-release-4.0-2.el6.noarch.rpm
sudo yum clean all
sudo yum update zabbix zabbix-server zabbix-server-mysql zabbix-web zabbix-web-mysql
cd /etc/zabbix/
sudo mv zabbix_server.conf zabbix_server.conf.bak191207
sudo mv zabbix_server.conf.rpmnew zabbix_server.conf
sudo vi zabbix_server.conf
DBPassword=
DBHost=localhost DBName=zabbix DBUser=zabbix
sudo service zabbix-server start sudo service httpd start sudo service zabbix-agent start
Server=10.0.0.30
Server=hoge.domain.jp
ServerActive=10.0.0.30
Hostname=hogeTarget.domain.jp
sudo systemctl enable --now zabbix-agent
sudo apt install hddtemp
sudo dnf install hddtemp
[Service] User=root Group=root
zabbix ALL=NOPASSWD: ALL
EnableRemoteCommands=1 AllowRoot=1
sudo systemctl daemon-reload sudo systemctl restart zabbix-agent
id zabbix
sudo usermod -aG root zabbix
id zabbix
id zabbix
sudo usermod -aG adm zabbix
id zabbix
which hddtemp
sudo zabbix_agentd -t "system.run[/bin/hddtemp /dev/sda -n]"
sudo zabbix_agentd -t "system.run[/usr/sbin/hddtemp /dev/sda -n]"
名前 | 適当に。例:HddTempSdaServerName? |
タイプ | Zabbixエージェント |
キー | system.run[/bin/hddtemp /dev/sda -n] |
データ型 | 数値(浮動小数) |
単位 | ℃ |
監視感覚 | 適当に。例:5m |
アプリケーション | 適当に。例:Filesystems App |
sudo dnf -y install https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
sudo dnf -y install zabbix-agent2
wget https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-agent-5.0.14-1.el8.x86_64.rpm
sudo dnf install /tmp/hogehoge/zabbix-agent-5.0.14-1.el8.x86_64.rpm
sudo apt -y install apache2
ServerTokens Prod
sudo systemctl restart apache2
sudo systemctl restart php8.1-fpm apache2
sudo echo '<?php phpinfo(); ?>' > /var/www/html/info.php
http://(ip address)/info.php
sudo apt -y install mariadb-server
sudo systemctl restart mariadb
mysql_secure_installation
# [no] でも root のみ デフォルトで [Unix_Socket] 認証は有効
Switch to unix_socket authentication [Y/n] n
Change the root password? [Y/n] n
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
exit
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-3+ubuntu22.04_all.deb
sudo vi /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=password
sudo systemctl restart zabbix-server sudo systemctl enable zabbix-server
vi /etc/zabbix/zabbix_agent2.conf
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=dlp.srv.world
sudo systemctl restart zabbix-agent2
php_value[max_execution_time] = 300 php_value[memory_limit] = 128M php_value[post_max_size] = 16M php_value[upload_max_filesize] = 2M php_value[max_input_time] = 300 php_value[max_input_vars] = 10000 php_value[always_populate_raw_post_data] = -1 php_value[date.timezone] = Asia/Tokyo
sudo vi /etc/apache2/conf-enabled/zabbix.conf
#Allow from all Allow from 10.0.0.0/24
systemctl restart apache2 php8.1-fpm
Admin zabbix
Zabbix agent を 5.0 -> 6.0へ変更(Debian)
sudo apt remove zabbix-agent
sudo dpkg -l | grep zabbix
sudo dpkg -P zabbix-agent sudo dpkg -P zabbix-release
wget https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-4+debian11_all.deb sudo dpkg -i zabbix-release_6.0-4+debian11_all.deb
sudo apt update
sudo apt install zabbix-agent
Server=(IP or server name) ServerActive=(IP or server name) HostName=(監視対象サーバのホスト名)
sudo systemctl restart zabbix-agent