상세 컨텐츠

본문 제목

[CentOS7] zabbix 4.0 설치

서버

by 검은체리 2019. 10. 31. 18:55

본문

1. Apache

2. Tomcat

3. Zabbix

 

Step 1 – Disable SELinux

vim /etc/sysconfig/selinux

SELINUX=disabled

 

reboot

Step 2 – Install and Configure Apache

yum -y install httpd

 

systemctl enable httpd

systemctl start httpd.service

systemctl status httpd.service

Step 3 – Configure Needed Repositories

yum -y install epel-release

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm 

Step 4 – Install PHP

yum-config-manager --disable remi-php54

yum-config-manager --enable remi-php72

 

yum install php php-pear php-cgi php-common php-mbstring php-snmp php-gd php-pecl-mysql php-xml php-mysql php-gettext php-bcmath

sed -i "s/^;date.timezone =$/date.timezone = \"Asia\/Bangkok\"/" /etc/php.ini

cat /etc/php.ini | grep Asia

date.timezone = "Asia/Bangkok"

Step 5 – Install MariaDB

yum --enablerepo=remi install mariadb-server

systemctl enable mariadb

systemctl start mariadb.service

mysql_secure_installation

Step 6 – Create a Database for Zabbix

mysql -u root -p

create database zabbix character set utf8 collate utf8_bin;

grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix';

quit;

Step 7 – Install Zabbix and needed dependencies

rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

yum clean all

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get

Step 8 –  Configure Zabbix

vim /etc/httpd/conf.d/zabbix.conf

vim /etc/php.ini (위 설정과 같게 맞춤)

cd /usr/share/doc/zabbix-server-mysql-4.0.14/

zcat create.sql.gz | mysql -u zabbix -p zabbix

 

vi /etc/zabbix/zabbix_server.conf

systemctl enable zabbix-server.service

systemctl start zabbix-server.service

systemctl enable zabbix-agent

systemctl start zabbix-agent

systemctl restart httpd

 

firewall-cmd --add-service={http,https} --permanent

firewall-cmd --add-port={10050/tcp,10051/tcp} --permanent

firewall-cmd --reload

 

 

'서버' 카테고리의 다른 글

[CentOS7] Apache HTTP Server Version 2.4 (Source)  (0) 2019.11.20
[CentOS7] zabbix 4.0 JMX (Tomcat Monitoring)  (0) 2019.11.01
[CentOS6] zabbix 4.0 설치  (0) 2019.09.16
[CentOS7] Apache Tomcat 9 연동  (0) 2019.07.18
[CentOS7] Tomcat 9 설치  (0) 2019.07.12

관련글 더보기