標籤:zabbix
Zabbix快速部署:
官方安裝說明:
https://www.zabbix.com/documentation/2.4/manual/installation/install_from_packages#red_hat_enterprise_linux_centos
源碼包安裝:http://it1693.blog.51cto.com/2342744/1609794
設定yum源
Zabbix 2.4 for RHEL6:
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Zabbix 2.4 for RHEL7
#rpm –ivh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
安裝Zabbix包
Zabbix伺服器的樣本為mysql資料庫和web前端。
1、首先安裝LAMP環境,可使用yum的快速安裝方法
2、安裝Zabbix
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get zabbix-sender
建立Zabbix資料、並授權zabbix使用者
Mysql> mysql –uroot –c
Mysql>CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
Mysql>grant all privileges on zabbix.* to ‘zabbix‘@‘%‘ identified by ‘12345‘;
Mysql>flush privileges;
初始化zabbix資料庫
# cd /usr/share/doc/zabbix-server-mysql-2.4.6/create
mysql -uroot zabbix < schema.sql
mysql -uroot zabbix < images.sql
mysql -uroot zabbix < data.sql
修改zabbix-server設定檔:
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=12345
修改PHP設定檔:
# vi /etc/php.ini
date.timezone = Asia/Shanghai #設定時區
以下是官方推薦設定:
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
啟動zabbix
/etc/init.d/zabbix-server start
/etc/init.d/mysqld start
/etc/init.d/httpd start
/etc/init.d/zabbix-agent start
添加開機啟動並關閉防火牆:
[[email protected]_3 ~]# chkconfig |egrep ‘httpd|mysqld|zabbix*|iptables‘
httpd 0:關閉 1:關閉 2:啟用 3:啟用 4:啟用 5:啟用 6:關閉
iptables 0:關閉 1:關閉 2:關閉 3:關閉 4:關閉 5:關閉 6:關閉
mysqld 0:關閉 1:關閉 2:啟用 3:啟用 4:啟用 5:啟用 6:關閉
zabbix-agent 0:關閉 1:關閉 2:啟用 3:啟用 4:啟用 5:啟用 6:關閉
zabbix-server 0:關閉 1:關閉 2:啟用 3:啟用 4:啟用 5:啟用 6:關閉
[[email protected]_3 ~]# grep SELINUX=disabled /etc/selinux/config
SELINUX=disabled
Quickstart
瀏覽器訪問:
http://10.0.0.63/zabbix/setup.php
650) this.width=650;" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="clip_image002" border="0" alt="clip_image002" src="http://s3.51cto.com/wyfs02/M00/71/A0/wKiom1XVM1rwXiIKAABOwJERRzk750.jpg" width="244" height="156" />
650) this.width=650;" style="background-image:none;margin:0px;padding-left:0px;padding-right:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="clip_image004" border="0" alt="clip_image004" src="http://s3.51cto.com/wyfs02/M01/71/A0/wKiom1XVM1rwZKxDAABdOkl9lAE083.jpg" width="244" height="159" />
1 Login and configuring user
650) this.width=650;" style="background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="clip_image005" border="0" alt="clip_image005" src="http://s3.51cto.com/wyfs02/M02/71/A0/wKiom1XVM1uip5aTAABCFlI0-XQ575.jpg" width="244" height="112" />
This is the Zabbix “Welcome” screen. Enter the user name Admin with password zabbix to log in as a Zabbix superuser.
本文出自 “it1693” 部落格,請務必保留此出處http://it1693.blog.51cto.com/2342744/1686293
Zabbix快速部署