CENTOS 6.8 INSTALL ZABBIX 3.2

查看自己得数据库版本
yum list installed | grep mysql
----------------------------------------
Expected output:
mysql-libs.x86_64    5.1.73-5.el6_6     @anaconda-CentOS-201508042137.x86_64/6.7
----------------------------------------

删除自己得老版本数据库
yum remove mysql*

添加新得数据库下载
rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
----------------------------------------
Expected output:
Retrieving http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
Preparing...                ########################################### [100%]
   1:mysql-community-release########################################### [100%]
----------------------------------------

安装数据库和vim编译器
yum install mysql-server vim -y

配置my.cnf文件
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]
Normally you should answer “Yes” to all these questions.

添加zabbix数据库
mysql -u root -p
CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON zabbix.* TO [email protected] IDENTIFIED BY ‘zabbix‘;
----------------------------------------
Expected output:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| zabbix             |
+--------------------+
4 rows in set (0.00 sec)
----------------------------------------

配置web服务
rpm -ivh http://repo.webtatic.com/yum/el6/latest.rpm
yum -y install httpd php56w php56w-gd php56w-mysql php56w-bcmath php56w-mbstring php56w-xml php56w-ldap wget ntpdate net-snmp*

vim /etc/php.ini
post_max_size=16M
max_execution_time=300
max_input_time=300
date.timezone=Asia/Shanghai
always_populate_raw_post_data=-1

service httpd start

调整防火墙配置
iptables -I INPUT -p tcp -m multiport --destination-port 80,10050:10051 -j ACCEPT
service iptables save

配置NTP时间
ntpdate time.windows.com

---------------------------------------------------------------------------------------------------------------
((((以上配置如果没有问题 输入 ip a s 查看自己得地址。尝试http登陆 会发现web服务得界面就基本表示OK了))))
----------------------------------------------------------------------------------------------------------------

开始zabbix的安装
创建用户
groupadd zabbix
useradd -g zabbix zabbix

创建下载文件夹(zabbix就丢这里面)
mkdir /home/zabbix/downloads
cd /home/zabbix/downloads

下载
wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.2.0/zabbix-3.2.0.tar.gz

解压
tar -zxvf zabbix-3.2.0.tar.gz

进入zabbix文件数据库   (如有提示密码就是zabbix用户得密码 ”zabbix“)
cd /home/zabbix/downloads/zabbix-3.2.0/database/mysql
mysql -u zabbix -p zabbix < schema.sql
mysql -u zabbix -p zabbix < images.sql
mysql -u zabbix -p zabbix < data.sql

下载依赖包
yum install -y gcc mysql-community-devel libxml2-devel  unixODBC-devel net-snmp-devel libcurl-devel libssh2-devel OpenIPMI-devel openssl-devel openldap-devel

cd ../..

编译安装
./configure --enable-server  --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc --with-ssh2 --with-openipmi --with-openssl

make install

修改配置启动文件
vim /usr/local/etc/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

创建zabbix-web页面文件夹
mkdir /var/www/html/zabbix
cd /home/zabbix/downloads/zabbix-3.2.0/frontends/php/
cp -a . /var/www/html/zabbix/

关闭selinux
setenforce 0

创建一个规则允许web服务器访问前端文件
chcon -Rv --type=httpd_sys_content_t /var/www/html

运行Apache和zabbix访问外网
setsebool -P httpd_can_network_connect=1
setsebool -P zabbix_can_network=1

设置Apache用户web接口文件的所有者
chown -R apache:apache /var/www/html/zabbix

为zabbix web界面添加权限
chmod +x /var/www/html/zabbix/conf/

启动脚本
cp /home/zabbix/downloads/zabbix-3.2.0/misc/init.d/fedora/core/zabbix_server /etc/init.d/zabbix_server
chkconfig --add /etc/init.d/zabbix_server

启用Zabbix服务器,Apache和MySQL服务启动
chkconfig httpd on
chkconfig mysqld on
chkconfig zabbix_server on

全面启动
service zabbix_server start

时间: 2025-01-14 16:54:04

CENTOS 6.8 INSTALL ZABBIX 3.2的相关文章

How to install Zabbix on CENTOS 7

when you have installed zabbix , it is important of changing password. How to install Zabbix on CENTOS 7 Setup 1 INSTALL Create the repos of Zabbix rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rp

CentOS 7 yum安装Zabbix

CentOS 7 yum安装Zabbix 一.Zabbix简介 zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题. 下面是Centos7上yum安装zabbix的步骤. 二.Zabbix安装 本文档在同一台机器上安装了zabbix-server 和zabbix-agent 自己监控自己. 1.配置LAMP 参照下面的链接 Centos

CentOS 7上安装Zabbix Server 3.0 图文详解

转载自 http://www.linuxidc.com/Linux/2016-09/135204.htm CentOS 7上安装Zabbix Server 3.0 图文详解 1.查看系统信息. cat /etc/RedHat-releaseCentOS Linux release 7.0.1406 (Core) uname -a Linux VM_96_155_centos3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_

yum install zabbix

环境: centos 6.5 下载并安装epel源 links  http://fedoraproject.org/wiki/EPEL rpm -ivh epel-* 2.安装amp环境 yum install httpd mysql mysql-server php php-mysql -y 3.安装zabbix yum install zabbix22.x86_64 zabbix22-agent.x86_64 zabbix22-server.noarch zabbix22-server-my

How to Install Zabbix Agent on Windows System

Zabbix Agent is installed on remote systems needs to monitor through Zabbix server. The Zabbix agent collects resource utilization and applications data on client system and provide such information to zabbix server on their requests. This article wi

CentOS 6.6 搭建Zabbix 3.0.3 过程

分享CentOS 6.6下搭建Zabbix 3.0.3 的过程,希望都大家有所帮助. 环境安装 系统环境: # cat /etc/RedHat-release CentOS release 6.6 (Final) 服务器IP地址: 10.20.0.101 Apache安装 #yum install httpd libxml2-devel net-snmp-devel libcurl-devel 配置web 更改ServerName # vim /etc/httpd/conf/httpd.conf

CentOS 6.4搭建zabbix

系统环境:CentOS 6.4 64bit Zabbix版本:zabbix 2.2.3 前提条件:已安装好LNMP环境 一.服务端: 1.  下载zabbix安装包zabbix-2.2.3.tar.gz并解压 2.  安装zabbix所需组件 yum install -y curl curl-devel net-snmp net-snmp-devel perl-DBI 3.  创建用户账号 Useradd -s /sbin/nologin zabbix 4.  创建zabbix数据库 #mysq

在CentOS 7.4 搭建zabbix 3.4 监控系统

[[email protected] ~]# cat /etc/redhat-releaseCentOS Linux release 7.4.1708 (Core) [[email protected] ~]# uname -r3.10.0-693.11.1.el7.x86_64 下载zabbix3.4版本的 yum源安装包 [[email protected] zabbix]# wget http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbi

Install Zabbix 3.4

Install Zabbix 3.4 which is an enterprise open source monitoring system. It's possible to monitor not only Linux but Windows, Solaris, IBM AIX and others. [1] On this example, It based on that SELinux is Permissive or Disabled. [2] Install Apache htt