[CentOS7 Zabbix 4.2 安裝過程]

Posted jbite9057

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[CentOS7 Zabbix 4.2 安裝過程]相关的知识,希望对你有一定的参考价值。

 

1. 關閉selinux
sed -i ‘s#SELINUX=enforcing#SELINUX=disabled#g‘ /etc/selinux/config

2. 重啟電腦
reboot

3. 更改防火牆設定
firewall-cmd --permanent --add-port=10050/tcp
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload
systemctl restart firewalld

4. 修改reposi位置

rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm

yum -y update

5. 安裝所需套件
5.1 mysql apache
yum -y install httpd mariadb*
systemctl enable mariadb
systemctl restart mariadb

5.2 安裝zabbix套件
yum -y install zabbix-server-mysql zabbix-agent zabbix-web-mysql

5.3 安裝相依套件
yum -y install php-bcmath php-mbstring php-xml curl curl-devel net-snmp net-snmp-devel net-snmp-utils perl-DBI

6. 設定mysql
mysql

create database zabbix character set utf8 collate utf8_bin;

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

quit;

cd /usr/share/doc/zabbix-server*/

zcat create.sql.gz | mysql -uzabbix -pzabbix zabbix

7. 設定zabbix server

vi /etc/zabbix/zabbix_server.conf

DBHost=localhost
DBUser=zabbix
DBPassword=zabbix --> same as you create at step 6

8. 設定時區
vi /etc/httpd/conf.d/zabbix.conf

php_value date.timezone asia/taipei

9. 服務重啟
systemctl restart zabbix-agent
systemctl enable zabbix-agent
systemctl restart zabbix-server
systemctl enable zabbix-server
systemctl restart mariadb
systemctl enable mariadb
systemctl restart httpd
systemctl enable httpd

10. 透過瀏覽器登入zabbix
http://<IP>/zabbix

以上是关于[CentOS7 Zabbix 4.2 安裝過程]的主要内容,如果未能解决你的问题,请参考以下文章

sass環境搭建

centOS7編譯安裝python

安装Zabbix到CentOS(YUM)

Centos7安裝cacti 和nagios

鳥哥的 Linux 私房菜——(第三章)安裝 CentOS7.x(待续)

Centos7編譯安裝LAMP平臺