CentOS 7 安裝Zabbix 3.2

嘗試研究一下在CentOS 7 zabbix 如何安裝

先做一次系統updatea => yum update

yum install epel-release

za-1

rpm -ivh https://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

 

za-2

Install Zabbix Server, Database, Web Server and PHP packages

指令如下

yum -y install zabbix-server-mysql zabbix-web-mysql mysql mariadb-server httpd php

資料庫基本設定:

啟動資料庫指令 => systemctl start mariadb
設定重開機自動啟動 => systemctl enable mariadb

za-3

基本資料庫設定

會設定root密碼,是否允許root遠端登入,移除test資料庫等等設定

指令: mysql_secure_installation

za-4

建立資料庫及資料庫使者帳號並賦予權限

create database zabbix_db
grant all privileges on zabbix_db.* to zabbix_user@localhost identified by “password”
flush privileges;

za-5

Now import the database Schema

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

gunzip create.sql.gz

mysql -u root -p zabbix_db < create.sql

za-6

編輯zabbix 設定檔

vi /etc/zabbix/zabbix_server.conf

修改以下四個設定後存檔

DBHost=localhost
DBName=zabbix_db
DBUser=zabbix_user
DBPassword=password

修改php.ini

max_execution_time = 600
max_input_time = 600
memory_limit = 256M
post_max_size = 32M
upload_max_filesize = 16M
date.timezone = Asia/Taipei

設定啟動 zabbix server and web server

systemctl start zabbix-server
systemctl enable zabbix-server

systemctl start httpd
systemctl enable httpd

za-7

接著利用瀏覽器輸入網址 http://192.168.0.2/zabbix

就會看到zabbix 3.2 首頁,點選 Next

za-8

za-9

za-10

za-11

za-12

za-13

預設登入帳號密碼 admin/zabbix

za-14

za-15

登入後如果一直出現:

Zabbix server is not running: the information displayed may not be current”

我是直接把selinux 關掉

修改/etc/selinux/config  直接disabled

或是設定 setsebool -P httpd_can_connect_zabbix=1



本篇瀏覽人數: 7652
分類: MIS文章-Linux篇, Zabbix。這篇內容的永久連結

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *