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

[root@localhost /]# wget -O /etc/yum.repos.d/CentOS-Base.repo 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])
 
[root@localhost /]# 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、安装所需要的依赖包
[root@localhost 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 
[root@localhost /]# yum -y install php-bcmath php-mbstring  注意:这两个包可能需要自己预备
安装fping
[root@localhost zabbix-2.4.4]# yum -y install fping
 
2、同步服务器的时间,保持所以服务器时间一致避免时间不同导致的不可用的监控数据
[root@localhost /]# ntpdate pool.ntp.rog
3、创建zabbix服务器运行所需要的用户和组
[root@localhost /]# useradd   zabbix  
4、初始化mysql服务器
[root@localhost /]# /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:                                          [确定]
 
5、创建zabbix运行所需要的数据库及用户权限
[root@localhost /]# mysqladmin  -uroot -h127.0.0.1  password 123456
[root@localhost /]# 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 zabbix@'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
[root@localhost /]# tar zxvf 51CTO下载-zabbix-2.4.4.tar.gz
7、将zabbix的初始数据导入数据库中
[root@localhost mysql]# cd /zabbix-2.4.4/database/mysql/
[root@localhost mysql]#  mysql -uroot -hlocalhost -p123456 zabbix <schema.sql
[root@localhost mysql]#  mysql -uroot -hlocalhost -p123456 zabbix <images.sql 
[root@localhost mysql]#  mysql -uroot -hlocalhost -p123456 zabbix <data.sql 
                          提示:进入数据库查看是否成功导入
8、编译安装zabbix
[root@localhost mysql]# cd /zabbix-2.4.4/
[root@localhost 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>                    *
***********************************************************
 
[root@localhost zabbix-2.4.4]# make install
 
[root@localhost zabbix-2.4.4]# mkdir /var/www/html/zabbix
[root@localhost zabbix-2.4.4]# cp -a /zabbix-2.4.4/frontends/php/* /var/www/html/zabbix/
[root@localhost zabbix-2.4.4]# vim /etc/httpd/conf/httpd.conf
DirectoryIndex index.html index.html.var index.php
[root@localhost zabbix-2.4.4]# mkdir /usr/local/zabbix/logs
配置zabbix server端的文件,定义数据库的ip、用户名、密码
[root@localhost 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
[root@localhost zabbix-2.4.4]# cp /zabbix-2.4.4/misc/init.d/fedora/core5/zabbix_server /etc/init.d/
[root@localhost zabbix-2.4.4]# cp /zabbix-2.4.4/misc/init.d/fedora/core5/zabbix_agentd /etc/init.d/
[root@localhost zabbix-2.4.4]# chmod 700 /etc/init.d/zabbix_*
[root@localhost zabbix-2.4.4]# cat /etc/init.d/zabbix_server | grep ZABBIX_BIN=
ZABBIX_BIN="/usr/local/zabbix/sbin/zabbix_server"
[root@localhost zabbix-2.4.4]# cat /etc/init.d/zabbix_agentd | grep ZABBIX_BIN=
ZABBIX_BIN="/usr/local/zabbix/sbin/zabbix_agentd"
[root@localhost zabbix-2.4.4]# chown zabbix:zabbix /usr/local/zabbix/ -R
 
[root@localhost zabbix-2.4.4]# vim /etc/php.ini   //找到如下几项,改成下面的值,前面有;号的要删掉
 
max_execution_time = 300
max_input_time = 300
date.timezone = PRC
post_max_size = 32M
 
[root@localhost 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服务
 
[root@localhost 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:                                           [确定]
 
[root@localhost /]# chkconfig zabbix_server on && chkconfig zabbix_agentd on &&  chkconfig  httpd on && chkconfig mysqld on 
 
[root@localhost /]# reboot
 
 
访问安装界面按照提示一步一步的完成安装

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

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

  1. CentOS 6.5安装部署Zabbix监控系统

    CentOS 6.5安装部署Zabbix监控系统 先说一点废话,我没有用centos7做实验,讲真,centos 7我也不常用,喜欢新版本的同学其实可以尝试下,注意一点的就是centos 6.5只支持 ...

  2. yum 安装zabbix2.4 /3.2.4

    yum 安装zabbix2.4 首先zabbix需要的环境是web环境,默认的是lamp或者lnmp,讲道理,要是使用tomcat也是可以的,不过实验没有成功 系统:centos6.8_x64 附yu ...

  3. CentOS 6.5之zabbix2.2的简单部署

    Zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.(目前,官方长期维护的稳定版本有2.2和3.0) 其他常见的监控工具还有: (1)Cacti:Cacti是一 ...

  4. MonoDevelop 4.2.2/Mono 3.4.0 in CentOS 6.5 安装笔记

    MonoDevelop 4.2.2/Mono 3.4.0 in CentOS 6.5 安装笔记 说明 以root账户登录Linux操作系统,注意:本文中的所有命令行前面的 #> 表示命令行提示符 ...

  5. Centos、Ubuntu 安装 Mono、Jexus

    Mono是.NET的跨平台实现 在众多关于语言的争论中,.NET一直被以不能跨平台而诟病,Mono改变了这一现状. 有人当心Mono会涉及版权啥的问题.高深的偶不懂,不过我觉得Unity3D都能用,为 ...

  6. Centos 7.0 安装Mono 3.4 和 Jexus 5.6

    2013-07-26 写过一篇<CentOS 6.3下 安装 Mono 3.2 和Jexus 5.4>,CentOS 7在CentOS 6的基础上有很大的调整,本文是这篇文章的更新,主要介 ...

  7. 环境搭建系列-系统安装之centos 6.5安装与配置

    按照国际惯例,系列目录先奉上: 系列一:系统安装之centos 6.5安装与配置 系列二:准备工作之Java环境安装 系列三:数据为先之MySQL读写集群搭建 系列四:谈分布式之RabbitMQ集群搭 ...

  8. 在CentOS 7上安装.NET Core R2跑Hello World

    前言 在上个月.NET Core出了最新版本预览版,只是在Window系统上试验了一下.原本想等发布正式版的时候在linux系统上试试,可能还需要一段时间,刚好有空可以折腾一下. 由于之前安装的Ubu ...

  9. CentOS 6/7安装ffmpeg

    环境 CentOS 6/7 安装 导入GPG key rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms 安装ATRPMS Repo ...

  10. CentOS 7.0安装配置Vsftp服务器

    一.配置防火墙,开启FTP服务器需要的端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop fi ...

随机推荐

  1. Servlet3.0中Servlet的使用

    目录 1.注解配置 2.异步调用 3.文件上传 相对于之前的版本,Servlet3.0中的Servlet有以下改进: l  支持注解配置. l  支持异步调用. l  直接有对文件上传的支持. 在这篇 ...

  2. 高可用与负载均衡(8)之聊聊 LVS重要参数和优化以及监控

    preface 在明白LVS-DR模式的部署之后,我们看看LVS的几个重要参数: 如有问题,请联系我18500777133@sina.cn [root@localhost ~]# ls /proc/s ...

  3. C++ Primer Plus读书笔记

    第五章 循环和关系表达式 1. 2.类别别名: (1)   #define FLOAT_POINTER float * FLOAT_POINTER pa, pb; 预处理器置换将该声明转换成  flo ...

  4. CIQRCodeGenerator Core Image Filter Reference

    https://developer.apple.com/library/prerelease/content/documentation/GraphicsImaging/Reference/CoreI ...

  5. PHP 生成图片缩略图函数

    <?php /** * 生成缩略图函数(支持图片格式:gif.jpeg.png和bmp) * @author ruxing.li * @param string $src 源图片路径 * @pa ...

  6. 60行JS实现俄罗斯方块

    参考文献:http://www.cnblogs.com/jimaojin/p/5413857.html 原版: <!doctype html><html><head> ...

  7. Python标准库:内置函数hasattr(object, name)

    Python标准库:内置函数hasattr(object, name) 本函数是用来判断对象object的属性(name表示)是否存在.如果属性(name表示)存在,则返回True,否则返回False ...

  8. LaTex 使用 - 配置

    Reference Link: http://www.howtotex.com/howto/installing-latex-on-windows/ MikTeX:http://miktex.org/ ...

  9. 2012 Theory for Forward Rendering

    http://miss-cache.blogspot.com/2012/08/lighting-transparent-surfaces-with_26.html http://aras-p.info ...

  10. swiper 增加同页面增加2个滚动

    js代码 <script type="text/javascript"> var mySwiper = new Swiper('.slide_a',{ noSwipin ...