- This topic has 1개 답변, 1명 참여, and was last updated 4 months, 2 weeks 전에 by
DarkStar. This post has been viewed 176 times
-
-
페도라 환경에서 zabbix 설정
*가정사항-firewall selinuxdisabled /database password => password인경우
1. zabbix 방화벽 구성 및 지원을 위한 포트허용
firewall-cmd --permanent --add-port=161/tcp
firewall-cmd --permanent --add-port=161/udp
firewall-cmd --permanent --add-port=10050-10051/tcp
firewall-cmd --reload2.zabbix 프로그램 및 php 설치
가. 시스템 데몬 재적용
dnf install zabbix-server zabbix-agent zabbix-web.noarch
systemctl daemon-reload
systemctl enable zabbix-server-mysql zabbix-agent
systemctl start zabbix-agent zabbix-server-mysql나. Php 설치 및 버전확인
(1) php 설치
dnf install php php-devel php-fpm php-mbstring php-mysqlnd httpd(2) php 버전확인
php --version
PHP 8.3.13 (cli) (built: Oct 22 2024 18:39:14) (NTS gcc x86_64)
3. mariadb 설정
가. db 생성 및 계정설정mysql -uroot -p
password mysql> use mysql;
mysql> create database zabbix character set utf8mb4 collate utf8mb4_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> flush privileges;
mysql> quit;
나. db 구성을 위한DB 가져오기 cd /usr/share/zabbix-mysql
mysql -u zabbix -p zabbix < schema.sql
mysql -u zabbix -p zabbix < images.sql
mysql -u zabbix -p zabbix < data.sql 라. DB 환경파일 생성하기# vi /etc/zabbix/zabbix_server.conf
ListenPort=10051
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
DBName=zabbix
DBUser=zabbix
DBPassword=password
CacheSize=128M
Timeout=30
# vi /etc/zabbix/zabbix_agentd.conf
PidFile=/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=127.0.0.1
4. 페도라 zabbix 구현을 위한 데몬 환경 설정파일 지정
가.zabbix-agent.service
# cd /usr/lib/systemd/system
# cat zabbix-agent.service
[Unit]
Description=Zabbix Agent
After=syslog.target
After=network.target[Service]
Environment="CONFFILE=/etc/zabbix/zabbix_agentd.conf"
EnvironmentFile=-/etc/sysconfig/zabbix-agent
Type=forking
Restart=on-failure
PIDFile=/run/zabbix/zabbix_agentd.pid
KillMode=control-group
ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE
ExecStop=/bin/kill -SIGTERM $MAINPID
RestartSec=10s
User=zabbix
Group=zabbix[Install]
WantedBy=multi-user.target나. Zabbix-server.service # cat zabbix-server.service
[Unit]
Description=Zabbix Server with MySQL DB
After=syslog.target network.target mysqld.service
[Service]
Environment="CONFFILE=/etc/zabbix/zabbix_server.conf"
EnvironmentFile=-/etc/sysconfig/zabbix-server
Type=forking
Restart=on-failure
PIDFile=/run/zabbix/zabbix_server.pid
KillMode=control-group
ExecStart=/usr/sbin/zabbix_server -c $CONFFILE
ExecStop=/bin/kill -SIGTERM $MAINPID
RestartSec=10s
TimeoutSec=0
LimitNOFILE=65536:1048576
[Install]
WantedBy=multi-user.target
다. 서비스 및 데몬 재시작
# systemctl enable zabbix-server-mysql zabbix-agent httpd php-fpm
# systemctl restart zabbix-server-mysql zabbix-agent httpd php-fpm
5.웹 접속 시험 – 해당 장비의 웹주소/zabbix
가. 내려받은 파일 zabbix.conf.php 파일을 zabbix 폴더인 /etc/zabbix/web에 복사해 넣기
나. 해당 복사하기 이후에, 웹 접속을 통해 접근하기 (계정/비밀번호 Admin/zabbix)6. zabbix 한글 글꼴깨짐 개선 (인용자료)
# rm -f /usr/share/zabbix/assets/fonts/graphfont.ttf
# wget http://themes.googleusercontent.com/static/fonts/earlyaccess/nanumgothic/v3/NanumGothic-Bold.ttf -O /usr/share/zabbix/assets/fonts/graphfont.ttf
# rm -f /usr/share/zabbix/assets/fonts/DejaVuSans.ttf
# wget http://themes.googleusercontent.com/static/fonts/earlyaccess/nanumgothic/v3/NanumGothic-Bold.ttf -O /usr/share/zabbix/assets/fonts/DejaVuSans.ttf
DarkStar
- 답변은 로그인 후 가능합니다.