您好,登錄后才能下訂單哦!
本文采用操作系統:CentOS7.3 x64
需要epel源
wget https://mirrors.tuna.tsinghua.edu.cn/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-agent-3.2.6-1.el7.x86_64.rpm
wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-get-3.2.6-1.el7.x86_64.rpm
wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-proxy-mysql-3.2.6-1.el7.x86_64.rpm
wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2.6-1.el7.noarch.rpm
wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-sender3.2.6-1.el7.x86_64.rpm
wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-server-mysql-3.2.6-1.el7.x86_64.rpm
wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-web-3.2.6-1.el7.noarch.rpm
wget http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-web-mysql-3.2.6-1.el7.noarch.rpm
yum install zabbix-*
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install -y mysql-community-server
systemctl enable mysqld
systemctl start mysqld
創建密碼:
mysql_secure_installation
mysql -uroot -p
mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> flush privileges;
mysql> quit;
zcat /usr/share/doc/zabbix-server-mysql-3.2.6/create.sql.gz | mysql -uzabbix -pzabbix -b zabbix
# vi /etc/zabbix/zabbix_server.conf
配置默認數據庫用戶名
DBUser=zabbix
DBPassword=zabbix
其他可以默認
systemctl enable zabbix-server
systemctl start zabbix-server
vi /etc/httpd/conf.d/zabbix.conf
去掉時區前的#號,改一下位置
php_value date.timezone Asia/Shanghai
systemctl enable httpd
systemctl start httpd
http://xxx.xxx.xxx.xxx/zabbix
用戶名Admin/zabbix
第45行,將graphfont改為msyh
vi /usr/share/zabbix/include/defines.inc.php
(1) 其它客戶端僅需要安裝如下agent即可, 5.x/6.x可以下載安裝對應3.2.6-1rpm包。
rpm -ihv zabbix-agent-3.2.6-1.el7.x86_64
rpm -ihv zabbix-get-3.2.6-1.el7.x86_64.rpm
rpm -ihv zabbix-sender-3.2.6-1.el7.x86_64.rpm
最簡單的只需要安裝對應操作系統版本的agent包就可以了。
(2) 修改配置文件
# vi /etc/zabbix/zabbix_agentd.conf
修改 :
Server=zabbix服務器地址
ServerActive=zabbix服務器地址
Hostname=你的客戶端名稱
(3) 配置agent服務以及配置開機自啟動,注意開啟防火墻10050端口。
systemctl enable zabbix-agent
systemctl start zabbix-agent
(4) 測試zabbix客戶端情況
zabbix_get -s 192.168.1.90 -p 10050 -k "system.hostname"
client
16. 其它問題
解決默認(Template OS Linux)負載值不對問題:
修改模板(Template OS Linux)--項目--Processor load (1、5、15 min average per core)鍵值:
把 system.cpu.load[percpu,avg1] 改為 system.cpu.load[all,avg1]
把 system.cpu.load[percpu,avg5] 改為 system.cpu.load[all,avg5]
把 system.cpu.load[percpu,avg15] 改為 system.cpu.load[all,avg15]
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。