码迷,mamicode.com
首页 > 其他好文 > 详细

[CentOS7 Zabbix 4.2 安裝過程]

时间:2019-12-09 21:54:33      阅读:119      评论:0      收藏:0      [点我收藏+]

标签:dbi   cin   ide   apache   emctl   character   database   套件   family   

 

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 安裝過程]

标签:dbi   cin   ide   apache   emctl   character   database   套件   family   

原文地址:https://www.cnblogs.com/jbite9057/p/12013372.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!