zabiix搭建
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了zabiix搭建相关的知识,希望对你有一定的参考价值。
1.LAMP的安裝及配置、Zabbix的安裝及配置
操作系統的選擇
CentOS 6.8
建議使用minimal desktop。
安裝mysql
yum install –y mysql-serve
編輯vim /etc/my.conf
character-set-server=uft8
innodb_file_per_table=1
啟動服務
chkconfig mysqld on
service mysqld start
b.安裝zabbix官方源和epel源
rpm -ivhhttp://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
或者在/etc/yum.repo.d/創建自定義yum源,內容如下
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/2.2/rhel/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/6/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
c.安裝Zabbix-Server
yum install -y zabbix zabbix-getzabbix-server zabbix-web-mysql zabbix-web (zabbix-agent)
d.Mysql的配置
創建zabbix的數據庫
create database zabbix character set utf8;
grant allprivileges on zabbix.* to [email protected] identified by ‘zabbix’;
flush privileges;
設置mysql的root密碼
mysqladmin –uroot password admin
導入zabbix-server數據庫腳本
source/usr/share/doc/zabbix-server-mysql-2.2.14/create/schema.sql
source/usr/share/doc/zabbix-server-mysql-2.2.14/create/images.sql
source/usr/share/doc/zabbix-server-mysql-2.2.14/create/data.sql
e.配置php
由於剛剛在安裝zabbix-server已經安裝了依賴關係,因此PHP無需安裝,在/etc/php.ini設定檔中添加
date.timezone =Asia/Shanghai
max_execution_time = 300
post_max_size = 16M
max_input_time=300
memory_limit = 128M
mbstring.func_overload = 2
f. apache的安裝
yum install –y httpd
注意事項
1.防火牆打開埠10050,10051,80,22
2.Selinux的設置
本文出自 “9279550” 博客,请务必保留此出处http://9289550.blog.51cto.com/9279550/1869529
以上是关于zabiix搭建的主要内容,如果未能解决你的问题,请参考以下文章