嘗試研究一下在CentOS 7 zabbix 如何安裝
先做一次系統updatea => yum update
yum install epel-release
rpm -ivh https://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
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
基本資料庫設定
會設定root密碼,是否允許root遠端登入,移除test資料庫等等設定
指令: mysql_secure_installation
建立資料庫及資料庫使者帳號並賦予權限
create database zabbix_db
grant all privileges on zabbix_db.* to zabbix_user@localhost identified by “password”
flush privileges;
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
編輯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
接著利用瀏覽器輸入網址 http://192.168.0.2/zabbix
就會看到zabbix 3.2 首頁,點選 Next
預設登入帳號密碼 admin/zabbix
登入後如果一直出現:
Zabbix server is not running: the information displayed may not be current”
我是直接把selinux 關掉
修改/etc/selinux/config 直接disabled
或是設定 setsebool -P httpd_can_connect_zabbix=1
本篇瀏覽人數: 7843