1. 程式人生 > >自己總結的安裝zabbix

自己總結的安裝zabbix

def local mysq .gz mov fault 開放 bus 初始

自己編寫的zabbix

5.12 做的zabbix文檔: 在centos 7 環境下做zabbix

裝機zabbix
systemctl stop firewalld
setenforce 0

代表圖例

殺死pid

rm -rf /var/run/yum.pid

安裝 Apache,php, mariadb

yum -y install httpd mariadb mariadb-server php php-mysql php-gd

啟動mariadb
systemctl enable mariadb.service
systemctl start mariadb.service

初始化數據庫,創建root密碼

mysql_secure_installation

創建zabbix數據庫及其用戶
mysql -uroot -p123456 -e "create database zabbix default character set utf8 collate utf8_bin;"
mysql -uroot -p123456 -e "grant all on zabbix.* to zabbix@localhost identified by ‘zabbix‘;"

測試 zabbix 數據庫及其用戶
mysql -uzabbix -pzabbix

啟動Apache 及開放端口

systemctl start httpd.service
netstat -ltun

安裝zabbix
wget http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm

rpm -ivh zabbix-release-3.4-2.el7.noarch.rpm

yum -y install zabbix-server-mysql.x86_64 zabbix-web-mysql zabbix-agent

Create.sql.gz 導入數據庫

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

zcat create.sql.gz | mysql -uroot -p123456 zabbix

編輯zabbix 配置文件,開啟zabbix

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

vim /etc/zabbix/zabbix_server.conf

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

wget ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/7.0/x86_64/os/Packages/gnutls-3.1.18-8.el7.x86_64.rpm

yum -y remove gnutls-dane-3.3.8-12.el7.x86_64

rpm -Uvh --force gnutls-3.1.18-8.el7.x86_64.rpm

systemctl start zabbix-server.service

編輯php.ini 配置文件

vim /etc/php.ini

重啟apache
systemctl restart httpd.service

網頁登入:

http://192.168.126.129/zabbix/setup.php

、網頁安裝zabbix步驟

自己總結的安裝zabbix