标签:zabbix
1 概述2 安装MySQL3 安装WEB4 安装Zabbix-Server5配置WEB1概述
对于3.0,官方只提供CentOS7的RPM包,Ubuntu的DEB包,对于CentOS6,默认不提供RPM包,为了照顾到使用CentOS6的兄弟们,而由不想使用源码安装的兄弟,小编特意准备了CentOS6的安装包,希望大家玩的开心
环境要求
PHP >= 5.4 (CentOS6默认为5.3.3,需要更新)
curl >= 7.20 (如需支持SMTP认证,需更新)
为了支持CentOS6,特建立如下项目
推荐项目
https://github.com/zabbixcn/zabbix3.0-rpm.git https://github.com/zabbixcn/curl-rpm
2安装MySQL
MySQL建议使用5.6版本,CentOS6默认为5.1,不建议使用,性能偏低
rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm yum install mysql-server -y #此过程会因为网路问题偏慢,请耐心等待
vim /etc/my.cnf
[mysqld] innodb_file_per_table service mysqld start mysql_secure_installation
Enter current password for root (enter for none): Set root password? [Y/n] Remove anonymous users? [Y/n] Disallow root login remotely? [Y/n] Remove test database and access to it? [Y/n] Reload privilege tables now? [Y/n]
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> show databases;
+--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | zabbix | +--------------------+
3安装WEB
Zabbix 3.0对PHP的要求最低为5.4,而CentOS6默认为5.3.3,完全不满足要求,故需要利用第三方源,将PHP升级到5.4以上,注意,不支持PHP7
ssh登录您的CentOS6 x64系统,使用root用户运行以下命令
git clone https://github.com/zabbixcn/zabbix3.0-rpm.git
cd zabbix3.0-rpm/RPMS
rpm -ivh http://repo.webtatic.com/yum/el6/latest.rpm
yum install zabbix-web-mysql-3.0.0-1.el6.noarch.rpm zabbix-web-3.0.0-1.el6.noarch.rpm httpd php56w php56w-gd php56w-mysql php56w-bcmath php56w-mbstring php56w-xml php56w-ldap
sed -i "s@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g" /etc/httpd/conf.d/zabbix.conf
/etc/init.d/httpd restart
cd /usr/share/zabbix-server-mysql-3.0.0
zcat create.sql.gz | mysql -uzabbix -pzabbix zabbix
4安装Zabbix-Server
yum localinstall zabbix-server-mysql-3.0.0-1.el6.x86_64.rpm vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix
/etc/init.d/zabbix-server restart 如果一切正常,日志会如下:
5配置WEB
http://${IP}/zabbix和之前版本一样,此处不再详解!
如果您是CentOS7活Ubuntu,请参考官方文档直接安装
https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages
更多精彩,点击下方“阅读原文”查看。
本文出自 “itnihao的运维技术博客” 博客,请务必保留此出处http://itnihao.blog.51cto.com/1741976/1742701
标签:zabbix
原文地址:http://itnihao.blog.51cto.com/1741976/1742701