在虛擬機安裝zabbix

實驗材料:centos_template.rar、k8s_docker.vmdk
zabbix版本:3.4
1.配置本地yum倉庫
mount /dev/sdb2 /var/www/html/materials
systemctl starts httpd
systemctl enable httpd
curl http://localhost/materials/materials/
cp /var/www/html/materials/materials/repo.repo /etc/yum.repos.d/
yum repolist
2.安裝zabbix、mariadb包
yum install -y zabbix-
yum install -y mariadb

3.修改數據庫配置文件
cat /etc/my.cnf
增長如下內容
[mysqld]
innodb_file_per_table=1
character-set-server=utf8
systemctl start mariadb
systemctl enable mariadb
4.數據庫初始化
mysql_secure_installation #配置數據庫密碼,根據嚮導輸入5個y
mysql -uroot -pTesting@123
mysql -uroot -pTesting@123 -e "create database zabbix character set utf8"
mysql -uroot -pTesting@123 -e "grant all privileges on zabbix.* to zabbix@'%' identified by 'zabbix';"
mysql -uroot -pTesting@123 -e "flush privileges;"
rpm -qa |grep zabbix
rpm -ql zabbix-server-mysql-3.4.11-1.el7.x86_64
mkdir zabbix
cd zabbix/
cp /usr/share/doc/zabbix-server-mysql-3.4.11/create.sql.gz .
zcat create.sql.gz |mysql -uzabbix -pzabbix zabbix
mysql -uzabbix -pzabbix zabbix
5.修改zabbix配置文件
vim /etc/zabbix/zabbix_server.conf
DBPassword=zabbix
vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
systemctl restart httpd
systemctl restart zabbix-server
systemctl enable zabbix-server
6.訪問zabbix首頁
在瀏覽器打開並作初始化的操做:http://192.168.222.129/zabbix/
用戶名/密碼:admin/zabbixphp

相關文章
相關標籤/搜索