CentOS-6.5安装zabbix2.4.4


使用epel源  (检查网络连接是否正常)   //这里使用epel源

[[email protected] /]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

--2016-06-12 15:14:16--  http://mirrors.aliyun.com/repo/Centos-6.repo

正在解析主机 mirrors.aliyun.com... 112.124.140.210, 115.28.122.210

正在连接 mirrors.aliyun.com|112.124.140.210|:80... 已连接。

已发出 HTTP 请求,正在等待回应... 200 OK

长度:2572 (2.5K) [application/octet-stream]

正在保存至: “/etc/yum.repos.d/CentOS-Base.repo”

100%[===========================================================>] 2,572       --.-K/s   in 0s

2016-06-12 15:14:16 (110 MB/s) - 已保存 “/etc/yum.repos.d/CentOS-Base.repo” [2572/2572])

[[email protected] /]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo

--2016-06-12 14:56:28--  http://mirrors.aliyun.com/repo/epel-6.repo

正在解析主机 mirrors.aliyun.com... 115.28.122.210, 112.124.140.210

正在连接 mirrors.aliyun.com|115.28.122.210|:80... 已连接。

已发出 HTTP 请求,正在等待回应... 200 OK

长度:1083 (1.1K) [application/octet-stream]

正在保存至: “/etc/yum.repos.d/epel.repo”

100%[===========================================================>] 1,083       --.-K/s   in 0s

2016-06-12 14:56:28 (283 MB/s) - 已保存 “/etc/yum.repos.d/epel.repo” [1083/1083])

安装zabbix-2.2.1 对PHP的需求最低PHP5.3.0

service端:

1、安装所需要的依赖包

[[email protected] zabbix-2.4.4]# yum -y install make mysql-server httpd php mysql-devel gcc net-snmp-devel curl-devel perl-DBI php-gd php-mysql  php-xml  lrzsz

[[email protected] /]# yum -y install php-bcmath php-mbstring  注意:这两个包可能需要自己预备

安装fping

[[email protected] zabbix-2.4.4]# yum -y install fping

2、同步服务器的时间,保持所以服务器时间一致避免时间不同导致的不可用的监控数据

[[email protected] /]# ntpdate pool.ntp.rog

3、创建zabbix服务器运行所需要的用户和组

[[email protected] /]# useradd   zabbix

4、初始化mysql服务器

[[email protected] /]# /etc/init.d/mysqld start

初始化 MySQL 数据库: Installing MySQL system tables...

OK

Filling help tables...

OK

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password ‘new-password‘

/usr/bin/mysqladmin -u root -h localhost.localdomain password ‘new-password‘

Alternatively you can run:

/usr/bin/mysql_secure_installation

which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

[确定]

正在启动 mysqld:                                          [确定]

[[email protected] /]#

5、创建zabbix运行所需要的数据库及用户权限

[[email protected] /]# mysqladmin  -uroot -h127.0.0.1  password 123456

[[email protected] /]# mysql -u root -h127.0.0.1 -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 4

Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql>

mysql> create database zabbix character set utf8;

Query OK, 1 row affected (0.00 sec)

mysql>  grant all on zabbix.* TO [email protected]‘localhost‘ identified by ‘zabbixpass‘;

Query OK, 0 rows affected (0.00 sec)

mysql>  flush privileges;

Query OK, 0 rows affected (0.00 sec)

6、解压zabbix

[[email protected] /]# tar zxvf 51CTO下载-zabbix-2.4.4.tar.gz

7、将zabbix的初始数据导入数据库中

[[email protected] mysql]# cd /zabbix-2.4.4/database/mysql/

[[email protected] mysql]#  mysql -uroot -hlocalhost -p123456 zabbix <schema.sql

[[email protected] mysql]#  mysql -uroot -hlocalhost -p123456 zabbix <images.sql

[[email protected] mysql]#  mysql -uroot -hlocalhost -p123456 zabbix <data.sql

提示:进入数据库查看是否成功导入

8、编译安装zabbix

[[email protected] mysql]# cd /zabbix-2.4.4/

[[email protected] zabbix-2.4.4]# ./configure --with-mysql --with-net-snmp --with-libcurl --enable-server --enable-agent --enable-proxy --prefix=/usr/local/zabbix

Agent details:

Linker flags:          -rdynamic

Libraries:             -lm -ldl -lrt  -lresolv     -lcurl

Enable Java gateway:   no

LDAP support:          no

IPv6 support:          no

***********************************************************

*            Now run ‘make install‘                       *

*                                                         *

*            Thank you for using Zabbix!                  *

*              <http://www.zabbix.com>                    *

***********************************************************

[[email protected] zabbix-2.4.4]# make install

[[email protected] zabbix-2.4.4]# mkdir /var/www/html/zabbix

[[email protected] zabbix-2.4.4]# cp -a /zabbix-2.4.4/frontends/php/* /var/www/html/zabbix/

[[email protected] zabbix-2.4.4]# vim /etc/httpd/conf/httpd.conf

DirectoryIndex index.html index.html.var index.php

[[email protected] zabbix-2.4.4]# mkdir /usr/local/zabbix/logs

配置zabbix server端的文件,定义数据库的ip、用户名、密码

[[email protected] zabbix-2.4.4]# vim /usr/local/zabbix/etc/zabbix_server.conf

DBName=zabbix

DBPassword=zabbixpass

DBUser=zabbix

LogFile=/usr/local/zabbix/logs/zabbix_server.log

[[email protected] zabbix-2.4.4]# cp /zabbix-2.4.4/misc/init.d/fedora/core5/zabbix_server /etc/init.d/

[[email protected] zabbix-2.4.4]# cp /zabbix-2.4.4/misc/init.d/fedora/core5/zabbix_agentd /etc/init.d/

[[email protected] zabbix-2.4.4]# chmod 700 /etc/init.d/zabbix_*

[[email protected] zabbix-2.4.4]# cat /etc/init.d/zabbix_server | grep ZABBIX_BIN=

ZABBIX_BIN="/usr/local/zabbix/sbin/zabbix_server"

[[email protected] zabbix-2.4.4]# cat /etc/init.d/zabbix_agentd | grep ZABBIX_BIN=

ZABBIX_BIN="/usr/local/zabbix/sbin/zabbix_agentd"

[roo[email protected] zabbix-2.4.4]# chown zabbix:zabbix /usr/local/zabbix/ -R

[[email protected] zabbix-2.4.4]# vim /etc/php.ini   //找到如下几项,改成下面的值,前面有;号的要删掉

max_execution_time = 300

max_input_time = 300

date.timezone = PRC

post_max_size = 32M

[[email protected] zabbix-2.4.4]# vim /etc/httpd/conf/httpd.conf

ServerName 127.0.0.1

<VirtualHost *:80>

DocumentRoot "/var/www/html"

ServerName 192.168.248.131

</VirtualHost>

启动apache服务器和zabbix服务

[[email protected] zabbix-2.4.4]# /etc/init.d/zabbix_server start && /etc/init.d/zabbix_agentd start &&  /etc/init.d/httpd restart

正在启动 Zabbix Server:                                   [确定]

正在启动 Zabbix Agent:                                    [确定]

停止 httpd:                                               [确定]

正在启动 httpd:                                           [确定]

[[email protected] /]# chkconfig zabbix_server on && chkconfig zabbix_agentd on &&  chkconfig  httpd on && chkconfig mysqld on

[[email protected] /]# reboot

访问安装界面按照提示一步一步的完成安装

http://192.168.248.131/zabbix/setup.php

把下载的文件放到/var/www/html/zabbix/conf/zabbix.conf.php

时间: 2024-08-03 18:01:20

CentOS-6.5安装zabbix2.4.4的相关文章

CentOS 7.1安装zabbix

# yum install zabbix-2.4.6-1.el7.x86_64.rpm zabbix-server-2.4.6-1.el7.x86_64.rpm zabbix-server-mysql-2.4.6-1.el7.x86_64.rpm zabbix-agent-2.4.6-1.el7.x86_64.rpm zabbix-sender-2.4.6-1.el7.x86_64.rpm zabbix-web-2.4.6-1.el7.noarch.rpm zabbix-get-2.4.6-1.

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_

安装zabbix2.2.3

系统版本:CentOS 6.3_x86_64 zabbix版本:zabbix-2.2.3 zabbix服务端IP:172.16.10.72 1.yum安装LAMP环境 # yum -y install gcc gcc-c++ autoconf httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-gd php-xml php-mbstringphp-ldap php-pear

zabbix教程-centos6.x源码安装zabbix2.x方法

本教程是通过源码方式来安装zabbix 系统软件安装环境: linux系统版本:CentOS 6.4 x64 zabbix版本:zabbix-2.4.1.tar.gz zabbix下载地址:http://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.1/zabbix-2.4.1.tar.gz centos 6.4 安装mysql 安装方法 Zabbix Server需运行在LAMP或者lnmp环境下. 安装

基于CentOS 6.6搭建Zabbix2.4.x

基于CentOS 6.6搭建Zabbix2.4.x 安装YUM源 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo wget http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noar

centos 6.5安装NodeJS

centos 6.5安装NodeJS 下载 可以在本地下载node.js最新版,然后通过ftp工具上传到服务器,或者直接在服务器终端使用wget命令下载(我当时下载的是node-v7.5.0-linux-x86版本,其他版本请查看上面链接然后替换即可): $ wget http://nodejs.org/dist/latest/node-v7.5.0-linux-x86.tar.gz 解压 进入服务器终端,找到上传或者下载的安装包,解压 $ tar -zvxf node-v7.5.0-linux

MongoDB 3.2 在CentOS 上的安装和配置

MongoDB 3.2 在CentOS 上的安装和配置 2016-01-06 14:41:41 发布 您的评价:       0.0   收藏     0收藏 一.安装 编辑/etc/yum.repos.d/mongodb-org-3.2.repo [mongodb-org-3.2] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ gpg

Centos 7 一键安装openstack

系统:Centos7x64 单节点 CentOS yum 快速安装: # 安装RDO repo $ sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm # 更新repo源 $ sudo yum update -y # 安装openstack-packstack $ sudo yum install -y openstack-packstack # 执行部署过程 $ packstack --allinone 访问

CentOS 7 yum安装Zabbix

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

CentOS 6.5 安装部署iSCSi共享存储

 CentOS 6.5 安装部署iSCSi共享存储 一.前言 1.什么是iSCSI? iSCSI技术是一种由IBM公司研究开发的,是一个供硬件设备使用的可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速千兆以太网上进行路由选择.iSCSI技术是一种新储存技术,该技术是将现有SCSI接口与以太网络(Ethernet)技术结合,使服务器可与使用IP网络的储存装置互相交换资料. iSCSI:Internet 小型计算机系统接口 (iSCSI: