zabbix搭建記錄-1

一、首先找到zabbix官網php

https://www.zabbix.com/download?zabbix=3.4&os_distribution=centos&os_version=7&db=MySQL

我選擇centsos7與mysql版mysql

二、按照官網的提示,依次執行如下命令linux

rpm -i http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent

三、安裝mysql,直接使用自帶的mariadbweb

yum install mysql

四、啓動mysql並設置密碼sql

systemctl start mariadb.service
mysqladmin -u root password xxx

五、初始化數據庫數據庫

# mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> quit;

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

六、配置zabbix數據庫密碼及時區
修改/etc/zabbix/zabbix_server.conf文件,去掉註釋添加vim

DBPassword=password

修改/etc/httpd/conf.d/zabbix.conf文件,找到php_value date.timezone去掉註釋並修改centos

php_value date.timezone Asia/Shanghai

七、關閉selinux瀏覽器

打開 selinux 配置文件
[root@localhost ~]# vim /etc/selinux/config
修改 selinux 配置文件
將SELINUX=enforcing改成SELINUX=disabled,保存後退出
在執行重啓操做
reboot

八、上傳本地中文字體(仿宋)並覆蓋掉/usr/share/zabbix/fonts/下的字體文件
九、啓用相關服務tcp

systemctl start mariadb.service
systemctl start zabbix-server zabbix-agent httpd
systemctl enable mariadb.service
systemctl enable zabbix-server zabbix-agent httpd

十、開放相關端口

firewall-cmd --zone=public --add-port=80/tcp --permanent 
firewall-cmd --zone=public --add-port=10050-10051/tcp --permanent 
firewall-cmd --reload

十一、按提示配置zabbix web頁面
在瀏覽器打開

http://server_ip_or_name/zabbix

默認用戶Admin 密碼zabbix

web界面右上角修改語言爲簡體中文

相關文章
相關標籤/搜索