본문 바로가기
Tech

Zabbix 버전별 설치 및 마이그레이션

by ohrohi 2020. 12. 1.
반응형

* 신규설치는 사용할 각 버전부터 시작하면 된다.
* 마이그레이션은 이미 사용중인 버전을 업그레이드시 진행

3.2 버전 설치

- yum -y install mariadb mariadb-server
- yum install http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
- yum -y install zabbix-server-mysql zabbix-web-mysql
- systemctl start mariadb
- mysql

mysql> update user set password=password('root패스워드') where user='root';
mysql>create database 자빅스디비명 character set utf8 collate utf8_bin;
mysql>grant all privileges on 자빅스디비명.* to zabbix@localhost identified by '유저패스워드';

- zcat /usr/share/doc/zabbix-server-mysql-3.2.11/create.sql.gz | mysql -u zabbix -p zabbixdb
- vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=자빅스디비명
DBUser=zabbix
DBPassword=유저패스워드

- yum -y install httpd
- vi /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Seoul (주석해제후 국가/지역 변경)

- service zabbix-server start
- service httpd start

 

4.0 마이그레이션

- rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
- yum clean all
- yum upgrade zabbix-server-mysql zabbix-web-mysql zabbix-agent
- service zabbix-server start
웹 확인

 

5.0 마이그레이션
- yum-config-manager --enable rhel-server-rhscl-7-rpms
- yum install -y centos-release-scl
- rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
- vi /etc/yum.repos.d/zabbix.repo
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/frontend
enabled=0 (1로 수정)
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

- yum -y upgrade zabbix-server-mysql
- yum -y remove php* (4.0버전의 zabbix-web-mysql 패키지와 기존 설치되어있던 5.X 버전의 PHP를 삭제해야 5.0패키지 설치가 가능함)
- yum install -y zabbix-web-mysql-scl zabbix-apache-conf-scl
- service zabbix-server start
- service httpd restart
- service mariadb restart
- systemctl start rh-php72-php-fpm.service

반응형