- Centos 7의 경우 zabbix 5버전에서 서버/프론트엔드 설치가능.
- 버전에 맞는 repo 다운로드 및 설치
# wget –no-check-certificate https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
# rpm -Uvh zabbix-release-5.0-1.el7.noarch.rpm
# yum install zabbix-server-mysql zabbix-agent
# yum install centos-release-scl
# vi /etc/yum.repo.d/zabbix.repo
[zabbix-frontend]
…
enabled=1
…
# yum install zabbix-web-mysql-scl
zabbix-apache-conf-scl
-> PHP, Apache등 디펜던시 31개 가량 설치. 인터넷 연결 권장.
- Database 초기화.
# mysql -uroot -p
Enter
password:
mysql>
create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by ‘zabbix’;
mysql>
grant all privileges on zabbix.* to zabbix@localhost;
mysql>
set global log_bin_trust_function_creators = 1;
mysql>
quit;
# zcat
/usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
#
mysql -uroot -p
Enter password:
mysql>
set global log_bin_trust_function_creators = 0;
mysql>
quit;
# vi /etc/zabbix/zabbix_server.conf
DBPassword=zabbix
#
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
#
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
# systemctl status zabbix-server zabbix-agent
httpd rh-php72-php-fpm
**한글사용을 위해 언어팩 설치 권장.
# apt install language-pack-ko
- Zabbix quick start
가이드 참조.
참조 : https://www.zabbix.com/documentation/5.0/en/manual/quickstart/login
4.1. http://192.168.0.101/zabbix/setup.php 접속
4.2. Welcome -> Next
4.3. Check of pre-requisites
“Time zone for PHP is not set
(configuration parameter “date.timezone”).”
# vi /etc/opt/rh/rh-php72/php.ini
date.timezone
= Asia/Seoul
# shutdown -r now
4.4. Configure DB connection
password : zabbix
4.5. Zabbix server details
4.6. Pre-installation summary
4.7. Install
Login : Admin / Zibbix
- Zabbix Agent 설치
– 모니터링 할 client server에 zabbix agent 설치 필요.
우분투 20.04 서버 설치.
참조 : https://blog.dalso.org/article/ubuntu-20-zabbix-agent-%EC%97%B0%EB%8F%99%ED%95%98%EA%B8%B0
$ sudo dpkg -i
zabbix-release_5.0-1+focal_all.deb
$ sudo apt update
$ sudo apt install zabbix-agent2
error 발생
The
following packages have unmet dependencies:
zabbix-agent2 : Depends: libssl1.1 (>=
1.1.1) but it is not installable
E:
Unable to correct problems, you have held broken packages.
$ sudo echo “deb http://security.ubuntu.com/ubuntu focal-security main” | sudo tee
/etc/apt/sources.list.d/focal-security.list
$ sudo apt update
$ sudo apt install libssl1.1
$ sudo apt install zabbix-agent
-> 정상설치
$ sudo systemctl restart zabbix-agent
$
sudo systemctl enable zabbix-agent
$ sudo systemctl status
zabbix-agent
$ sudo vi /etc/zabbix/zabbix_agentd.conf
Server=192.168.0.101
ServerActive=192.168.0.101
$ sudo systemctl restart zabbix-agent
- Zabbix Server GUI 에서 추가
– configuration -> hosts -> create host -> add
-> 템플릿에서 “Linux
by zabbix agent” 추가 필요. “Linux by Zabbix
agent active”와 중복불가.
** agentd port 연결확인
zabbix 서버 -> zabbix 에이전트
root@test01:~#
nc -vz test02 10050
Connection
to test02 (192.168.0.148) 10050 port [tcp/zabbix-agent] succeeded!